From: Matthew Fernandez Date: Sat, 16 Apr 2022 17:07:30 +0000 (-0700) Subject: gvpr: make #includes of unistd.h unconditional X-Git-Tag: 4.0.0~69^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f094d67c169b916912a9871f3d0f411f6fb2098a;p=graphviz gvpr: make #includes of unistd.h unconditional Gitlab: #2204 --- diff --git a/lib/gvpr/CMakeLists.txt b/lib/gvpr/CMakeLists.txt index 58828a8ad..02c1c25f4 100644 --- a/lib/gvpr/CMakeLists.txt +++ b/lib/gvpr/CMakeLists.txt @@ -38,6 +38,10 @@ target_include_directories(gvpr SYSTEM PRIVATE ${GETOPT_INCLUDE_DIRS} ) +if(WIN32 AND NOT MINGW) + target_include_directories(gvpr PRIVATE ../../windows/include/unistd) +endif() + target_link_libraries(gvpr ast cgraph diff --git a/lib/gvpr/compile.c b/lib/gvpr/compile.c index 795ac75b4..73ff642da 100644 --- a/lib/gvpr/compile.c +++ b/lib/gvpr/compile.c @@ -16,9 +16,7 @@ #include "config.h" #include #include -#ifdef HAVE_UNISTD_H #include -#endif #include #include #include diff --git a/lib/gvpr/gvpr.c b/lib/gvpr/gvpr.c index 0720d6d2c..1ae3e49e4 100644 --- a/lib/gvpr/gvpr.c +++ b/lib/gvpr/gvpr.c @@ -15,13 +15,7 @@ * Written by Emden Gansner */ - -#include "config.h" -#ifdef HAVE_UNISTD_H #include -#else -#include -#endif #include "builddate.h" #include #include diff --git a/lib/gvpr/gvprlib.vcxproj b/lib/gvpr/gvprlib.vcxproj index 59539a8d8..c7fe25a36 100644 --- a/lib/gvpr/gvprlib.vcxproj +++ b/lib/gvpr/gvprlib.vcxproj @@ -51,7 +51,7 @@ Disabled - $(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\libraries\vcpkg\installed\x86-windows\include;$(SolutionDir);$(SolutionDir)lib;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;%(AdditionalIncludeDirectories) + $(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)windows\include\unistd;$(SolutionDir)windows\dependencies\libraries\vcpkg\installed\x86-windows\include;$(SolutionDir);$(SolutionDir)lib;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;%(AdditionalIncludeDirectories) EXPORT_GVPR;_DEBUG;_LIB;GVDLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -76,7 +76,7 @@ - $(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\libraries\vcpkg\installed\x86-windows\include;$(SolutionDir);$(SolutionDir)lib;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;%(AdditionalIncludeDirectories) + $(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)windows\include\unistd;$(SolutionDir)windows\dependencies\libraries\vcpkg\installed\x86-windows\include;$(SolutionDir);$(SolutionDir)lib;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;%(AdditionalIncludeDirectories) EXPORT_GVPR;_LIB;GVDLL;%(PreprocessorDefinitions) Level4