]> granicus.if.org Git - yasm/commitdiff
Avoid warnings in strsep due to glibc's bits/string2.h string inlining by
authorPeter Johnson <peter@tortall.net>
Sat, 12 Jul 2003 19:44:30 +0000 (19:44 -0000)
committerPeter Johnson <peter@tortall.net>
Sat, 12 Jul 2003 19:44:30 +0000 (19:44 -0000)
defining __NO_STRING_INLINES in strsep.c.  Due to string.h inclusion in
util.h, extra level of indirection is needed
(NO_STRING_INLINES->__NO_STRING_INLINES).

svn path=/trunk/yasm/; revision=1004

libyasm/strsep.c
util.h

index f0dbc11fe8006bad0fd7b9279928fdda340bad93..9ff9899f357e5ccd5aa8fbb635be7db4a3a8457c 100644 (file)
@@ -29,6 +29,7 @@
  * SUCH DAMAGE.
  */
 #define YASM_LIB_INTERNAL
+#define NO_STRING_INLINES
 #include "util.h"
 /*@unused@*/ RCSID("$IdPath$");
 
diff --git a/util.h b/util.h
index b1ac67709fc22323681f7fcf1e9bb0536b8fe1d2..f7c0968ff21a314e0681ffb02b6d194872438475 100644 (file)
--- a/util.h
+++ b/util.h
 #include <config.h>
 #endif
 
+#ifdef HAVE_GNU_C_LIBRARY
+
 /* 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__
+# ifdef __STRICT_ANSI__
+#  undef __STRICT_ANSI__
+# endif
+
+/* Work around glibc's string inlines (in bits/string2.h) if needed */
+# ifdef NO_STRING_INLINES
+#  define __NO_STRING_INLINES
+# endif
+
 #endif
 
 #if !defined(lint) && !defined(NDEBUG)