AIf we have config.h, we should actually include it!!
authorH. Peter Anvin <hpa@zytor.com>
Fri, 13 Apr 2007 20:06:41 +0000 (20:06 +0000)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 13 Apr 2007 20:06:41 +0000 (20:06 +0000)
Apparently configure was generating config.h, and nothing ever actually
included it.  Include it in nasm.h as well as compiler.h, and in
rdoff/rdlar.h which uses these macros.

There appears to be no use of HAVE_* macros in any file that doesn't
have nasm.h included; in fact, so far the only use has been in
rdoff/rdlar.h.

compiler.h
nasm.h
rdoff/rdlar.h

index 0e59f52..b3f77c9 100644 (file)
  */
 
 #ifndef COMPILER_H
-#define COMPILER_H
+#define COMPILER_H 1
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #ifdef __GNUC__
 # if __GNUC__ >= 4
@@ -33,4 +37,4 @@
 # define _unused
 #endif
 
-#endif
+#endif /* COMPILER_H */
diff --git a/nasm.h b/nasm.h
index 274a912..7be8298 100644 (file)
--- a/nasm.h
+++ b/nasm.h
 #include <inttypes.h>
 #include "version.h"            /* generated NASM version macros */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #ifndef NULL
 #define NULL 0
 #endif
index 0232398..f3bec13 100644 (file)
@@ -6,6 +6,7 @@
 #define RDOFF_RDLAR_H 1
 
 #include <inttypes.h>
+#include "config.h"
 
 /* For non-POSIX operating systems */
 #ifndef HAVE_GETUID