unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / Atom feed
330f70d9362dbdc3ddedf60eb54a95ed38ba20b6 blob 937 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
#!/usr/bin/ruby -w
buf = STDIN.read # output of: gperf ext/unicorn_http/common_fields.gperf

# this is supposed to fail if it doesn't subsitute anything:
print buf.sub!(

# make sure all functions are static
/\nstruct \w+ \*\n(\w+_)?lookup/) {
  "\nstatic#$&"
}.

# gperf 3.0.3 (on FreeBSD 12.0) actually uses offsetof
gsub(
# gperf 3.0.x used "(int)(long)", 3.1 uses "(int)(size_t)",
#  input: {(int)(size_t)&((struct cf_pool_t *)0)->cf_pool_str3},
# output: {offsetof(struct cf_pool_t, cf_pool_str3)},
/{\(int\)\(\w+\)\&\(\((struct \w+) *\*\)0\)->(\w+)}/) {
  "{offsetof(#$1, #$2)}"
}.

# make sure everything is 64-bit safe and compilers don't truncate
gsub!(/\b(?:unsigned )?int\b/, 'size_t').

# This isn't need for %switch%, but we'll experiment with to see
# if it's necessary, or not.
# don't give compilers a reason to complain, (struct foo *)->name
# is size_t, so unused slots should be size_t:
gsub(/\{-1\}/, '{(size_t)-1}')
debug log:

solving 330f70d ...
found 330f70d in https://bogomips.org/unicorn.git

unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://bogomips.org/unicorn-public
	git clone --mirror http://ou63pmih66umazou.onion/unicorn-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.unicorn

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git