From aa43e29a20f77514645431a65e14d2b4a16cb212 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Fri, 15 May 2020 09:58:34 +0200 Subject: [PATCH] change backslash to forward slash in IOC_DIR for Windows --- require.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/require.c b/require.c index a3202fe..cf745f0 100644 --- a/require.c +++ b/require.c @@ -1064,6 +1064,11 @@ int require(const char* module, const char* version, const char* args) firstTime = 0; cwd = malloc(PATH_MAX+1); getcwd(cwd, PATH_MAX); +#ifdef _WIN32 + /* convert '\' to '/' */ + char* p = cwd; + while ((p = strchr(p, '\\')) != NULL) *p = '/'; +#endif putenvprintf("IOC_DIR=%s/", cwd); putenvprintf("T_A=%s", targetArch); putenvprintf("EPICS_HOST_ARCH=%s", targetArch);