2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
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)
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
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
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.
27 #ifndef config_INCLUDED
28 #define config_INCLUDED 1
30 #define SP_INCLUDE_UNISTD_H
31 #define SP_POSIX_FILENAMES
34 // It's not missing, but it pulls in libg++
35 #define SP_NEW_H_MISSING
36 // set_new_handler() has to be declared extern "C"
37 #define SP_SET_NEW_HANDLER_EXTERN_C
38 #ifndef SP_MANUAL_INST
39 #define SP_MANUAL_INST
41 #ifndef SP_ANSI_CLASS_INST
42 #define SP_ANSI_CLASS_INST
47 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
48 #define SP_ANSI_FOR_SCOPE
53 #if defined(sun) || defined(__sun)
54 // struct stat has st_blksize member
55 #define SP_STAT_BLKSIZE
60 #undef SP_POSIX_FILENAMES
61 #define SP_MSDOS_FILENAMES
65 // Microsoft Visual C++ 4.0
66 #undef SP_INCLUDE_UNISTD_H
67 #define SP_INCLUDE_IO_H
68 #ifndef SP_ANSI_CLASS_INST
69 #define SP_ANSI_CLASS_INST
71 #undef SP_POSIX_FILENAMES
72 #define SP_MSDOS_FILENAMES
73 #define SP_SHORT_HEADERS
74 #pragma warning ( disable : 4660 ) // already instantiated
75 #pragma warning ( disable : 4661 ) // missing def for decl member
76 #pragma warning ( disable : 4786 ) // debug symbol truncated (>255 chars)
77 #pragma warning ( disable : 4018 ) // signed/unsigned mismatch
78 #pragma warning ( disable : 4251 ) // __declspec(dllexport)
79 #pragma warning ( disable : 4275 )
80 #pragma warning ( disable : 4237 ) // future reserved keyword
83 #define SP_DECLARE_PLACEMENT_OPERATOR_NEW
85 #define set_new_handler _set_new_handler
86 // Function passed to set_new_handler() returns int and takes size_t argument.
87 #define SP_FANCY_NEW_HANDLER
89 #define SP_HAVE_SETMODE
90 #define SP_DLLEXPORT __declspec(dllexport)
91 #define SP_DLLIMPORT __declspec(dllimport)
99 // It's not possible to export templates using __declspec(dllexport),
100 // so instead we include the template definitions in the headers,
101 // which allows Visual C++ to instantiate any needed templates
103 #define SP_DEFINE_TEMPLATES
105 #endif /* SP_USE_DLL */
107 #ifndef SP_MANUAL_INST
108 #ifndef SP_DEFINE_TEMPLATES
109 #define SP_MANUAL_INST
111 #endif /* not SP_MANUAL_INST */
113 // Make sure both _UNICODE and UNICODE are defined if either is.
118 #endif /* not UNICODE */
119 #endif /* _UNICODE */
124 #endif /* not _UNICODE */
128 #define SP_WIDE_SYSTEM
131 // wchar_t's base type is an unsigned short
132 #define SP_WCHAR_T_USHORT
134 // Enable precompiled header support.
136 // Don't compile in message text.
137 #define SP_NO_MESSAGE_TEXT
138 #endif /* _MSC_VER */
142 #define SP_MANUAL_INST
143 #undef SP_POSIX_FILENAMES
144 #define SP_MSDOS_FILENAMES
145 #undef SP_INCLUDE_UNISTD_H
146 #define SP_INCLUDE_IO_H
147 #pragma warning 004 9
149 // Cannot handle T::~T in template.
150 #define SP_QUAL_TEMPLATE_DTOR_BROKEN
151 #define SP_HAVE_SETMODE
152 #define _setmode setmode
153 #if __WATCOMC__ < 1050
154 #define _O_BINARY O_BINARY
156 #define SP_WCHAR_T_USHORT
157 #endif /* __WATCOMC__ */
161 #define SP_ANSI_FOR_SCOPE
163 #define SP_HAVE_SETMODE
164 #undef SP_INCLUDE_UNISTD_H
165 #define SP_INCLUDE_IO_H
166 #undef SP_POSIX_FILENAMES
167 #define SP_MSDOS_FILENAMES
169 #define SP_SHORT_HEADERS
170 #define _O_BINARY O_BINARY
171 #define _setmode setmode
172 #define SP_ANSI_CLASS_INST
173 #define SP_MANUAL_INST
174 // Building as a DLL doesn't work with Borland C++ yet.
175 #define SP_DLLEXPORT __declspec(dllexport)
176 #define SP_DLLIMPORT __declspec(dllimport)
179 #define SP_DEFINE_TEMPLATES
181 #endif /* SP_USE_DLL */
182 #define SP_WCHAR_T_USHORT
183 #endif /* __BORLANDC__ */
186 // IBM CSet++ 2.1 from Horst Szillat <szillat@berlin.snafu.de>.
187 #undef SP_POSIX_FILENAMES
188 #define SP_MANUAL_INST
189 #define SP_SHORT_HEADERS
190 #define SP_MSDOS_FILENAMES
191 #undef SP_INCLUDE_UNISTD_H
192 #define SP_INCLUDE_IO_H
193 #define S_IFMT (S_IFDIR|S_IFCHR|S_IFREG)
196 #ifndef SP_ANSI_FOR_SCOPE
197 // This simulates the new ANSI "for" scope rules
198 #define for if (0); else for
202 #define SP_DLLEXPORT /* as nothing */
206 #define SP_DLLIMPORT /* as nothing */
212 #define SP_API SP_DLLEXPORT
214 #define SP_API SP_DLLIMPORT
217 #else /* not SP_USE_DLL */
219 #define SP_API /* as nothing */
221 #endif /* not SP_USE_DLL */
223 // SP_WIDE_SYSTEM says that your OS provides wide character interfaces
224 // SP_WIDE_SYSTEM currently works only with Visual C++ and Windows NT
225 // SP_WIDE_SYSTEM implies SP_MULTI_BYTE
226 #ifdef SP_WIDE_SYSTEM
227 #define SP_MULTI_BYTE
231 #define SP_NAMESPACE_SCOPE SP_NAMESPACE::
233 #define SP_NAMESPACE_SCOPE
236 #endif /* not config_INCLUDED */