Don't use fstat for readable pipe chars in dtexec.
[oweals/cde.git] / cde / programs / nsgmls / config.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: config.h /main/1 1996/07/29 17:08:30 cde-hp $ */
24 // Copyright (c) 1994 James Clark
25 // See the file COPYING for copying permission.
26
27 #ifndef config_INCLUDED
28 #define config_INCLUDED 1
29
30 #define SP_INCLUDE_UNISTD_H
31 #define SP_POSIX_FILENAMES
32
33 #ifdef __GNUG__
34 // It's not missing, but it pulls in libg++
35 #if !defined(linux) && !defined(CSRG_BASED)
36 #define SP_NEW_H_MISSING
37 // set_new_handler() has to be declared extern "C"
38 #define SP_SET_NEW_HANDLER_EXTERN_C
39 #endif
40 #ifndef SP_MANUAL_INST
41 #define SP_MANUAL_INST
42 #endif
43 #ifndef SP_ANSI_CLASS_INST
44 #define SP_ANSI_CLASS_INST
45 #endif
46 #ifndef SP_HAVE_BOOL
47 #define SP_HAVE_BOOL
48 #endif
49 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
50 #define SP_ANSI_FOR_SCOPE
51 #endif
52
53 #endif /* __GNUG__ */
54
55 #if defined(sun) || defined(__sun)
56 // struct stat has st_blksize member
57 #define SP_STAT_BLKSIZE
58 #endif
59
60 #ifdef __EMX__
61 // EMX 0.9a for OS/2
62 #undef SP_POSIX_FILENAMES
63 #define SP_MSDOS_FILENAMES
64 #endif
65
66 #ifdef _MSC_VER
67 // Microsoft Visual C++ 4.0
68 #undef SP_INCLUDE_UNISTD_H
69 #define SP_INCLUDE_IO_H
70 #ifndef SP_ANSI_CLASS_INST
71 #define SP_ANSI_CLASS_INST
72 #endif
73 #undef SP_POSIX_FILENAMES
74 #define SP_MSDOS_FILENAMES
75 #define SP_SHORT_HEADERS
76 #pragma warning ( disable : 4660 ) // already instantiated
77 #pragma warning ( disable : 4661 ) // missing def for decl member
78 #pragma warning ( disable : 4786 ) // debug symbol truncated (>255 chars)
79 #pragma warning ( disable : 4018 ) // signed/unsigned mismatch
80 #pragma warning ( disable : 4251 ) // __declspec(dllexport)
81 #pragma warning ( disable : 4275 )
82 #pragma warning ( disable : 4237 ) // future reserved keyword
83 #define huge verybig
84 #if _MSC_VER == 900
85 #define SP_DECLARE_PLACEMENT_OPERATOR_NEW
86 #endif
87 #define set_new_handler _set_new_handler
88 // Function passed to set_new_handler() returns int and takes size_t argument.
89 #define SP_FANCY_NEW_HANDLER
90
91 #define SP_HAVE_SETMODE
92 #define SP_DLLEXPORT __declspec(dllexport)
93 #define SP_DLLIMPORT __declspec(dllimport)
94
95 #ifdef _DLL
96 #define SP_USE_DLL
97 #endif
98
99 #ifdef SP_USE_DLL
100 #ifndef BUILD_LIBSP
101 // It's not possible to export templates using __declspec(dllexport),
102 // so instead we include the template definitions in the headers,
103 // which allows Visual C++ to instantiate any needed templates
104 // in the client.
105 #define SP_DEFINE_TEMPLATES
106 #endif
107 #endif /* SP_USE_DLL */
108
109 #ifndef SP_MANUAL_INST
110 #ifndef SP_DEFINE_TEMPLATES
111 #define SP_MANUAL_INST
112 #endif
113 #endif /* not SP_MANUAL_INST */
114
115 // Make sure both _UNICODE and UNICODE are defined if either is.
116
117 #ifdef _UNICODE
118 #ifndef UNICODE
119 #define UNICODE
120 #endif /* not UNICODE */
121 #endif /* _UNICODE */
122
123 #ifdef UNICODE
124 #ifndef _UNICODE
125 #define _UNICODE
126 #endif /* not _UNICODE */
127 #endif /* UNICODE */
128
129 #ifdef _UNICODE
130 #define SP_WIDE_SYSTEM
131 #endif
132
133 // wchar_t's base type is an unsigned short
134 #define SP_WCHAR_T_USHORT
135
136 // Enable precompiled header support.
137 #define SP_PCH
138 // Don't compile in message text.
139 #define SP_NO_MESSAGE_TEXT
140 #endif /* _MSC_VER */
141
142 #ifdef __WATCOMC__
143 // Watcom C++ 10.0a
144 #define SP_MANUAL_INST
145 #undef SP_POSIX_FILENAMES
146 #define SP_MSDOS_FILENAMES
147 #undef SP_INCLUDE_UNISTD_H
148 #define SP_INCLUDE_IO_H
149 #pragma warning 004 9
150 #undef huge
151 // Cannot handle T::~T in template.
152 #define SP_QUAL_TEMPLATE_DTOR_BROKEN
153 #define SP_HAVE_SETMODE
154 #define _setmode setmode
155 #if __WATCOMC__ < 1050
156 #define _O_BINARY O_BINARY
157 #endif
158 #define SP_WCHAR_T_USHORT
159 #endif /* __WATCOMC__ */
160
161 #ifdef __BORLANDC__
162 // Borland C++ 5.0
163 #define SP_ANSI_FOR_SCOPE
164 #define SP_HAVE_RTTI
165 #define SP_HAVE_SETMODE
166 #undef SP_INCLUDE_UNISTD_H
167 #define SP_INCLUDE_IO_H
168 #undef SP_POSIX_FILENAMES
169 #define SP_MSDOS_FILENAMES
170 #define SP_HAVE_BOOL
171 #define SP_SHORT_HEADERS
172 #define _O_BINARY O_BINARY
173 #define _setmode setmode
174 #define SP_ANSI_CLASS_INST
175 #define SP_MANUAL_INST
176 // Building as a DLL doesn't work with Borland C++ yet.
177 #define SP_DLLEXPORT __declspec(dllexport)
178 #define SP_DLLIMPORT __declspec(dllimport)
179 #ifdef SP_USE_DLL
180 #ifndef BUILD_LIBSP
181 #define SP_DEFINE_TEMPLATES
182 #endif
183 #endif /* SP_USE_DLL */
184 #define SP_WCHAR_T_USHORT
185 #endif /* __BORLANDC__ */
186
187 #ifdef __IBMCPP__
188 // IBM CSet++ 2.1 from Horst Szillat <szillat@berlin.snafu.de>.
189 #undef SP_POSIX_FILENAMES
190 #define SP_MANUAL_INST
191 #define SP_SHORT_HEADERS
192 #define SP_MSDOS_FILENAMES
193 #undef SP_INCLUDE_UNISTD_H
194 #define SP_INCLUDE_IO_H
195 #define S_IFMT (S_IFDIR|S_IFCHR|S_IFREG)
196 #endif
197
198 #ifndef SP_ANSI_FOR_SCOPE
199 // This simulates the new ANSI "for" scope rules
200 #define for if (0); else for
201 #endif
202
203 #ifndef SP_DLLEXPORT
204 #define SP_DLLEXPORT /* as nothing */
205 #endif
206
207 #ifndef SP_DLLIMPORT
208 #define SP_DLLIMPORT /* as nothing */
209 #endif
210
211 #ifdef SP_USE_DLL
212
213 #ifdef BUILD_LIBSP
214 #define SP_API SP_DLLEXPORT
215 #else
216 #define SP_API SP_DLLIMPORT
217 #endif
218
219 #else /* not SP_USE_DLL */
220
221 #define SP_API /* as nothing */
222
223 #endif /* not SP_USE_DLL */
224
225 // SP_WIDE_SYSTEM says that your OS provides wide character interfaces
226 // SP_WIDE_SYSTEM currently works only with Visual C++ and Windows NT
227 // SP_WIDE_SYSTEM implies SP_MULTI_BYTE
228 #ifdef SP_WIDE_SYSTEM
229 #define SP_MULTI_BYTE
230 #endif
231
232 #ifdef SP_NAMESPACE
233 #define SP_NAMESPACE_SCOPE SP_NAMESPACE::
234 #else
235 #define SP_NAMESPACE_SCOPE
236 #endif
237
238 #endif /* not config_INCLUDED */