]> granicus.if.org Git - graphviz/commitdiff
cgraph: control Flex unistd.h suppression by whether we are on Windows
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 14 Apr 2022 14:33:08 +0000 (07:33 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 24 Apr 2022 15:52:41 +0000 (08:52 -0700)
Windows is the only non-unistd.h-having platform we support.

Gitlab: #2204

lib/cgraph/CMakeLists.txt

index 0287f9259e2fadedc56bc0975bc319bcfafb1be3..53af6b2cadcd4e35e967b82f62a7b66b30690b3f 100644 (file)
@@ -5,7 +5,7 @@ FLEX_TARGET(Scan ${CMAKE_CURRENT_SOURCE_DIR}/scan.l
 ADD_FLEX_BISON_DEPENDENCY(Scan Grammar)
 
 add_definitions(-DEXPORT_CGRAPH -DEXPORT_AGXBUF -DEXPORT_CGHDR)
-if(NOT HAVE_UNISTD_H)
+if(WIN32 AND NOT MINGW)
   add_definitions(-DYY_NO_UNISTD_H)
 endif()