]> granicus.if.org Git - graphviz/commitdiff
minor preprocessor changes for MinGW
authorglenlow <devnull@localhost>
Fri, 22 Feb 2008 14:21:42 +0000 (14:21 +0000)
committerglenlow <devnull@localhost>
Fri, 22 Feb 2008 14:21:42 +0000 (14:21 +0000)
lib/vmalloc/malloc.c
lib/vmalloc/vmbest.c

index 8448af4f122fe9eebfbcdb9b2638b6eeec98fe31..508277ace55266bc5a7fede7fbd92784239a59c4 100644 (file)
@@ -44,7 +44,7 @@ int _STUB_malloc;
 #endif
 #endif
 
-#ifdef S_IRUSR
+#if defined(S_IRUSR)&&defined(S_IWUSR)&&defined(S_IRGRP)&&defined(S_IROTH)
 #define CREAT_MODE     (S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)
 #else
 #define CREAT_MODE     0644
@@ -363,6 +363,9 @@ reg size_t size;
 
 #include       <malloc.h>
 
+/* in Windows, this is a macro defined in malloc.h and not a function */
+#undef alloca
+
 #if _lib_mallopt
 #if __STD_C
 int mallopt(int cmd, int value)
index f345b69023c63b300e273858fa89c2751e2e5f33..71a643f5201372fa05b105a8662b822a8da9aa57 100644 (file)
 
 #include       "vmhdr.h"
 
+/* for VirtualAlloc and friends */
+#if defined(_WIN32)
+#include <windows.h>
+#endif
+
 /*     Best-fit allocation method. This is based on a best-fit strategy
 **     using a splay tree for storage of lists of free blocks of the same
 **     size. Recent free blocks may be cached for fast reuse.