1 /* sswf_config.h V1.0 -- written by Alexis WILKE for Made to Order Software Corp. (c) 2002-2009 */
2 #ifndef SSWF_CONFIG_H
3 #define	SSWF_CONFIG_H
4 
5 /*
6 
7 Copyright (c) 2002-2009 Made to Order Software Corp.
8 
9 Permission is hereby granted, free of charge, to any
10 person obtaining a copy of this software and
11 associated documentation files (the "Software"), to
12 deal in the Software without restriction, including
13 without limitation the rights to use, copy, modify,
14 merge, publish, distribute, sublicense, and/or sell
15 copies of the Software, and to permit persons to whom
16 the Software is furnished to do so, subject to the
17 following conditions:
18 
19 The above copyright notice and this permission notice
20 shall be included in all copies or substantial
21 portions of the Software.
22 
23 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
24 ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
25 LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
26 FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
27 EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28 LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
29 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
30 ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32 SOFTWARE.
33 
34 */
35 
36 /** \file
37  *
38  * \brief This file defines configuration information
39  *
40  * The intend was to offer a way to configure the
41  * library for different platform via this file.
42  *
43  * The reality is a bit more like defining different
44  * types which can be used in the software whatever
45  * the system in use is.
46  */
47 
48 
49 #include	"sswf/libsswf-version.h"
50 
51 
52 /*
53  * defines whether %lc in format string should use
54  * wchar_t or wint_t (set to 0 or 1)
55  */
56 #define	USE_WCHAR_T	1
57 
58 
59 /*
60  * when the cbrt() isn't available, set the following
61  * to zero
62  */
63 #define	HAS_CBRT	1
64 
65 
66 /*
67  * Apparently, MS-Windows doesn't offer a cbrt() [it's
68  * probably well hidden]
69  */
70 #ifdef _WIN32
71 #undef	HAS_CBRT
72 #define	HAS_CBRT	0
73 #endif
74 
75 
76 /* at this time we know that the cbrt() function
77  * isn't directly available on MinGW
78  */
79 #if defined(__MINGW32__) || defined(_MSVC)
80 #undef	HAS_CBRT
81 #define	HAS_CBRT	0
82 #ifndef LITTLE_ENDIAN
83 #define LITTLE_ENDIAN	0x03020100
84 #endif
85 #ifndef BIG_ENDIAN
86 #define BIG_ENDIAN	0x00010203
87 #endif
88 #ifndef BYTE_ORDER
89 // I assume little endian on MS-Windows!
90 // This is balently wrong since it also runs on PowerPC, MIPS, etc.
91 #define BYTE_ORDER	LITTLE_ENDIAN
92 #endif
93 #endif
94 
95 #if _MSVC
96 typedef	__int8			int8_t;
97 typedef	unsigned __int8		uint8_t;
98 typedef	__int16			int16_t;
99 typedef	unsigned __int16	uint16_t;
100 typedef	__int32			int32_t;
101 typedef	unsigned __int32	uint32_t;
102 typedef	__int64			int64_t;
103 typedef	unsigned __int64	uint64_t;
104 #elif IRIX
105 #include	<inttypes.h>
106 #else
107 #include	<stdint.h>
108 #endif
109 
110 #if USE_WCHAR_T
111 typedef	wchar_t		wc_t;
112 #else
113 typedef	wint_t		wc_t;
114 #endif
115 
116 #if defined(_MSVC)
117 #pragma warning(disable: 4996)
118 #endif
119 
120 #endif			/* #ifndef SSWF_CONFIG_H */
121