No actual (supported) compiler lacks a definition for NULL, and it is mandated to be present in stddef.h according to the C89 standard.
Unified · Split
| @@ -35,6 +35,7 @@ · 34 unmodified lines | |||
| 35 | #define WELS_TYPE_DEFINES_H__ | 35 | #define WELS_TYPE_DEFINES_H__ |
| 36 | 36 | ||
| 37 | #include <limits.h> | 37 | #include <limits.h> |
| 38 | #include <stddef.h> | ||
| 38 | 39 | ||
| 39 | //////////////////////////////////////////////////////////////////////////// | 40 | //////////////////////////////////////////////////////////////////////////// |
| 40 | // NOTICE : ALL internal implement MUST use the data type defined as below | 41 | // NOTICE : ALL internal implement MUST use the data type defined as below |
| @@ -67,10 +68,6 @@ typedef float real32_t; · 26 unmodified lines | |||
| 67 | #endif//EPSN | 68 | #endif//EPSN |
| 68 | #define EPSN (0.000001f) // (1e-6) // desired float precision | 69 | #define EPSN (0.000001f) // (1e-6) // desired float precision |
| 69 | 70 | ||
| 70 | #ifndef NULL | ||
| 71 | #define NULL 0 | ||
| 72 | #endif | ||
| 73 | |||
| 74 | typedef bool bool_t; | 71 | typedef bool bool_t; |
| 75 | typedef int32_t BOOL_T; | 72 | typedef int32_t BOOL_T; |
| 76 | 73 | ||
| @@ -50,9 +50,8 @@ · 49 unmodified lines | |||
| 50 | #define WELSVP_NAMESPACE_BEGIN namespace nsWelsVP { | 50 | #define WELSVP_NAMESPACE_BEGIN namespace nsWelsVP { |
| 51 | #define WELSVP_NAMESPACE_END } | 51 | #define WELSVP_NAMESPACE_END } |
| 52 | 52 | ||
| 53 | #ifdef _MSC_VER | ||
| 54 | #include <stddef.h> | 53 | #include <stddef.h> |
| 55 | #else | 54 | #ifndef _MSC_VER |
| 56 | #include <stdint.h> | 55 | #include <stdint.h> |
| 57 | #endif | 56 | #endif |
| 58 | 57 | ||
| @@ -82,10 +81,6 @@ typedef float float_t ; · 23 unmodified lines | |||
| 82 | typedef double double_t ; | 81 | typedef double double_t ; |
| 83 | #endif | 82 | #endif |
| 84 | 83 | ||
| 85 | #ifndef NULL | ||
| 86 | #define NULL 0 | ||
| 87 | #endif | ||
| 88 | |||
| 89 | enum { | 84 | enum { |
| 90 | FALSE = 0, | 85 | FALSE = 0, |
| 91 | TRUE = !FALSE | 86 | TRUE = !FALSE |