Compiler fixes for MinGW.
In MinGW, when parameters are passed to vhdlpp by ivlpp, single quotes are treated as ordinary characters. Use double quotes instead, as is done in the driver. Also, MinGW does not have a standard mkdir() function, so we need to convert calls to mkdir() into calls to _mkdir().
This commit is contained in:
parent
d2dc0e535f
commit
58d182bdf3
|
|
@ -1795,14 +1795,14 @@ static void open_input_file(struct include_stack_t*isp)
|
|||
for (idx = 0 ; idx < vhdlpp_libdir_cnt ; idx += 1) {
|
||||
size_t next_len = 6 + strlen(vhdlpp_libdir[idx]);
|
||||
libs = realloc(libs, liblen+next_len);
|
||||
snprintf(libs+liblen-1, next_len, " -L'%s'", vhdlpp_libdir[idx]);
|
||||
snprintf(libs+liblen-1, next_len, " -L\"%s\"", vhdlpp_libdir[idx]);
|
||||
liblen = strlen(libs) + 1;
|
||||
}
|
||||
|
||||
cmdlen += liblen;
|
||||
|
||||
char*cmd = malloc(cmdlen);
|
||||
snprintf(cmd, cmdlen, "%s -w'%s'%s %s", vhdlpp_path, vhdlpp_work, libs, isp->path);
|
||||
snprintf(cmd, cmdlen, "%s -w\"%s\"%s %s", vhdlpp_path, vhdlpp_work, libs, isp->path);
|
||||
|
||||
if (verbose_flag)
|
||||
fprintf(stderr, "Invoke vhdlpp: %s\n", cmd);
|
||||
|
|
|
|||
|
|
@ -81,6 +81,10 @@ const char NOTICE[] =
|
|||
# include <getopt.h>
|
||||
#endif
|
||||
# include <sys/stat.h>
|
||||
#if defined(__MINGW32__)
|
||||
# include <io.h>
|
||||
# define mkdir(path, mode) _mkdir(path)
|
||||
#endif
|
||||
|
||||
|
||||
bool verbose_flag = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue