]> granicus.if.org Git - nethack/commitdiff
undefine X11_BUILD after hack.h or config.h
authornhmall <nhmall@nethack.org>
Wed, 1 Feb 2023 19:04:20 +0000 (14:04 -0500)
committernhmall <nhmall@nethack.org>
Wed, 1 Feb 2023 19:04:20 +0000 (14:04 -0500)
So as not to complicate any onefile efforts by leaving it defined.

win/X11/dialogs.c
win/X11/winX.c
win/X11/winmenu.c
win/X11/winmisc.c
win/X11/wintext.c

index 03f430c6b01b767ce693147bbe11643f6d47a339..37d81313b040128021df549a6ff24fd10043c831 100644 (file)
@@ -80,6 +80,7 @@
 #define X11_BUILD
 #include "config.h" /* #define for const for non __STDC__ compilers */
 #undef X11_BUILD
+
 #include "lint.h"   /* for nethack's nhStr() macro */
 #include "winX.h"   /* to make sure protoypes match corresponding functions */
 
index b595745406071375b6146c3614e6371c145ba47d..05d7c2ef9b222c8572eed52354555cbe1b94764d 100644 (file)
@@ -16,8 +16,6 @@
 #define SHORT_FILENAMES
 #endif
 
-#define X11_BUILD
-
 #include <X11/Intrinsic.h>
 #include <X11/StringDefs.h>
 #include <X11/Shell.h>
 #undef SHORT_FILENAMES /* hack.h will reset via global.h if necessary */
 #endif
 
+#define X11_BUILD
 #include "hack.h"
+#undef X11_BUILD
+
 #include "winX.h"
 #include "dlb.h"
 #include "xwindow.h"
index ba9258fddfc806c89b53b2c2f13db46ebb01ecd3..550b81fe60bec2b8abd9129c8aa710794ce2b2c9 100644 (file)
@@ -34,8 +34,9 @@
 #endif
 
 #define X11_BUILD
-
 #include "hack.h"
+#undef X11_BUILD
+
 #include "winX.h"
 
 static void menu_size_change_handler(Widget, XtPointer, XEvent *,
index 8c193e43a296e9f2f9729fc9cb514245dc2343ae..f4d0b28af164493fda397b3218bf92628905c55d 100644 (file)
@@ -35,8 +35,9 @@
 #endif
 
 #define X11_BUILD
-
 #include "hack.h"
+#undef X11_BUILD
+
 #include "func_tab.h"
 #include "winX.h"
 
index 724222ebcbdac71adc55c319bd40bf36a12009ab..291ed81f32580b74b99f295c680968ef13b37bf5 100644 (file)
@@ -29,8 +29,9 @@
 #endif
 
 #define X11_BUILD
-
 #include "hack.h"
+#undef X11_BUILD
+
 #include "winX.h"
 #include "xwindow.h"