1 #ifndef KLUDGE_H 2 #define KLUDGE_H 3 4 /* 5 * Kludges for not-quite-ANSI systems. 6 * This should always be the last file included, because it may 7 * mess up some system header files. 8 */ 9 10 /* 11 * Some compilers complain about #if FOO if FOO isn't defined, 12 * so do the ANSI-mandated thing explicitly... 13 */ 14 #ifndef NO_STDLIB_H 15 #define NO_STDLIB_H 0 16 #endif 17 18 #ifndef NO_MEMMOVE 19 #define NO_MEMMOVE 0 20 #endif 21 #if NO_MEMMOVE /* memove() not in libraries */ 22 #define memmove(dest,src,len) bcopy(src,dest,len) 23 #endif 24 25 #ifndef NO_MEMCPY 26 #define NO_MEMCPY 0 27 #endif 28 #if NO_MEMCPY /* memcpy() not in libraries */ 29 #define memcpy(dest,src,len) bcopy(src,dest,len) 30 #endif 31 32 /* 33 * Borland C seems to think that it's a bad idea to decleare a 34 * structure tag and not declare the contents. I happen to think 35 * it's a *good* idea to use such "opaque" structures wherever 36 * possible. So shut up. 37 */ 38 #ifdef __BORLANDC__ 39 #pragma warn -stu 40 #ifndef MSDOS 41 #define MSDOS 1 42 #endif 43 #endif 44 45 /* Turn off warning about negation of unsigned values */ 46 #ifdef _MSC_VER 47 #pragma warning(disable:4146) 48 #endif 49 50 /* Cope with people forgetting to define the OS, if possible... */ 51 #ifndef MSDOS 52 #ifdef __MSDOS 53 #define MSDOS 1 54 #endif 55 #endif 56 #ifndef MSDOS 57 #ifdef __MSDOS__ 58 #define MSDOS 1 59 #endif 60 #endif 61 62 /* By MS-DOS, we mean 16-bit brain-dead MS-DOS. Not GCC & GO32 */ 63 #ifdef __GO32 64 #undef MSDOS 65 #endif 66 #ifdef __GO32__ 67 #undef MSDOS 68 #endif 69 70 #endif /* KLUDGE_H */ 71