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