aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/yosys.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2019-03-11 01:08:36 -0700
committerClifford Wolf <clifford@clifford.at>2019-03-11 01:08:36 -0700
commitd9bb5f3637634ea214194b612aee4bb0c62d7a5c (patch)
treea31456d8153c13f3de1fa9da55c86b25da8be563 /kernel/yosys.cc
parentff4c2a14ae34eeb899c3cf0ca1109f0106b41679 (diff)
downloadyosys-d9bb5f3637634ea214194b612aee4bb0c62d7a5c.tar.gz
yosys-d9bb5f3637634ea214194b612aee4bb0c62d7a5c.tar.bz2
yosys-d9bb5f3637634ea214194b612aee4bb0c62d7a5c.zip
Add ENABLE_GLOB Makefile switch
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'kernel/yosys.cc')
-rw-r--r--kernel/yosys.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/yosys.cc b/kernel/yosys.cc
index 2ed0f4db4..6fd53f85e 100644
--- a/kernel/yosys.cc
+++ b/kernel/yosys.cc
@@ -33,7 +33,7 @@
# include <dlfcn.h>
#endif
-#ifdef _WIN32
+#if defined(_WIN32)
# include <windows.h>
# include <io.h>
#elif defined(__APPLE__)
@@ -41,13 +41,15 @@
# include <unistd.h>
# include <dirent.h>
# include <sys/stat.h>
-# include <glob.h>
#else
# include <unistd.h>
# include <dirent.h>
# include <sys/types.h>
# include <sys/wait.h>
# include <sys/stat.h>
+#endif
+
+#if !defined(_WIN32) && defined(YOSYS_ENABLE_GLOB)
# include <glob.h>
#endif
@@ -564,7 +566,7 @@ std::vector<std::string> glob_filename(const std::string &filename_pattern)
{
std::vector<std::string> results;
-#ifdef _WIN32
+#if defined(_WIN32) || !defined(YOSYS_ENABLE_GLOB)
results.push_back(filename_pattern);
#else
glob_t globbuf;