From 75002210be5223a0cfe33611cacfff5ce1f4bb72 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 13 Dec 2003 00:17:09 +0000 Subject: [PATCH] Windows path separator works on Cygwin in addition to the Unix path separator git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5555 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/Preprocessor/cpp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SWIG/Source/Preprocessor/cpp.c b/SWIG/Source/Preprocessor/cpp.c index 3a6294b60..188bea058 100644 --- a/SWIG/Source/Preprocessor/cpp.c +++ b/SWIG/Source/Preprocessor/cpp.c @@ -493,8 +493,12 @@ get_filename(String *str) { if (isspace(c)) Ungetc(c,str); } #if defined(_WIN32) || defined(MACSWIG) - /* accept Unix file separator on non-Unix systems */ + /* accept Unix path separator on non-Unix systems */ Replaceall(fn, "/", SWIG_FILE_DELIMETER); +#endif +#if defined(__CYGWIN__) + /* accept Windows path separator in addition to Unix path separator */ + Replaceall(fn, "\\", SWIG_FILE_DELIMETER); #endif Seek(fn,0,SEEK_SET); return fn;