]> git.saurik.com Git - bison.git/blame_incremental - src/system.h
* bison.s1: Formatting and cosmetics changes.
[bison.git] / src / system.h
... / ...
CommitLineData
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(HAVE_UNISTD_H)
23#include <unistd.h>
24#endif
25
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 */
43
44#if defined(STDC_HEADERS) || defined(HAVE_CTYPE_H)
45#include <ctype.h>
46#endif
47
48#ifdef HAVE_LOCALE_H
49# include <locale.h>
50#endif
51#ifndef HAVE_SETLOCALE
52# define setlocale(Category, Locale)
53#endif
54
55#ifdef ENABLE_NLS
56# include <libintl.h>
57# define _(Text) gettext (Text)
58#else
59# undef bindtextdomain
60# define bindtextdomain(Domain, Directory)
61# undef textdomain
62# define textdomain(Domain)
63# define _(Text) Text
64#endif
65#define N_(Text) Text
66
67#ifndef LOCALEDIR
68#define LOCALEDIR "/usr/local/share/locale"
69#endif
70
71#endif /* BISON_SYSTEM_H */