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 libraries 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
33 #if defined(__GNUG__) || defined(__SunOS)
34 // It's not missing, but it pulls in libg++
35 #if !defined(__linux__) && !defined(CSRG_BASED) && !defined(sun)
36 #define SP_NEW_H_MISSING
37 // set_new_handler() has to be declared extern "C"
38 #define SP_SET_NEW_HANDLER_EXTERN_C
40 #ifndef SP_MANUAL_INST
41 #define SP_MANUAL_INST
43 #ifndef SP_ANSI_CLASS_INST
44 #define SP_ANSI_CLASS_INST
49 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
50 #define SP_ANSI_FOR_SCOPE
55 #if defined(sun) || defined(__sun)
56 // struct stat has st_blksize member
57 #define SP_STAT_BLKSIZE
62 #undef SP_POSIX_FILENAMES
63 #define SP_MSDOS_FILENAMES
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
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
85 #define SP_DECLARE_PLACEMENT_OPERATOR_NEW
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
91 #define SP_HAVE_SETMODE
92 #define SP_DLLEXPORT __declspec(dllexport)
93 #define SP_DLLIMPORT __declspec(dllimport)
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
105 #define SP_DEFINE_TEMPLATES
107 #endif /* SP_USE_DLL */
109 #ifndef SP_MANUAL_INST
110 #ifndef SP_DEFINE_TEMPLATES
111 #define SP_MANUAL_INST
113 #endif /* not SP_MANUAL_INST */
115 // Make sure both _UNICODE and UNICODE are defined if either is.
120 #endif /* not UNICODE */
121 #endif /* _UNICODE */
126 #endif /* not _UNICODE */
130 #define SP_WIDE_SYSTEM
133 // wchar_t's base type is an unsigned short
134 #define SP_WCHAR_T_USHORT
136 // Enable precompiled header support.
138 // Don't compile in message text.
139 #define SP_NO_MESSAGE_TEXT
140 #endif /* _MSC_VER */
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
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
158 #define SP_WCHAR_T_USHORT
159 #endif /* __WATCOMC__ */
163 #define SP_ANSI_FOR_SCOPE
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
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)
181 #define SP_DEFINE_TEMPLATES
183 #endif /* SP_USE_DLL */
184 #define SP_WCHAR_T_USHORT
185 #endif /* __BORLANDC__ */
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)
198 #ifndef SP_ANSI_FOR_SCOPE
199 // This simulates the new ANSI "for" scope rules
200 #define for if (0); else for
204 #define SP_DLLEXPORT /* as nothing */
208 #define SP_DLLIMPORT /* as nothing */
214 #define SP_API SP_DLLEXPORT
216 #define SP_API SP_DLLIMPORT
219 #else /* not SP_USE_DLL */
221 #define SP_API /* as nothing */
223 #endif /* not SP_USE_DLL */
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
233 #define SP_NAMESPACE_SCOPE SP_NAMESPACE::
235 #define SP_NAMESPACE_SCOPE
238 #endif /* not config_INCLUDED */