]>
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 | |
3e2bf5ad | 59 | # undef bindtextdomain |
f2d78a99 | 60 | # define bindtextdomain(Domain, Directory) |
3e2bf5ad | 61 | # undef textdomain |
f2d78a99 RS |
62 | # define textdomain(Domain) |
63 | # define _(Text) Text | |
64 | #endif | |
65 | #define N_(Text) Text | |
66 | ||
8a278a04 | 67 | #ifndef LOCALEDIR |
f2d78a99 | 68 | #define LOCALEDIR "/usr/local/share/locale" |
8a278a04 | 69 | #endif |
d968a24b JT |
70 | |
71 | #endif /* BISON_SYSTEM_H */ |