# define UCHAR_MAX INTTYPE_MAXIMUM (unsigned char)
#endif
-#ifndef SSIZE_MAX
-# define SSIZE_MAX INTTYPE_MAXIMUM (ssize_t)
-#endif
-
#ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
# endif
#endif
-#ifndef bcmp
-# ifdef HAVE_BCMP
-# if defined (HAVE_DECL_BCMP) && !HAVE_DECL_BCMP
-extern int bcmp PARAMS ((const PTR, const PTR, size_t));
-# endif
-# else /* ! HAVE_BCMP */
-# define bcmp(left,right,len) memcmp ((left),(right),(len))
-# endif
-#endif
-
-#ifndef bzero
-# ifdef HAVE_BZERO
-# if defined (HAVE_DECL_BZERO) && !HAVE_DECL_BZERO
-extern void bzero PARAMS ((PTR, size_t));
-# endif
-# else /* ! HAVE_BZERO */
-# define bzero(dst,len) memset ((dst),0,(len))
-# endif
-#endif
-
-#ifndef index
-# ifdef HAVE_INDEX
-# if defined (HAVE_DECL_INDEX) && !HAVE_DECL_INDEX
-extern char *index PARAMS ((const char *, int));
-# endif
-# else /* ! HAVE_INDEX */
-# define index strchr
-# endif
-#endif
-
-#ifndef rindex
-# ifdef HAVE_RINDEX
-# if defined (HAVE_DECL_RINDEX) && !HAVE_DECL_RINDEX
-extern char *rindex PARAMS ((const char *, int));
-# endif
-# else /* ! HAVE_RINDEX */
-# define rindex strrchr
-# endif
-#endif
-
#if defined (HAVE_DECL_ATOF) && !HAVE_DECL_ATOF
extern double atof PARAMS ((const char *));
#endif
extern char *getenv PARAMS ((const char *));
#endif
+#if defined (HAVE_DECL_GETOPT) && !HAVE_DECL_GETOPT
+extern int getopt PARAMS ((int, char **, char *));
+#endif
+
#if defined (HAVE_DECL_GETWD) && !HAVE_DECL_GETWD
extern char *getwd PARAMS ((char *));
#endif
/* If the system doesn't provide strsignal, we get it defined in
libiberty but no declaration is supplied. */
-#if defined (HAVE_DECL_STRSIGNAL) && !HAVE_DECL_STRSIGNAL
+#ifndef HAVE_STRSIGNAL
# ifndef strsignal
extern const char *strsignal PARAMS ((int));
# endif
extern void abort PARAMS ((void));
#endif
+/* 1 if we have C99 designated initializers. */
+#define HAVE_DESIGNATED_INITIALIZERS \
+ ((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L))
+
/* Define a STRINGIFY macro that's right for ANSI or traditional C.
Note: if the argument passed to STRINGIFY is itself a macro, eg
#define foo bar, STRINGIFY(foo) will produce "foo", not "bar".
#define ONLY_INT_FIELDS 0
#endif
+/* Provide a default for the HOST_BIT_BUCKET.
+ This suffices for POSIX-like hosts. */
+
+#ifndef HOST_BIT_BUCKET
+#define HOST_BIT_BUCKET "/dev/null"
+#endif
+
/* Enumerated bitfields are safe to use unless we've been explictly told
otherwise or if they are signed. */
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
+/* Traditional C cannot initialize union members of structs. Provide
+ a macro which expands appropriately to handle it. This only works
+ if you intend to initalize the union member to zero since it relies
+ on default initialization to zero in the traditional C case. */
+#ifdef __STDC__
+#define UNION_INIT_ZERO , {0}
+#else
+#define UNION_INIT_ZERO
+#endif
+
+/* GCC now gives implicit declaration warnings for undeclared builtins. */
+#if defined(__GNUC__) && defined (__SIZE_TYPE__)
+extern void *alloca (__SIZE_TYPE__);
+#endif
+
+/* Various error reporting routines want to use __FUNCTION__. */
+#if (GCC_VERSION < 2007)
+#ifndef __FUNCTION__
+#define __FUNCTION__ "?"
+#endif /* ! __FUNCTION__ */
+#endif
+
#endif /* __GCC_SYSTEM_H__ */