summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorPeter Johnson <peter@tortall.net>2003-05-03 08:02:15 +0000
committerPeter Johnson <peter@tortall.net>2003-05-03 08:02:15 +0000
commitf381195dc14aaa04accf9b56380e2d3ddc1abab5 (patch)
tree0f0d1a9c8e175fbf3c53ca58a2ca1e31fa13c214 /util.h
parent6755374824d4e38446cb4db2a38c247004cc4054 (diff)
downloadyasm-f381195dc14aaa04accf9b56380e2d3ddc1abab5.tar.gz
Undefine __STRICT__ANSI__ when compiling with gcc -ansi and glibc to avoid many
spurious compiler warnings. svn path=/trunk/yasm/; revision=924
Diffstat (limited to 'util.h')
-rw-r--r--util.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/util.h b/util.h
index ca3e2623..e77fcc5e 100644
--- a/util.h
+++ b/util.h
@@ -29,8 +29,6 @@
#ifndef YASM_UTIL_H
#define YASM_UTIL_H
-#include <stdio.h>
-
#ifdef YASM_LIB_INTERNAL
# define YASM_INTERNAL
# define YASM_AUTOCONF_INTERNAL
@@ -39,10 +37,24 @@
#endif
#ifdef YASM_INTERNAL
-# include <stdarg.h>
#if defined(YASM_LIB_AC_INTERNAL) && defined(HAVE_CONFIG_H)
# include <libyasm/config.h>
+
+/* Work around glibc's non-defining of certain things when using gcc -ansi */
+# if defined(HAVE_GNU_C_LIBRARY) && defined(__STRICT_ANSI__)
+# undef __STRICT_ANSI__
+# endif
+#endif
+
+#endif
+
+#include <stdio.h>
+
+#ifdef YASM_INTERNAL
+
+#if defined(YASM_LIB_AC_INTERNAL) && defined(HAVE_CONFIG_H)
+# include <stdarg.h>
#endif
#if !defined(lint) && !defined(NDEBUG)