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