From: Erwin Janssen Date: Thu, 5 Jan 2017 23:59:09 +0000 (+0100) Subject: Made vmalloc a static library on Windows X-Git-Tag: 2.42.0~213^2~2^2~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6e79d2fe0ac267d1a8c56e699aeb0e73044046c5;p=graphviz Made vmalloc a static library on Windows vmalloc is a static library with the Autotools build, but was for some reason a dynamic library on Windows. Since Autotools is considered the default, this commit makes vmalloc a static library on Windows as well. To disable the function export that is required for a dynamic library, but not for a static one, various define checks were removed. --- diff --git a/graphviz.sln b/graphviz.sln index 70580060c..0b4552148 100644 --- a/graphviz.sln +++ b/graphviz.sln @@ -43,6 +43,9 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vpsc", "lib\vpsc\vpsc.vcxproj", "{2F5A730B-132C-4319-A1B3-DCBE05E2E1B1}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gvpr", "cmd\gvpr\gvpr.vcxproj", "{397C6B2C-B305-4CB2-B8CE-2366B508AB7C}" + ProjectSection(ProjectDependencies) = postProject + {D6FD0DE5-5305-458E-8CA5-FCA4B8E05B04} = {D6FD0DE5-5305-458E-8CA5-FCA4B8E05B04} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ingraphs", "lib\ingraphs\ingraphs.vcxproj", "{D6FD0DE5-5305-458E-8CA5-FCA4B8E05B04}" EndProject diff --git a/lib/vmalloc/vmalloc.h b/lib/vmalloc/vmalloc.h index 0864da960..1f5674a01 100644 --- a/lib/vmalloc/vmalloc.h +++ b/lib/vmalloc/vmalloc.h @@ -101,25 +101,8 @@ extern "C" { #define VM_BADADDR 3 /* bad addr in vmfree/vmresize */ #define VM_DISC 4 /* discipline being changed */ -/* public data */ -#if _BLD_vmalloc && defined(__EXPORT__) -#define extern __EXPORT__ -#endif -#if !_BLD_vmalloc && defined(__IMPORT__) -#define extern __IMPORT__ -#endif -/*visual studio*/ -#ifdef WIN32 -#undef extern -#ifndef VMALLOC_EXPORTS -#define extern __declspec(dllimport) -#else -#define extern __declspec(dllexport) -#endif -#endif -/*end visual studio*/ - extern Vmethod_t *Vmbest; /* best allocation */ + extern Vmethod_t *Vmbest; /* best allocation */ extern Vmethod_t *Vmlast; /* last-block allocation */ extern Vmethod_t *Vmpool; /* pool allocation */ extern Vmethod_t *Vmdebug; /* allocation with debugging */ @@ -131,11 +114,7 @@ extern "C" { extern Vmalloc_t *Vmheap; /* heap region */ extern Vmalloc_t *Vmregion; /* malloc region */ -/* public functions */ -#if _BLD_vmalloc && defined(__EXPORT__) -#define extern __EXPORT__ -#endif - extern Vmalloc_t *vmopen(Vmdisc_t *, Vmethod_t *, int); + extern Vmalloc_t *vmopen(Vmdisc_t *, Vmethod_t *, int); extern int vmclose(Vmalloc_t *); extern int vmclear(Vmalloc_t *); extern int vmcompact(Vmalloc_t *); @@ -170,8 +149,6 @@ extern "C" { extern char *vmstrdup(Vmalloc_t *, const char *); -#undef extern - /* to coerce any value to a Vmalloc_t*, make ANSI happy */ #define _VM_(vm) ((Vmalloc_t*)(vm)) /* enable recording of where a call originates from */ diff --git a/lib/vmalloc/vmalloc.vcxproj b/lib/vmalloc/vmalloc.vcxproj index b3fbe8a2a..1d80d104f 100644 --- a/lib/vmalloc/vmalloc.vcxproj +++ b/lib/vmalloc/vmalloc.vcxproj @@ -18,11 +18,11 @@ - DynamicLibrary + StaticLibrary v140 - DynamicLibrary + StaticLibrary v140 @@ -52,7 +52,7 @@ Disabled $(SolutionDir)windows\include;%(AdditionalIncludeDirectories) - WIN32_DLL;VMALLOC_EXPORTS;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -69,11 +69,14 @@ MachineX86 + + Console + $(SolutionDir)windows\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;VMALLOC_EXPORTS;WIN32_DLL;MSWIN32;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;MSWIN32;%(PreprocessorDefinitions) false MultiThreaded @@ -85,6 +88,9 @@ No + + Console +