check if malloc.h is present before including it
authorArun Persaud <apersaud@lbl.gov>
Mon, 4 Apr 2011 03:23:49 +0000 (20:23 -0700)
committerArun Persaud <apersaud@lbl.gov>
Mon, 4 Apr 2011 03:23:49 +0000 (20:23 -0700)
OS X 10.6 doesn't have malloc.h, so it complained.

engineoutput.c
history.c

index 00859bf..8509f1a 100644 (file)
 #include "config.h"
 
 #include <stdio.h>
+
+#if HAVE_MALLOC_H
 #include <malloc.h>
+#endif
 
 #if STDC_HEADERS
 # include <stdlib.h>
index 109c9fb..b6c63ad 100644 (file)
--- a/history.c
+++ b/history.c
@@ -28,7 +28,9 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#if HAVE_MALLOC_H
 #include <malloc.h>
+#endif
 #include <string.h>
 
 #include "common.h"