Commit 7646b20b authored by Mark Lindner's avatar Mark Lindner

Fix Windows build issues.

Only tested with Visual C++ 2008.
parent da68ce75
......@@ -57,6 +57,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Shlwapi.lib"
OutputFile="$(OutDir)\$(ProjectName)_d.dll"
LinkIncremental="2"
GenerateDebugInformation="true"
......@@ -127,6 +128,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Shlwapi.lib"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
......@@ -188,6 +190,14 @@
RelativePath=".\strbuf.c"
>
</File>
<File
RelativePath=".\strvec.c"
>
</File>
<File
RelativePath=".\util.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
......@@ -226,6 +236,18 @@
RelativePath=".\win32\stdint.h"
>
</File>
<File
RelativePath=".\strbuf.h"
>
</File>
<File
RelativePath=".\strvec.h"
>
</File>
<File
RelativePath=".\util.h"
>
</File>
<File
RelativePath=".\wincompat.h"
>
......
......@@ -54,6 +54,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Shlwapi.lib"
OutputFile="$(OutDir)\$(ProjectName)_d.dll"
GenerateDebugInformation="true"
GenerateMapFile="true"
......@@ -121,6 +122,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Shlwapi.lib"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
/>
......@@ -175,6 +177,14 @@
RelativePath=".\strbuf.c"
>
</File>
<File
RelativePath=".\strvec.c"
>
</File>
<File
RelativePath=".\util.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
......@@ -213,6 +223,18 @@
RelativePath=".\win32\stdint.h"
>
</File>
<File
RelativePath=".\strbuf.h"
>
</File>
<File
RelativePath=".\strvec.h"
>
</File>
<File
RelativePath=".\util.h"
>
</File>
<File
RelativePath=".\wincompat.h"
>
......
......@@ -21,6 +21,7 @@
*/
#include "util.h"
#include "wincompat.h"
#include <errno.h>
#include <stdio.h>
......@@ -31,9 +32,11 @@
void __delete_vec(const char * const *v)
{
const char * const *p;
if(!v) return;
for(const char * const *p = v; *p; ++p)
for(p = v; *p; ++p)
__delete(*p);
__delete(v);
......
......@@ -20,6 +20,7 @@
----------------------------------------------------------------------------
*/
#include <string.h>
#include <sys/types.h>
#define __new(T) (T *)calloc(1, sizeof(T)) /* zeroed */
......
......@@ -41,6 +41,10 @@
#define strtoll _strtoi64
#endif
#if !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR)
#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
#endif
#if (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) \
......@@ -86,6 +90,7 @@
#define INT64_CONST(I) (I ## LL)
#define UINT64_CONST(I) (I ## ULL)
#include <Shlwapi.h>
#define IS_RELATIVE_PATH(P) \
((P)[0] != '/')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment