From 2bf753fd8f6f8346c77d72a8219729f096eeb450 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Fri, 25 Mar 2022 20:14:20 +0000 Subject: [PATCH] vvp: Accept either \ or / as path separators in the -m option (issue #606). Windows system calls will accept either of these. This is already done in the iverilog driver. --- vvp/vpi_modules.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vvp/vpi_modules.cc b/vvp/vpi_modules.cc index cc046ed06..9ca969d93 100644 --- a/vvp/vpi_modules.cc +++ b/vvp/vpi_modules.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001-2020 Stephen Williams (steve@icarus.com) + * Copyright (c) 2001-2022 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -151,7 +151,11 @@ void vpip_load_module(const char*name) ivl_dll_t dll = 0; buf[0] = 0; /* terminate the string */ +#ifdef __MINGW32__ + if (strchr(name, '\\') || strchr(name, '/')) { +#else if (strchr(name, sep)) { +#endif /* If the name has at least one directory character in it, then assume it is a complete name, maybe including any possible .vpi suffix. */