Skip to content

Commit

Permalink
Suppress -Wundef warnings (#157)
Browse files Browse the repository at this point in the history
The GCC warning puts undefined macro names in double quotes while clang
puts them in single quotes.
  • Loading branch information
nobu authored Oct 22, 2024
1 parent eea9fd0 commit 7dcb40b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 0 additions & 5 deletions ext/fiddle/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@ def enable_debug_build_flag(flags)
end
if have_ffi_header && (have_library('ffi') || have_library('libffi'))
have_libffi = true
checking_for("undefined FFI_GO_CLOSURES is used") do
if egrep_cpp(/warning: 'FFI_GO_CLOSURES' is not defined/, cpp_include(ffi_header), "2>&1")
$defs.push('-DFFI_GO_CLOSURES=0')
end
end
end
end

Expand Down
1 change: 1 addition & 0 deletions ext/fiddle/fiddle.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
# endif
#endif

#define FFI_GO_CLOSURES 0 /* fiddle does not use go closures */
#ifdef USE_HEADER_HACKS
#include <ffi/ffi.h>
#else
Expand Down

0 comments on commit 7dcb40b

Please sign in to comment.