diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-10-15 01:20:14 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-10-15 01:20:14 +0200 |
commit | 8cea352a6aafa80d397d8a6a7d195c1378dcb324 (patch) | |
tree | cc670a0dadca8f6df7a1d24e1f00fa649d40f29a /kernel/yosys.h | |
parent | 2873a8444ee5dbd0a3d034fb4a7a877c680be45d (diff) | |
parent | 1fc6208ec05af672c7c6b7973b0eba1295bca5f4 (diff) | |
download | yosys-8cea352a6aafa80d397d8a6a7d195c1378dcb324.tar.gz yosys-8cea352a6aafa80d397d8a6a7d195c1378dcb324.tar.bz2 yosys-8cea352a6aafa80d397d8a6a7d195c1378dcb324.zip |
Merge branch 'win32'
Diffstat (limited to 'kernel/yosys.h')
-rw-r--r-- | kernel/yosys.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/yosys.h b/kernel/yosys.h index 5a37dd3c5..239146d77 100644 --- a/kernel/yosys.h +++ b/kernel/yosys.h @@ -58,6 +58,12 @@ #include <string.h> #include <stdio.h> +#ifndef _YOSYS_ +# error It looks like you are trying to build Yosys with the config defines set. \ + When building Yosys with a custom make system, make sure you set all the \ + defines the Yosys Makefile would set for your build configuration. +#endif + #ifdef YOSYS_ENABLE_TCL # include <tcl.h> #endif @@ -77,6 +83,10 @@ # define FINAL #endif +#if !defined(__GNUC__) && !defined(__clang__) +# define __attribute__(...) +#endif + YOSYS_NAMESPACE_BEGIN namespace RTLIL { @@ -90,7 +100,6 @@ std::string stringf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)) std::string vstringf(const char *fmt, va_list ap); std::string next_token(std::string &text, const char *sep); bool patmatch(const char *pattern, const char *string); -int readsome(std::istream &f, char *s, int n); int run_command(const std::string &command, std::function<void(const std::string&)> process_line = std::function<void(const std::string&)>()); std::string make_temp_file(std::string template_str = "/tmp/yosys_XXXXXX"); std::string make_temp_dir(std::string template_str = "/tmp/yosys_XXXXXX"); |