From: glenlow Date: Fri, 22 Feb 2008 14:21:42 +0000 (+0000) Subject: minor preprocessor changes for MinGW X-Git-Tag: LAST_LIBGRAPH~32^2~4715 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=86516e97e0a599ee923a1ab983f68fd9aa5f0cb5;p=graphviz minor preprocessor changes for MinGW --- diff --git a/lib/vmalloc/malloc.c b/lib/vmalloc/malloc.c index 8448af4f1..508277ace 100644 --- a/lib/vmalloc/malloc.c +++ b/lib/vmalloc/malloc.c @@ -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 +/* 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) diff --git a/lib/vmalloc/vmbest.c b/lib/vmalloc/vmbest.c index f345b6902..71a643f52 100644 --- a/lib/vmalloc/vmbest.c +++ b/lib/vmalloc/vmbest.c @@ -16,6 +16,11 @@ #include "vmhdr.h" +/* for VirtualAlloc and friends */ +#if defined(_WIN32) +#include +#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.