diff --git a/src/isaac64.c b/src/isaac64.c index 76cb769fc..89229d1f6 100644 --- a/src/isaac64.c +++ b/src/isaac64.c @@ -7,11 +7,25 @@ * Changes for NetHack: * include config.h; * skip rest of file if USE_ISAAC64 isn't defined there; + * yn() hackery; * re-do 'inline' handling. */ #include "config.h" #ifdef USE_ISAAC64 +/* + * OSX declares yn() in a section labelled + * "POSIX/UNIX extensions to the C standard". + * + * Even when yn() is not a macro, expansion of nethack's yn() macro + * would break it. Matters for 'onefile' lint checking where contents + * of hack.h will be visible even though we only include config.h. + */ +#ifdef yn +#undef yn +#define _isaac64_hide_yn +#endif + #include #include #include "isaac64.h" @@ -171,6 +185,17 @@ uint64_t isaac64_next_uint(isaac64_ctx *_ctx,uint64_t _n){ while(((d+_n-1)&ISAAC64_MASK) defines yn() as a macro */ +#endif +#define yn(query) yn_function(query, ynchars, 'n', TRUE) +#undef _isaac64_hide_yn +#endif + #endif /* USE_ISAAC64 */ /*isaac64.c*/