]> git.saurik.com Git - bison.git/blobdiff - src/system.h
Adjust.
[bison.git] / src / system.h
index ff05bc82e9857d3988fe2a7af2ca0860499116ca..b66f70aaf317c3d1355f6d04234c601f1bfbedad 100644 (file)
 
 #include <assert.h>
 
-#ifdef MSDOS
-# include <io.h>
-#endif
-
-#ifdef _MSC_VER
-# include <stdlib.h>
-# include <process.h>
-# define getpid _getpid
-#endif
-
 #if HAVE_STDLIB_H
 # include <stdlib.h>
 #endif
@@ -62,9 +52,6 @@
 # if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
 #  include <memory.h>
 # endif /* not STDC_HEADERS and HAVE_MEMORY_H */
-# ifndef bcopy
-#  define bcopy(src, dst, num) memcpy((dst), (src), (num))
-# endif
 #else /* not STDC_HEADERS and not HAVE_STRING_H */
 # include <strings.h>
 /* memory.h and strings.h conflict on some systems.  */
@@ -94,14 +81,19 @@ char *alloca ();
 # endif
 #endif
 
-#if PROTOTYPES
-# define PARAMS(p) p
-#else
-# define PARAMS(p) ()
+#ifndef PARAMS
+# if defined PROTOTYPES || defined __STDC__
+#  define PARAMS(Args) Args
+# else
+#  define PARAMS(Args) ()
+# endif
 #endif
 
 # include "xalloc.h"
 
+/* From xstrndup.c.  */
+char *xstrndup PARAMS ((const char *s, size_t n));
+
 /*---------------------.
 | Missing prototypes.  |
 `---------------------*/
@@ -110,14 +102,30 @@ char *alloca ();
 char *stpcpy PARAMS ((char *dest, const char *src));
 #endif
 
+#if !HAVE_DECL_STRCHR
+char *strchr(const char *s, int c);
+#endif
+
 #if !HAVE_DECL_STRNDUP
 char *strndup PARAMS ((const char *s, size_t size));
 #endif
 
+#if !HAVE_DECL_STRSPN
+size_t strspn(const char *s, const char *accept);
+#endif
+
 #if !HAVE_DECL_STRNLEN
 size_t strnlen PARAMS ((const char *s, size_t maxlen));
 #endif
 
+#if !HAVE_DECL_MEMCHR
+void *memchr PARAMS ((const void *s, int c, size_t n));
+#endif
+
+#if !HAVE_DECL_MEMRCHR
+void *memrchr PARAMS ((const void *s, int c, size_t n));
+#endif
+
 
 
 /*-----------------.
@@ -126,7 +134,8 @@ size_t strnlen PARAMS ((const char *s, size_t maxlen));
 
 #ifndef __attribute__
 /* This feature is available in gcc versions 2.5 and later.  */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
+# if !defined (__GNUC__) || __GNUC__ < 2 || \
+(__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
 #  define __attribute__(Spec) /* empty */
 # endif
 /* The __-protected variants of `format' and `printf' attributes
@@ -149,7 +158,7 @@ size_t strnlen PARAMS ((const char *s, size_t maxlen));
 # define setlocale(Category, Locale)
 #endif
 
-#include "intl/libgettext.h"
+#include "libgettext.h"
 #define _(Msgid)  gettext (Msgid)
 #define N_(Msgid) (Msgid)
 
@@ -307,4 +316,4 @@ do {                                                \
 #  include <dmalloc.h>
 # endif /* WITH_DMALLOC */
 
-#endif  /* BISON_SYSTEM_H */
+#endif  /* BISON_SYSTEM_H */