mwrap 2.3.0 → 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 +13 -1
- data/README +25 -17
- data/Rakefile +10 -2
- data/VERSION-GEN +1 -1
- data/ext/mwrap/check.h +23 -0
- data/ext/mwrap/dlmalloc_c.h +6294 -0
- data/ext/mwrap/extconf.rb +3 -7
- data/ext/mwrap/gcc.h +13 -0
- data/ext/mwrap/httpd.h +1367 -0
- data/ext/mwrap/mwrap.c +44 -1151
- 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/version.rb +1 -1
- data/lib/mwrap_rack.rb +14 -58
- data/mwrap.gemspec +10 -3
- data/t/httpd.t +191 -0
- data/t/test_common.perl +54 -0
- data/test/test_mwrap.rb +34 -50
- metadata +21 -7
data/ext/mwrap/extconf.rb
CHANGED
@@ -10,6 +10,9 @@ 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')
|
14
|
+
|
15
|
+
have_struct_member('struct sockaddr_un', 'sun_len', %w(sys/socket sys/un.h))
|
13
16
|
|
14
17
|
if try_link(<<EOC)
|
15
18
|
int main(void) { return __builtin_add_overflow_p(0,0,(int)1); }
|
@@ -25,11 +28,4 @@ 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 */
|