shithub: openh264

Download patch

ref: f252acf8a5d86dccc8a7ea5789c95c30eb26e5c1
parent: 33a1209a21a9b38eafc5f26bb6543c8b4c9b75ba
author: Martin Storsjö <[email protected]>
date: Thu Jan 23 13:42:03 EST 2014

Remove fallback defines for NULL

No actual (supported) compiler lacks a definition for NULL, and it
is mandated to be present in stddef.h according to the C89 standard.

--- a/codec/common/typedefs.h
+++ b/codec/common/typedefs.h
@@ -35,6 +35,7 @@
 #define WELS_TYPE_DEFINES_H__
 
 #include <limits.h>
+#include <stddef.h>
 
 ////////////////////////////////////////////////////////////////////////////
 // NOTICE : ALL internal implement MUST use the data type defined as below
@@ -66,10 +67,6 @@
 #undef EPSN
 #endif//EPSN
 #define EPSN	  (0.000001f) // (1e-6)	// desired float precision
-
-#ifndef NULL
-#define NULL 0
-#endif
 
 typedef bool bool_t;
 typedef int32_t BOOL_T;
--- a/codec/processing/src/common/typedef.h
+++ b/codec/processing/src/common/typedef.h
@@ -50,9 +50,8 @@
 #define WELSVP_NAMESPACE_BEGIN      namespace nsWelsVP {
 #define WELSVP_NAMESPACE_END        }
 
-#ifdef _MSC_VER
 #include <stddef.h>
-#else
+#ifndef _MSC_VER
 #include <stdint.h>
 #endif
 
@@ -80,10 +79,6 @@
 #if defined(_WIN32) || defined(_MACH_PLATFORM) || defined(__GNUC__)
 typedef float   float_t  ;
 typedef double  double_t ;
-#endif
-
-#ifndef NULL
-#define NULL    0
 #endif
 
 enum {