From: Matthew Fernandez Date: Thu, 14 Apr 2022 03:01:33 +0000 (-0700) Subject: gvc: make #include of unistd.h unconditional X-Git-Tag: 4.0.0~69^2~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae94a21805c9632335b3cbb1514c6276c6f76ed1;p=graphviz gvc: make #include of unistd.h unconditional Gitlab: #2204 --- diff --git a/lib/gvc.vcxproj b/lib/gvc.vcxproj index 4afcb79e6..dfa61a7e8 100644 --- a/lib/gvc.vcxproj +++ b/lib/gvc.vcxproj @@ -51,7 +51,7 @@ Disabled - $(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\GTK2\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir);$(SolutionDir)lib;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\gvc;$(SolutionDir)lib\xdot;%(AdditionalIncludeDirectories) + $(SolutionDir)windows\include;$(SolutionDir)windows\include\unistd;$(SolutionDir)windows\dependencies\GTK2\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir);$(SolutionDir)lib;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\gvc;$(SolutionDir)lib\xdot;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_WINDOWS;_USRDLL;GVDLL;GVC_EXPORTS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -83,7 +83,7 @@ awk -f $(SolutionDir)awk\colortbl.awk color_lib > common\colortbl.h - $(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\GTK2\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir);$(SolutionDir)lib;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\gvc;$(SolutionDir)lib\xdot;%(AdditionalIncludeDirectories) + $(SolutionDir)windows\include;$(SolutionDir)windows\include\unistd;$(SolutionDir)windows\dependencies\GTK2\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir);$(SolutionDir)lib;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\gvc;$(SolutionDir)lib\xdot;%(AdditionalIncludeDirectories) NDEBUG;_WINDOWS;_USRDLL;GVDLL;GVC_EXPORTS;%(PreprocessorDefinitions) Level4 diff --git a/lib/gvc/CMakeLists.txt b/lib/gvc/CMakeLists.txt index b1796d472..81bdeb195 100644 --- a/lib/gvc/CMakeLists.txt +++ b/lib/gvc/CMakeLists.txt @@ -46,6 +46,12 @@ target_include_directories(gvc ../.. ) +if(WIN32 AND NOT MINGW) + target_include_directories(gvc PRIVATE + ../../windows/include/unistd + ) +endif() + target_link_libraries(gvc PRIVATE $ $ diff --git a/lib/gvc/gvdevice.c b/lib/gvc/gvdevice.c index 626d47991..d84b649dd 100644 --- a/lib/gvc/gvdevice.c +++ b/lib/gvc/gvdevice.c @@ -21,9 +21,7 @@ #include #include #include -#ifdef HAVE_UNISTD_H #include -#endif #ifdef _WIN32 #include