software/stddef.h: c++ compat for NULL
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 23 Mar 2013 23:17:42 +0000 (00:17 +0100)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Sat, 23 Mar 2013 23:17:42 +0000 (00:17 +0100)
software/include/base/stddef.h

index 331f39e7c654130af225cbb3015eef1dd658878a..6f00c4fa7b435a9339ce421dad7862dc5bdb9028 100644 (file)
@@ -1,7 +1,11 @@
 #ifndef __STDDEF_H
 #define __STDDEF_H
 
+#ifdef __cplusplus
+#define NULL 0
+#else
 #define NULL ((void *)0)
+#endif
 
 typedef unsigned long size_t;
 typedef long ptrdiff_t;