Patch from Shigeya Suzuki to fix BSD/OS 3.1 build failure.
authorJim Wilson <wilson@cygnus.com>
Tue, 28 Apr 1998 21:13:26 +0000 (21:13 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 28 Apr 1998 21:13:26 +0000 (14:13 -0700)
* ginclude/stddef.h: Add check for _MACHINE_ANSI_H_ for BSD/OS
when undefining macros at the end.

From-SVN: r19472

gcc/ChangeLog
gcc/ginclude/stddef.h

index ca79fe8..2ae95fb 100644 (file)
@@ -1,5 +1,8 @@
 Tue Apr 28 17:53:33 1998  Jim Wilson  <wilson@cygnus.com>
 
+       * ginclude/stddef.h: Add check for _MACHINE_ANSI_H_ for BSD/OS
+       when undefining macros at the end.
+
        * expr.c (expand_builtin, case BUILT_IN_MEMSET): Break if either
        val or len has TREE_SIDE_EFFECTS set.
 
index 0fb5743..615052e 100644 (file)
@@ -284,7 +284,9 @@ typedef __WINT_TYPE__ wint_t;
 
 /*  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
     are already defined.  */
-#ifdef _ANSI_H_
+/*  BSD/OS 3.1 requires the MACHINE_ANSI_H check here.  FreeBSD 2.x apparently
+    does not, even though there is a check for MACHINE_ANSI_H above.  */
+#if defined(_ANSI_H_) || (defined(__bsdi__) && defined(_MACHINE_ANSI_H_))
 /*  The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_
     are probably typos and should be removed before 2.8 is released.  */
 #ifdef _GCC_PTRDIFF_T_
@@ -312,7 +314,7 @@ typedef __WINT_TYPE__ wint_t;
 #undef _WCHAR_T_
 #undef _BSD_WCHAR_T_
 #endif
-#endif /* _ANSI_H_ */
+#endif /* _ANSI_H_ || ( __bsdi__ && _MACHINE_ANSI_H_ ) */
 
 #endif /* __sys_stdtypes_h */