projects
/
bison.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(nullable_compute): Use abort rather than assert.
[bison.git]
/
src
/
system.h
diff --git
a/src/system.h
b/src/system.h
index 002fa810ba70a22b2bfd8bd4606e7555a7e06e86..e297f608cacdde8aa4401339e94a6c2599f16128 100644
(file)
--- a/
src/system.h
+++ b/
src/system.h
@@
-18,7
+18,7
@@
#ifndef BISON_SYSTEM_H
#define BISON_SYSTEM_H
#ifndef BISON_SYSTEM_H
#define BISON_SYSTEM_H
-#if
def
HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include <config.h>
#endif
# include <config.h>
#endif
@@
-43,6
+43,10
@@
char *alloca ();
#include <assert.h>
#include <assert.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
@@
-75,10
+79,6
@@
char *alloca ();
#endif /* not STDC_HEADERS and not HAVE_STRING_H */
#include <errno.h>
#endif /* not STDC_HEADERS and not HAVE_STRING_H */
#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
#include <limits.h>
# include "xalloc.h"
#include <limits.h>
# include "xalloc.h"
@@
-99,27
+99,27
@@
extern int time_report;
| Missing prototypes. |
`---------------------*/
| Missing prototypes. |
`---------------------*/
-#if !HAVE_DECL_STPCPY
+#if
defined HAVE_DECL_STPCPY &&
!HAVE_DECL_STPCPY
char *stpcpy (char *dest, const char *src);
#endif
char *stpcpy (char *dest, const char *src);
#endif
-#if !HAVE_DECL_STRCHR
+#if
defined HAVE_DECL_STRCHR &&
!HAVE_DECL_STRCHR
char *strchr (const char *s, int c);
#endif
char *strchr (const char *s, int c);
#endif
-#if !HAVE_DECL_STRSPN
+#if
defined HAVE_DECL_STRSPN &&
!HAVE_DECL_STRSPN
size_t strspn (const char *s, const char *accept);
#endif
size_t strspn (const char *s, const char *accept);
#endif
-#if !HAVE_DECL_STRNLEN
+#if
defined HAVE_DECL_STRNLEN &&
!HAVE_DECL_STRNLEN
size_t strnlen (const char *s, size_t maxlen);
#endif
size_t strnlen (const char *s, size_t maxlen);
#endif
-#if !HAVE_DECL_MEMCHR
+#if
defined HAVE_DECL_MEMCHR &&
!HAVE_DECL_MEMCHR
void *memchr (const void *s, int c, size_t n);
#endif
void *memchr (const void *s, int c, size_t n);
#endif
-#if !HAVE_DECL_MEMRCHR
+#if
defined HAVE_DECL_MEMRCHR &&
!HAVE_DECL_MEMRCHR
void *memrchr (const void *s, int c, size_t n);
#endif
void *memrchr (const void *s, int c, size_t n);
#endif
@@
-129,6
+129,14
@@
void *memrchr (const void *s, int c, size_t n);
| GCC extensions. |
`-----------------*/
| GCC extensions. |
`-----------------*/
+/* Use this to suppress gcc's `...may be used before initialized'
+ warnings. */
+#ifdef lint
+# define IF_LINT(Code) Code
+#else
+# define IF_LINT(Code) /* empty */
+#endif
+
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if !defined (__GNUC__) || __GNUC__ < 2 || \
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if !defined (__GNUC__) || __GNUC__ < 2 || \
@@
-156,10
+164,10
@@
void *memrchr (const void *s, int c, size_t n);
| NLS. |
`------*/
| NLS. |
`------*/
-#if
def
HAVE_LOCALE_H
+#if HAVE_LOCALE_H
# include <locale.h>
#endif
# include <locale.h>
#endif
-#if
ndef
HAVE_SETLOCALE
+#if
!
HAVE_SETLOCALE
# define setlocale(Category, Locale)
#endif
# define setlocale(Category, Locale)
#endif
@@
-181,11
+189,11
@@
void *memrchr (const void *s, int c, size_t n);
| Booleans. |
`-----------*/
| Booleans. |
`-----------*/
-#ifndef TRUE
-# define TRUE (1)
-# define FALSE (0)
+#if HAVE_STDBOOL_H
+# include <stdbool.h>
+#else
+typedef enum {false = 0, true = 1} bool;
#endif
#endif
-typedef int bool;
/*-----------.
/*-----------.