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
This commit is contained in:
parent
c6de7c0de6
commit
75002210be
1 changed files with 5 additions and 1 deletions
|
|
@ -493,8 +493,12 @@ get_filename(String *str) {
|
||||||
if (isspace(c)) Ungetc(c,str);
|
if (isspace(c)) Ungetc(c,str);
|
||||||
}
|
}
|
||||||
#if defined(_WIN32) || defined(MACSWIG)
|
#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);
|
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
|
#endif
|
||||||
Seek(fn,0,SEEK_SET);
|
Seek(fn,0,SEEK_SET);
|
||||||
return fn;
|
return fn;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue