vvp: Only support one path separator in IVERILOG_VPI_MODULE_PATH (issue #608)

Previously both ':' and ';' were recognised as path separators on all
platforms, but ':' can't be used in Windows. So now we only recognise
';' when running in Windows and ':' when running in any other OS.
This commit is contained in:
Martin Whitaker 2022-03-25 21:54:53 +00:00
parent 4c36b2a8a7
commit 673b0d3066
2 changed files with 10 additions and 4 deletions

View File

@ -64,12 +64,18 @@ void vpip_add_env_and_default_module_paths()
if (disable_default_paths)
return;
#ifdef __MINGW32__
const char path_sep = ';';
#else
const char path_sep = ':';
#endif
if (char *var = ::getenv("IVERILOG_VPI_MODULE_PATH")) {
char *ptr = var;
char *end = var+strlen(var);
int len = 0;
while (ptr <= end) {
if (*ptr == 0 || *ptr == ':' || *ptr == ';') {
if (*ptr == 0 || *ptr == path_sep) {
if (len > 0) {
vpip_add_module_path(strndup(var, len));
}

View File

@ -1,4 +1,4 @@
.TH vvp 1 "May 10th, 2015" "" "Version %M.%n %E"
.TH vvp 1 "March 25th, 2022" "" "Version %M.%n %E"
.SH NAME
vvp - Icarus Verilog vvp runtime engine
@ -171,7 +171,7 @@ output, a time-saver for regression tests.
This adds additional components to the VPI module search path. Paths
specified in this way are searched after paths specified with \-M, but
before the default search path. Multiple paths can be separated with
colons or semicolons.
colons (semicolons if using Windows).
.SH INTERACTIVE MODE
.PP
@ -196,7 +196,7 @@ iverilog\-vpi(1),
.SH COPYRIGHT
.nf
Copyright \(co 2001\-2015 Stephen Williams
Copyright \(co 2001\-2022 Stephen Williams
This document can be freely redistributed according to the terms of the
GNU General Public License version 2.0