1.1 --- a/sourcepawn/compiler/osdefs.h Fri Jul 11 06:51:21 2008 +0000
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,109 +0,0 @@
1.4 -/* __MSDOS__ set when compiling for DOS (not Windows)
1.5 - * _Windows set when compiling for any version of Microsoft Windows
1.6 - * __WIN32__ set when compiling for Windows95 or WindowsNT (32 bit mode)
1.7 - * __32BIT__ set when compiling in 32-bit "flat" mode (DOS or Windows)
1.8 - *
1.9 - * Copyright 1998-2005, ITB CompuPhase, The Netherlands.
1.10 - * [email protected].
1.11 - */
1.12 -
1.13 -#ifndef _OSDEFS_H
1.14 -#define _OSDEFS_H
1.15 -
1.16 -/* Every compiler uses different "default" macros to indicate the mode
1.17 - * it is in. Throughout the source, we use the Borland C++ macros, so
1.18 - * the macros of Watcom C/C++ and Microsoft Visual C/C++ are mapped to
1.19 - * those of Borland C++.
1.20 - */
1.21 -#if defined(__WATCOMC__)
1.22 -# if defined(__WINDOWS__) || defined(__NT__)
1.23 -# define _Windows 1
1.24 -# endif
1.25 -# ifdef __386__
1.26 -# define __32BIT__ 1
1.27 -# endif
1.28 -# if defined(_Windows) && defined(__32BIT__)
1.29 -# define __WIN32__ 1
1.30 -# endif
1.31 -#elif defined(_MSC_VER)
1.32 -# if defined(_WINDOWS) || defined(_WIN32)
1.33 -# define _Windows 1
1.34 -# endif
1.35 -# ifdef _WIN32
1.36 -# define __WIN32__ 1
1.37 -# define __32BIT__ 1
1.38 -# endif
1.39 -# if _MSC_VER >= 1400
1.40 -# if !defined _CRT_SECURE_NO_DEPRECATE
1.41 -# define _CRT_SECURE_NO_DEPRECATE
1.42 -# endif
1.43 -# define strdup _strdup
1.44 -# define stricmp _stricmp
1.45 -# define access _access
1.46 -# define chdir _chdir
1.47 -# define strdup _strdup
1.48 -# define unlink _unlink
1.49 -# endif
1.50 -#endif
1.51 -
1.52 -#if defined __FreeBSD__
1.53 - #include <sys/endian.h>
1.54 -#elif defined LINUX
1.55 - #include <endian.h>
1.56 -#endif
1.57 -
1.58 -/* Linux NOW has these */
1.59 -#if !defined BIG_ENDIAN
1.60 - #define BIG_ENDIAN 4321
1.61 -#endif
1.62 -#if !defined LITTLE_ENDIAN
1.63 - #define LITTLE_ENDIAN 1234
1.64 -#endif
1.65 -
1.66 -/* educated guess, BYTE_ORDER is undefined, i386 is common => little endian */
1.67 -#if !defined BYTE_ORDER
1.68 - #if defined UCLINUX
1.69 - #define BYTE_ORDER BIG_ENDIAN
1.70 - #else
1.71 - #define BYTE_ORDER LITTLE_ENDIAN
1.72 - #endif
1.73 -#endif
1.74 -
1.75 -#if defined __MSDOS__ || defined __WIN32__ || defined _Windows
1.76 - #define DIRSEP_CHAR '\\'
1.77 -#elif defined macintosh
1.78 - #define DIRSEP_CHAR ':'
1.79 -#else
1.80 - #define DIRSEP_CHAR '/' /* directory separator character */
1.81 -#endif
1.82 -
1.83 -/* _MAX_PATH is sometimes called differently and it may be in limits.h or
1.84 - * stdlib.h instead of stdio.h.
1.85 - */
1.86 -#if !defined _MAX_PATH
1.87 - /* not defined, perhaps stdio.h was not included */
1.88 - #if !defined PATH_MAX
1.89 - #include <stdio.h>
1.90 - #endif
1.91 - #if !defined _MAX_PATH && !defined PATH_MAX
1.92 - /* no _MAX_PATH and no MAX_PATH, perhaps it is in limits.h */
1.93 - #include <limits.h>
1.94 - #endif
1.95 - #if !defined _MAX_PATH && !defined PATH_MAX
1.96 - /* no _MAX_PATH and no MAX_PATH, perhaps it is in stdlib.h */
1.97 - #include <stdlib.h>
1.98 - #endif
1.99 - /* if _MAX_PATH is undefined, try common alternative names */
1.100 - #if !defined _MAX_PATH
1.101 - #if defined MAX_PATH
1.102 - #define _MAX_PATH MAX_PATH
1.103 - #elif defined _POSIX_PATH_MAX
1.104 - #define _MAX_PATH _POSIX_PATH_MAX
1.105 - #else
1.106 - /* everything failed, actually we have a problem here... */
1.107 - #define _MAX_PATH 1024
1.108 - #endif
1.109 - #endif
1.110 -#endif
1.111 -
1.112 -#endif /* _OSDEFS_H */