summaryrefslogtreecommitdiff
path: root/flexdef.h
diff options
context:
space:
mode:
authorWill Estes <wlestes@users.sourceforge.net>2002-08-29 20:30:24 +0000
committerWill Estes <wlestes@users.sourceforge.net>2002-08-29 20:30:24 +0000
commit75e418c498ca2c604eeb784829e33a7865843d53 (patch)
tree4983b0101ff8d7f9f82b5e2e8a0a4a9c90cb1fb7 /flexdef.h
parent1cb69bc4c72ae209d115f7d7957cc1142c92c0dc (diff)
#include fixes; we've factored out all the system include files and put them in flexdef.h
Diffstat (limited to 'flexdef.h')
-rw-r--r--flexdef.h61
1 files changed, 48 insertions, 13 deletions
diff --git a/flexdef.h b/flexdef.h
index 6a47bac..e23b627 100644
--- a/flexdef.h
+++ b/flexdef.h
@@ -34,38 +34,73 @@
#ifndef FLEXDEF_H
#define FLEXDEF_H 1
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef STDC_HEADERS
#include <stdio.h>
+#include <stdlib.h>
+#include <setjmp.h>
+#include <ctype.h>
+#include <string.h>
+#endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
-#include <ctype.h>
-#include <limits.h>
-#include <setjmp.h>
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
+#ifndef HAVE_INTTYPES_H_WITH_UINTMAX
+/* Exact integral types. */
+
+/* Signed. */
+
+#ifndef __int8_t_defined
+# define __int8_t_defined
+typedef signed char int8_t;
+typedef short int int16_t;
+typedef int int32_t;
+# if __WORDSIZE == 64
+typedef long int int64_t;
+# else
+__extension__
+typedef long long int int64_t;
+# endif
#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
+/* Unsigned. */
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned int uint32_t;
+#if __WORDSIZE == 64
+typedef unsigned long int uint64_t;
#else
-#include <strings.h>
+__extension__
+typedef unsigned long long int uint64_t;
#endif
+#endif /* ! HAVE_INTTYPES_H_WITH_UINTMAX */
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
-
-#ifdef STDC_HEADERS
-#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
#endif
+/* We use gettext. So, when we write strings which should be translated, we mark them with _() */
+#ifdef ENABLE_NLS
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif /* HAVE_LOCALE_H */
#include "gettext.h"
#define _(String) gettext (String)
+#else
+#define _(STRING) STRING
+#endif /* ENABLE_NLS */
/* Always be prepared to generate an 8-bit scanner. */
#define CSIZE 256