Skip to content

Commit a51007f

Browse files
nobuhsbt
authored andcommitted
[ruby/fiddle] Suppress -Wundef warnings
(ruby/fiddle#157) The GCC warning puts undefined macro names in double quotes while clang puts them in single quotes. ruby/fiddle@7dcb40bccb
1 parent 346085e commit a51007f

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

ext/fiddle/extconf.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,6 @@ def enable_debug_build_flag(flags)
6868
end
6969
if have_ffi_header && (have_library('ffi') || have_library('libffi'))
7070
have_libffi = true
71-
checking_for("undefined FFI_GO_CLOSURES is used") do
72-
if egrep_cpp(/warning: 'FFI_GO_CLOSURES' is not defined/, cpp_include(ffi_header), "2>&1")
73-
$defs.push('-DFFI_GO_CLOSURES=0')
74-
end
75-
end
7671
end
7772
end
7873

ext/fiddle/fiddle.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
# endif
4141
#endif
4242

43+
#define FFI_GO_CLOSURES 0 /* fiddle does not use go closures */
4344
#ifdef USE_HEADER_HACKS
4445
#include <ffi/ffi.h>
4546
#else

0 commit comments

Comments
 (0)