mwrap 2.3.0 → 3.0.0.pre1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 */