Windows path separator works on Cygwin in addition to the Unix path separator

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5555 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2003-12-13 00:17:09 +00:00
commit 032bba26fd

View file

@ -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;