]>
Commit | Line | Data |
---|---|---|
d968a24b JT |
1 | #ifndef BISON_SYSTEM_H |
2 | #define BISON_SYSTEM_H | |
3 | ||
4 | #ifdef HAVE_CONFIG_H | |
5 | # include <config.h> | |
6 | #endif | |
7 | ||
5fcfb6e7 RS |
8 | #ifdef MSDOS |
9 | #include <io.h> | |
10 | #endif | |
11 | ||
d36e30d8 RS |
12 | #ifdef _MSC_VER |
13 | #include <stdlib.h> | |
14 | #include <process.h> | |
15 | #define getpid _getpid | |
16 | #endif | |
17 | ||
5fcfb6e7 RS |
18 | #if defined(HAVE_STDLIB_H) || defined(MSDOS) |
19 | #include <stdlib.h> | |
20 | #endif | |
21 | ||
7bb4d914 JT |
22 | #if defined(HAVE_UNISTD_H) |
23 | #include <unistd.h> | |
24 | #endif | |
25 | ||
5fcfb6e7 RS |
26 | #if (defined(VMS) || defined(MSDOS)) && !defined(HAVE_STRING_H) |
27 | #define HAVE_STRING_H 1 | |
28 | #endif | |
29 | ||
30 | #if defined(STDC_HEADERS) || defined(HAVE_STRING_H) | |
31 | #include <string.h> | |
32 | /* An ANSI string.h and pre-ANSI memory.h might conflict. */ | |
33 | #if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H) | |
34 | #include <memory.h> | |
35 | #endif /* not STDC_HEADERS and HAVE_MEMORY_H */ | |
36 | #ifndef bcopy | |
37 | #define bcopy(src, dst, num) memcpy((dst), (src), (num)) | |
38 | #endif | |
39 | #else /* not STDC_HEADERS and not HAVE_STRING_H */ | |
40 | #include <strings.h> | |
41 | /* memory.h and strings.h conflict on some systems. */ | |
42 | #endif /* not STDC_HEADERS and not HAVE_STRING_H */ | |
f2d78a99 | 43 | |
7bb4d914 JT |
44 | #if defined(STDC_HEADERS) || defined(HAVE_CTYPE_H) |
45 | #include <ctype.h> | |
46 | #endif | |
47 | ||
48 | #ifdef HAVE_LOCALE_H | |
f2d78a99 RS |
49 | # include <locale.h> |
50 | #endif | |
7bb4d914 | 51 | #ifndef HAVE_SETLOCALE |
f2d78a99 RS |
52 | # define setlocale(Category, Locale) |
53 | #endif | |
54 | ||
7bb4d914 | 55 | #ifdef ENABLE_NLS |
f2d78a99 RS |
56 | # include <libintl.h> |
57 | # define _(Text) gettext (Text) | |
58 | #else | |
59 | # define bindtextdomain(Domain, Directory) | |
60 | # define textdomain(Domain) | |
61 | # define _(Text) Text | |
62 | #endif | |
63 | #define N_(Text) Text | |
64 | ||
65 | /* In the meantime, waiting for Automake. */ | |
f2d78a99 | 66 | #define LOCALEDIR "/usr/local/share/locale" |
d968a24b JT |
67 | |
68 | #endif /* BISON_SYSTEM_H */ |