]> git.saurik.com Git - bison.git/blobdiff - src/system.h
* src/system.h: Use canonical definition for PARAMS (avoids clash with macro from...
[bison.git] / src / system.h
index efaf554db1e10c6016f346b93c3bffb6668d1619..52b8cf7a885c31383cd2ff195dac6e1e0f1e106b 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.  |
 `---------------------*/
@@ -127,7 +119,11 @@ size_t strnlen PARAMS ((const char *s, size_t maxlen));
 #endif
 
 #if !HAVE_DECL_MEMCHR
-void *memchr(const void *s, int c, size_t n);
+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
 
 
@@ -319,4 +315,4 @@ do {                                                \
 #  include <dmalloc.h>
 # endif /* WITH_DMALLOC */
 
-#endif  /* BISON_SYSTEM_H */
+#endif  /* BISON_SYSTEM_H */