mwrap 2.2.0.1.g867b → 3.0.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/COPYING +617 -282
- data/Documentation/.gitignore +2 -0
- data/Documentation/GNUmakefile +63 -0
- data/Documentation/mwrap.1 +242 -0
- data/Documentation/mwrap.pod +123 -0
- data/MANIFEST +15 -0
- data/README +25 -17
- data/Rakefile +10 -2
- data/VERSION-GEN +36 -0
- data/bin/mwrap +19 -0
- data/ext/mwrap/check.h +23 -0
- data/ext/mwrap/dlmalloc_c.h +6294 -0
- data/ext/mwrap/extconf.rb +7 -11
- data/ext/mwrap/gcc.h +13 -0
- data/ext/mwrap/httpd.h +1367 -0
- data/ext/mwrap/mwrap.c +44 -1138
- data/ext/mwrap/mwrap_core.h +1095 -0
- data/ext/mwrap/mymalloc.h +299 -0
- data/ext/mwrap/picohttpparser.h +92 -0
- data/ext/mwrap/picohttpparser_c.h +670 -0
- data/lib/mwrap/.gitignore +1 -0
- data/lib/mwrap/version.rb +1 -0
- data/lib/mwrap_rack.rb +14 -58
- data/mwrap.gemspec +15 -5
- data/t/httpd.t +191 -0
- data/t/test_common.perl +54 -0
- data/test/test_mwrap.rb +34 -50
- metadata +22 -5
data/ext/mwrap/extconf.rb
CHANGED
@@ -10,26 +10,22 @@ have_library 'urcu-bp' or abort 'liburcu-bp not found'
|
|
10
10
|
have_library 'dl'
|
11
11
|
have_library 'c'
|
12
12
|
have_library 'execinfo' # FreeBSD
|
13
|
+
$defs << '-DHAVE_XXHASH' if have_header('xxhash.h')
|
13
14
|
|
14
|
-
|
15
|
-
int main(void) { return __builtin_add_overflow_p(0,0,(int)1); }
|
15
|
+
have_struct_member('struct sockaddr_un', 'sun_len', %w(sys/socket sys/un.h))
|
16
16
|
|
17
|
+
if try_link(<<EOC)
|
18
|
+
int main(void) { return __builtin_add_overflow_p(0,0,(int)1); }
|
19
|
+
EOC
|
17
20
|
$defs << '-DHAVE_BUILTIN_ADD_OVERFLOW_P'
|
18
21
|
end
|
19
22
|
|
20
|
-
if try_link(<<
|
23
|
+
if try_link(<<EOC)
|
21
24
|
int main(int a) { return __builtin_add_overflow(0,0,&a); }
|
22
|
-
|
25
|
+
EOC
|
23
26
|
$defs << '-DHAVE_BUILTIN_ADD_OVERFLOW_P'
|
24
27
|
else
|
25
28
|
abort 'missing __builtin_add_overflow'
|
26
29
|
end
|
27
30
|
|
28
|
-
begin
|
29
|
-
if n = GC::INTERNAL_CONSTANTS[:HEAP_PAGE_SIZE]
|
30
|
-
$defs << "-DHEAP_PAGE_SIZE=#{n}"
|
31
|
-
end
|
32
|
-
rescue NameError
|
33
|
-
end
|
34
|
-
|
35
31
|
create_makefile 'mwrap'
|
data/ext/mwrap/gcc.h
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
/* CC0 (Public domain) - http://creativecommons.org/publicdomain/zero/1.0/ */
|
2
|
+
#ifndef GCC_H
|
3
|
+
#define GCC_H
|
4
|
+
#define ATTR_COLD __attribute__((cold))
|
5
|
+
|
6
|
+
#if __STDC_VERSION__ >= 201112
|
7
|
+
# define MWRAP_TSD _Thread_local
|
8
|
+
#elif defined(__GNUC__)
|
9
|
+
# define MWRAP_TSD __thread
|
10
|
+
#else
|
11
|
+
# error _Thread_local nor __thread supported
|
12
|
+
#endif
|
13
|
+
#endif /* GCC_H */
|