Debian Codegraph @

save/custom.h

raw
1 #ifndef CUSTOM_H_DEFINED_
2 #define CUSTOM_H_DEFINED_
3
4 /***********************************************************************
5 This file is included by config.h, but is not part of that file
6 because it must be protected from autoconf twiddling. Its purpose is
7 to provide workarounds for limitations of autoconf.
8 ***********************************************************************/
9
10 /* Make a preliminary sanity check on which pattern matching we will use */
11
12 #if defined(HAVE_REGEXP)
13 #if defined(HAVE_RECOMP) || defined(HAVE_PATTERNS) || defined(HAVE_OLDCODE)
14 ?? Define only one of HAVE_OLDCODE, HAVE_PATTERNS, HAVE_REGEXP, and HAVE_RECOMP
15 #endif
16 #endif
17
18 #if defined(HAVE_RECOMP)
19 #if defined(HAVE_REGEXP) || defined(HAVE_PATTERNS) || defined(HAVE_OLDCODE)
20 ?? Define only one of HAVE_OLDCODE, HAVE_PATTERNS, HAVE_REGEXP, and HAVE_RECOMP
21 #endif
22 #endif
23
24 #if defined(HAVE_PATTERNS)
25 #if defined(HAVE_RECOMP) || defined(HAVE_REGEXP) || defined(HAVE_OLDCODE)
26 ?? Define only one of HAVE_OLDCODE, HAVE_PATTERNS, HAVE_REGEXP, and HAVE_RECOMP
27 #endif
28 #endif
29
30 #if defined(HAVE_OLDCODE)
31 #if defined(HAVE_PATTERNS) || defined(HAVE_RECOMP) || defined(HAVE_REGEXP)
32 ?? Define only one of HAVE_OLDCODE, HAVE_PATTERNS, HAVE_REGEXP, and HAVE_RECOMP
33 #endif
34 #endif
35
36 #if !(defined(HAVE_REGEXP) || defined(HAVE_RECOMP))
37 #if !(defined(HAVE_PATTERNS) || defined(HAVE_OLDCODE))
38 #define HAVE_PATTERNS 1
39 #endif
40 #endif
41
42 /* Ensure that only ONE of HAVE_TERMIOS_H, HAVE_TERMIO_H, and HAVE_SGTTY_H
43 is defined, with preference in that order */
44
45 #if defined(HAVE_TERMIOS_H)
46 #undef HAVE_TERMIO_H
47 #undef HAVE_SGTTY_H
48 #else
49 #if defined(HAVE_TERMIO_H)
50 #undef HAVE_TERMIOS_H
51 #undef HAVE_SGTTY_H
52 #endif
53 #endif /* defined(HAVE_TERMIOS_H) */
54
55 #if !defined(HAVE_TERMIOS_H) && !defined(HAVE_TERMIO_H) && !defined(HAVE_SGTTY_H)
56 #if defined(sun)
57 /* Sun acc compiler produces warnings from inclusion of <sgtty.h>, causing
58 configure to conclude that it is not available */
59 #define HAVE_SGTTY_H 1
60 #endif
61 #endif
62
63 #if (defined(__LCC__) || defined(__cplusplus) || defined(c_plusplus))
64 /* lcc is a strictly Standard C conforming compiler. However, because
65 of an lcc 3.4b header file bug on Sun Solaris 2.x, configure will
66 conclude that STDC_HEADERS and HAVE_STDC should NOT be defined. We
67 therefore override any choices made in config.h.
68
69 If a C++ compiler is used, override possibly erroneous conclusions
70 made by configure about header files and prototypes. */
71
72 #undef STDC_HEADERS
73 #define STDC_HEADERS 1
74
75 #undef HAVE_STDC
76 #define HAVE_STDC 1
77 #endif
78
79 #undef ARGS
80 #define ARGS(plist) plist
81
82 #define RCSID(s) /*@unused@*/ static char rcsid[] = s;
83
84 #undef VOID
85 #define VOID void
86
87 /* Although Microsoft C 6.0 and 7.0 define _MSC_VER, compiler versions
88 5.0 and 5.1 do not, so the only distinguishing symbol left is M_I86,
89 which Watcom C unfortunately also defines, sigh... */
90
91 #if defined(M_I86) && !defined(__WATCOMC__)
92 #define CONST /* bug workaround for IBM PC Microsoft C compilers */
93 #else
94 #define CONST const
95 #endif
96
97 #include "xstdio.h"
98
99 #if defined(_WIN32)
100 #define OS_PCDOS 1
101 #define OS_UNIX 0
102 #define OS_VAXVMS 0
103 #elif defined(_VMS)
104 #define OS_PCDOS 0
105 #define OS_UNIX 0
106 #define OS_VAXVMS 1
107 #else
108 #define OS_PCDOS 0
109 #define OS_UNIX 1
110 #define OS_VAXVMS 0
111 #endif
112
113 #if OS_PCDOS
114
115 #define SEP_COMP " ;,|" /* separators between filename components */
116 #define SEP_PATH "\\" /* separators between directory path and filename */
117
118 #elif OS_UNIX
119
120 #define SEP_COMP " ;:,|" /* separators between filename components */
121 #define SEP_PATH "/" /* separators between directory path and filename */
122
123 #elif OS_VAXVMS
124
125 #define SEP_COMP " ;,|" /* separators between filename components */
126 #define SEP_PATH ":]" /* separators between directory path and filename */
127 /* first char is what we default to */
128 #endif
129
130 #if defined(FREE_CAST_IS_CHAR_STAR)
131 #define FREE(p) free((char*)(p))
132 #else
133 #define FREE(p) free((void*)(p))
134 #endif
135
136 #define IN_SET(set, c) (strchr((set), (int)(c)) != (char *)NULL)
137
138 /***********************************************************************
139 Put any other local customizations here, when configure does not
140 automatically generate the config.h settings that you want. Please
141 report them back to the package author, <[email protected]>, for
142 inclusion in future releases.
143 ***********************************************************************/
144
145 #endif /* CUSTOM_H_DEFINED_ */