include/begin_code.h
changeset 288 2f5a6062db86
parent 274 051b991765ba
child 297 f6ffac90895c
     1.1 --- a/include/begin_code.h	Wed Feb 27 16:15:34 2002 +0000
     1.2 +++ b/include/begin_code.h	Thu Feb 28 00:28:26 2002 +0000
     1.3 @@ -67,7 +67,7 @@
     1.4     packing set to an alternate value, say for loading structures from disk.
     1.5     The packing is reset to the previous value in close_code.h
     1.6   */
     1.7 -#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__WATCOMC__) || defined(__BORLANDC__)
     1.8 +#if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__)
     1.9  #ifdef _MSC_VER
    1.10  #pragma warning(disable: 4103)
    1.11  #endif
    1.12 @@ -86,8 +86,12 @@
    1.13  #define SDL_INLINE_OKAY
    1.14  #else
    1.15  /* Add any special compiler-specific cases here */
    1.16 -#if defined(_MSC_VER) || defined(__BORLANDC__)
    1.17 +#if defined(_MSC_VER) || defined(__BORLANDC__) || \
    1.18 +    defined(__DMC__) || defined(__SC__) || \
    1.19 +    defined(__WATCOMC__) || defined(__LCC__)
    1.20 +#ifndef __inline__
    1.21  #define __inline__	__inline
    1.22 +#endif
    1.23  #define SDL_INLINE_OKAY
    1.24  #else
    1.25  #if !defined(__MRC__) && !defined(_SGI_SOURCE)
    1.26 @@ -106,3 +110,11 @@
    1.27  #define __inline__
    1.28  #endif
    1.29  
    1.30 +/* Apparently this is needed by several Windows compilers */
    1.31 +#ifndef NULL
    1.32 +#ifdef __cplusplus
    1.33 +#define NULL 0
    1.34 +#else
    1.35 +#define NULL ((void *)0)
    1.36 +#endif
    1.37 +#endif /* NULL */