Tweak includes to fix non-defined NULL on some systems.
authorWayne Davison <wayned@samba.org>
Mon, 1 Aug 2011 06:31:17 +0000 (23:31 -0700)
committerWayne Davison <wayned@samba.org>
Mon, 1 Aug 2011 06:31:24 +0000 (23:31 -0700)
lib/snprintf.c

index dd72f3e8b44439b3dd831fd74a93cbcefea5464f..c17868f04f76e3c702817bbfd8e1a68b8a81366f 100644 (file)
@@ -37,7 +37,7 @@
  *    which showed it, so that's been fixed.  Also, formated the code
  *    to mutt conventions, and removed dead code left over from the
  *    original.  Also, there is now a builtin-test, just compile with:
- *           gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
+ *           gcc -I.. -DTEST_SNPRINTF -o snprintf snprintf.c -lm
  *    and run snprintf for results.
  * 
  *  Thomas Roessler <roessler@guug.de> 01/27/98 for mutt 0.89i
  *
  **************************************************************/
 
-#include "../config.h"
+#include "config.h"
 
 #ifdef TEST_SNPRINTF /* need math library headers for testing */
 
  void dummy_snprintf(void) {} 
 #endif /* HAVE_SNPRINTF, etc */
 
+#ifdef STDC_HEADERS
+#include <stddef.h>
+#endif
+
 #ifdef HAVE_LONG_DOUBLE
 #define LDOUBLE long double
 #else