Repository navigation
Commit 6889890
Avoid redefining FFI_GO_CLOSURES defined by libffi headers
libffi defines FFI_GO_CLOSURES unconditionally in ffitarget.h on most
targets, so pre-defining it in fiddle.h is a macro redefinition there,
which MSVC reports as warning C4005 in every compilation unit, e.g.
with vcpkg libffi. Restore the conditional definition of GH-134 in
extconf.rb, but with macro_defined? instead of the fragile warning
text matching that GH-157 removed. FFI_GO_CLOSURES=0 is only needed
for old ffi.h that tests `#if FFI_GO_CLOSURES` and warns with -Wundef
when the target's ffitarget.h does not define it.
#134
#157
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 865d764 commit 6889890
2 files changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
165 | 175 | | |
166 | 176 | | |
167 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| |||
0 commit comments