From 4df902637a3b486ab4836ddc2bde7889c6dccfeb Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Fri, 17 Oct 2014 12:04:40 +0200 Subject: Various MXE build fixes --- kernel/yosys.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'kernel/yosys.h') diff --git a/kernel/yosys.h b/kernel/yosys.h index e4465edf7..562cec121 100644 --- a/kernel/yosys.h +++ b/kernel/yosys.h @@ -70,8 +70,10 @@ // a few platform specific things #ifdef _WIN32 -# define NOMINMAX -# include +# ifndef NOMINMAX +# define NOMINMAX 1 +# endif +# include # include // takes care of a number of typedefs # include # include @@ -80,15 +82,11 @@ # define strtok_r strtok_s # define strdup _strdup # define snprintf _snprintf -# define access _access # define getcwd _getcwd # define mkdir _mkdir # define popen _popen # define pclose _pclose - # define PATH_MAX MAX_PATH -# define F_OK 00 -# define X_OK 00 // note this is NOT correct as there is no execute flag in Windows #endif @@ -130,6 +128,7 @@ bool patmatch(const char *pattern, const char *string); int run_command(const std::string &command, std::function process_line = std::function()); std::string make_temp_file(std::string template_str = "/tmp/yosys_XXXXXX"); std::string make_temp_dir(std::string template_str = "/tmp/yosys_XXXXXX"); +bool check_file(std::string filename, bool is_exec = false); void remove_directory(std::string dirname); template int GetSize(const T &obj) { return obj.size(); } -- cgit v1.2.3