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:
parent
e7d72724aa
commit
032bba26fd
1 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue