OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / gcc / gansidecl.h
index fff81d4..4bd3bcc 100644 (file)
@@ -1,5 +1,5 @@
 /* ANSI and traditional C compatibility macros.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -22,101 +22,34 @@ Boston, MA 02111-1307, USA.  */
    in binutils and gdb releases.
    ??? Over time the two should be merged into one.  */
 
-#ifndef        ANSIDECL_H
-#define        ANSIDECL_H
-
-/* Add prototype support.  */
-#ifndef PROTO
-#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__)
-#define PROTO(ARGS) ARGS
-#else
-#define PROTO(ARGS) ()
-#endif
-#endif
-
-#ifndef VPROTO
-#ifdef __STDC__
-#define PVPROTO(ARGS)          ARGS
-#define VPROTO(ARGS)            ARGS
-#define VA_START(va_list,var)  va_start(va_list,var)
-#else
-#define PVPROTO(ARGS)          ()
-#define VPROTO(ARGS)            (va_alist) va_dcl
-#define VA_START(va_list,var)  va_start(va_list)
-#endif
-#endif
-
-/* Define a generic NULL if one hasn't already been defined.  */
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef GENERIC_PTR
-#if defined (USE_PROTOTYPES) ? USE_PROTOTYPES : defined (__STDC__)
-#define GENERIC_PTR void *
-#else
-#define GENERIC_PTR char *
-#endif
-#endif
-
-#ifndef NULL_PTR
-#define NULL_PTR ((GENERIC_PTR) 0)
-#endif
-
-#ifdef __STDC__
-
-#define        PTR void *
-
-#else
-
-#define        PTR char *
-#ifndef const
-#define const
-#endif
-
-#endif /* ! __STDC__ */
-
-#ifndef bcopy
-# ifdef HAVE_BCOPY
-#  ifdef NEED_DECLARATION_BCOPY
-void bcopy ();
-#  endif
-# else
-#  define bcopy(src,dst,len) memcpy ((dst),(src),(len))
+#ifndef        __GANSIDECL_H__
+#define        __GANSIDECL_H__
+
+#include "ansidecl.h"
+
+/* Autoconf will possibly define the `inline' or `const' keywords as
+   macros, however this is only valid for the stage1 compiler.  If we
+   detect a modern version of gcc, unconditionally reset the values.
+   This makes sure the right thing happens in stage2 and later.  We
+   need to do this very early; i.e. before any systems header files or
+   gcc header files in case they use these keywords.  Otherwise
+   conflicts might occur. */
+#if (GCC_VERSION >= 2007)
+# undef const
+# undef inline
+# define inline __inline__  /* Modern gcc can use `__inline__' freely. */
+# ifndef HAVE_LONG_DOUBLE
+#  define HAVE_LONG_DOUBLE 1
 # endif
-#endif
-
-#ifndef bzero
-# ifdef HAVE_BZERO
-#  ifdef NEED_DECLARATION_BZERO
-void bzero ();
-#  endif
-# else
-#  define bzero(dst,len) memset ((dst),0,(len))
-# endif
-#endif
+/* Assume that (non-traditional) gcc used in stage2 or later has the
+   stringize feature.  */
+# if !defined (HAVE_STRINGIZE) && __STDC__
+#  define HAVE_STRINGIZE 1
+# endif /* ! HAVE_STRINGIZE && __STDC__ */
+#endif /* GCC >= 2.7 */
 
-#ifndef bcmp
-# ifdef HAVE_BCMP
-#  ifdef NEED_DECLARATION_BCMP
-int bcmp ();
-#  endif
-# else
-#  define bcmp(left,right,len) memcmp ((left),(right),(len))
-# endif
-#endif
-
-#ifndef HAVE_RINDEX
-# ifndef rindex
-#  define rindex strrchr
-# endif
-#endif
-
-#ifndef HAVE_INDEX
-# ifndef index
-#  define index strchr
-# endif
+#ifndef NULL_PTR
+#define NULL_PTR ((PTR) 0)
 #endif
 
-#endif /* ANSIDECL_H */
+#endif /* __GANSIDECL_H__ */