comparison dmd/mars.h @ 1195:e961851fb8be

Merged DMD 1.042.
author Tomas Lindquist Olsen <tomas.l.olsen gmail.com>
date Fri, 03 Apr 2009 17:59:34 +0200
parents e40c65bd8c5d
children 29d3861aa2da
comparison
equal deleted inserted replaced
1194:1853dcd9b944 1195:e961851fb8be
55 55
56 There are currently no macros for byte endianness order. 56 There are currently no macros for byte endianness order.
57 */ 57 */
58 58
59 59
60 #include <stdio.h>
60 #include <stdint.h> 61 #include <stdint.h>
61 #include <stdarg.h> 62 #include <stdarg.h>
62 #include <stddef.h> 63 #include <stddef.h>
63 #define __STDC_FORMAT_MACROS 1 64 #define __STDC_FORMAT_MACROS 1
64 #include <inttypes.h> 65 #include <inttypes.h>
75 /* Changes for the GDC compiler by David Friedman */ 76 /* Changes for the GDC compiler by David Friedman */
76 #endif 77 #endif
77 78
78 #define DMDV2 0 // Version 2.0 features 79 #define DMDV2 0 // Version 2.0 features
79 #define BREAKABI 1 // 0 if not ready to break the ABI just yet 80 #define BREAKABI 1 // 0 if not ready to break the ABI just yet
80 #define STRUCTTHISREF V2 // if 'this' for struct is a reference, not a pointer 81 #define STRUCTTHISREF DMDV2 // if 'this' for struct is a reference, not a pointer
82 #define SNAN_DEFAULT_INIT DMDV2 // if floats are default initialized to signalling NaN
81 83
82 /* Other targets are TARGET_LINUX and TARGET_OSX, which are 84 /* Other targets are TARGET_LINUX and TARGET_OSX, which are
83 * set on the command line via the compiler makefile. 85 * set on the command line via the compiler makefile.
84 */ 86 */
85 87
259 * Apparently, VC has dropped support for these? 261 * Apparently, VC has dropped support for these?
260 */ 262 */
261 #define WINDOWS_SEH (_WIN32 && __DMC__) 263 #define WINDOWS_SEH (_WIN32 && __DMC__)
262 264
263 265
264 #if __GNUC__
265 //#define memicmp strncasecmp
266 //#define stricmp strcasecmp
267 #endif
268
269 #ifdef __DMC__ 266 #ifdef __DMC__
270 typedef _Complex long double complex_t; 267 typedef _Complex long double complex_t;
271 #else 268 #else
272 #ifndef IN_GCC 269 #ifndef IN_GCC
273 #include "complex_t.h" 270 #include "complex_t.h"
274 #endif 271 #endif
275 #ifdef __APPLE__ 272 #ifdef __APPLE__
276 //#include "complex.h"//This causes problems with include the c++ <complex> and not the C "complex.h" 273 //#include "complex.h"//This causes problems with include the c++ <complex> and not the C "complex.h"
277 #define integer_t dmd_integer_t
278 #endif 274 #endif
279 #endif 275 #endif
280 276
281 // Be careful not to care about sign when using integer_t 277 // Be careful not to care about sign when using dinteger_t
282 typedef uint64_t integer_t; 278 //typedef uint64_t integer_t;
279 typedef uint64_t dinteger_t; // use this instead of integer_t to
280 // avoid conflicts with system #include's
283 281
284 // Signed and unsigned variants 282 // Signed and unsigned variants
285 typedef int64_t sinteger_t; 283 typedef int64_t sinteger_t;
286 typedef uint64_t uinteger_t; 284 typedef uint64_t uinteger_t;
287 285