=== modified file 'compat/types.h'
--- compat/types.h	2012-10-08 05:21:11 +0000
+++ compat/types.h	2014-01-20 14:07:08 +0000
@@ -124,39 +124,42 @@
 // NP: configure checks for support of %zu and defines where possible
 #if SIZEOF_SIZE_T == 4 && _SQUID_MINGW_
 #define PRIuSIZE "I32u"
 #elif SIZEOF_SIZE_T == 4
 #define PRIuSIZE "u"
 #elif SIZEOF_SIZE_T == 8 && _SQUID_MINGW_
 #define PRIuSIZE "I64u"
 #elif SIZEOF_SIZE_T == 8
 #define PRIuSIZE "lu"
 #else
 #error size_t is not 32-bit or 64-bit
 #endif
 #endif /* PRIuSIZE */
 
 #ifndef HAVE_MODE_T
 typedef unsigned short mode_t;
 #endif
 
 #ifndef HAVE_FD_MASK
 typedef unsigned long fd_mask;
 #endif
 
 #ifndef HAVE_SOCKLEN_T
 typedef int socklen_t;
 #endif
 
 #ifndef HAVE_MTYP_T
 typedef long mtyp_t;
 #endif
 
-#ifndef NULL
 #if defined(__cplusplus) && HAVE_NULLPTR
+#ifdef NULL
+#undef NULL
+#endif /* NULL */
 #define NULL nullptr
-#else
+#else /* defined(__cplusplus) && HAVE_NULLPTR */
+#ifndef NULL
 #define NULL 0
-#endif
-#endif
+#endif /* NULL */
+#endif /* defined(__cplusplus) && HAVE_NULLPTR */
 
 #endif /* SQUID_TYPES_H */

