1 /* __MSDOS__ set when compiling for DOS (not Windows)
2 * _Windows set when compiling for any version of Microsoft Windows
3 * __WIN32__ set when compiling for Windows95 or WindowsNT (32 bit mode)
4 * __32BIT__ set when compiling in 32-bit "flat" mode (DOS or Windows)
6 * Copyright 1998-2005, ITB CompuPhase, The Netherlands.
13 /* Every compiler uses different "default" macros to indicate the mode
14 * it is in. Throughout the source, we use the Borland C++ macros, so
15 * the macros of Watcom C/C++ and Microsoft Visual C/C++ are mapped to
16 * those of Borland C++.
18 #if defined(__WATCOMC__)
19 # if defined(__WINDOWS__) || defined(__NT__)
25 # if defined(_Windows) && defined(__32BIT__)
28 #elif defined(_MSC_VER)
29 # if defined(_WINDOWS) || defined(_WIN32)
37 # if !defined _CRT_SECURE_NO_DEPRECATE
38 # define _CRT_SECURE_NO_DEPRECATE
40 # define strdup _strdup
41 # define stricmp _stricmp
42 # define access _access
44 # define strdup _strdup
45 # define unlink _unlink
49 #if defined __FreeBSD__
50 #include <sys/endian.h>
55 /* Linux NOW has these */
56 #if !defined BIG_ENDIAN
57 #define BIG_ENDIAN 4321
59 #if !defined LITTLE_ENDIAN
60 #define LITTLE_ENDIAN 1234
63 /* educated guess, BYTE_ORDER is undefined, i386 is common => little endian */
64 #if !defined BYTE_ORDER
66 #define BYTE_ORDER BIG_ENDIAN
68 #define BYTE_ORDER LITTLE_ENDIAN
72 #if defined __MSDOS__ || defined __WIN32__ || defined _Windows
73 #define DIRSEP_CHAR '\\'
74 #elif defined macintosh
75 #define DIRSEP_CHAR ':'
77 #define DIRSEP_CHAR '/' /* directory separator character */
80 /* _MAX_PATH is sometimes called differently and it may be in limits.h or
81 * stdlib.h instead of stdio.h.
83 #if !defined _MAX_PATH
84 /* not defined, perhaps stdio.h was not included */
88 #if !defined _MAX_PATH && !defined PATH_MAX
89 /* no _MAX_PATH and no MAX_PATH, perhaps it is in limits.h */
92 #if !defined _MAX_PATH && !defined PATH_MAX
93 /* no _MAX_PATH and no MAX_PATH, perhaps it is in stdlib.h */
96 /* if _MAX_PATH is undefined, try common alternative names */
97 #if !defined _MAX_PATH
99 #define _MAX_PATH MAX_PATH
100 #elif defined _POSIX_PATH_MAX
101 #define _MAX_PATH _POSIX_PATH_MAX
103 /* everything failed, actually we have a problem here... */
104 #define _MAX_PATH 1024
109 #endif /* _OSDEFS_H */