Allow use of backslash in #include in compatibility mode
This allows you to use \ as a directory separator on non-Windows
platforms. It was adopted from another patch by Slice:
534cd02895
This commit is contained in:
parent
a571801ba8
commit
d0f3a9a8df
@ -264,6 +264,15 @@ static void doinclude(int silent)
|
|||||||
check_empty(lptr+1); /* verify that the rest of the line is whitespace */
|
check_empty(lptr+1); /* verify that the rest of the line is whitespace */
|
||||||
|
|
||||||
if (pc_compat) {
|
if (pc_compat) {
|
||||||
|
/* convert backslash to native directory separators for maximum
|
||||||
|
* compatibility for the Windows compiler
|
||||||
|
*/
|
||||||
|
#if DIRSEP_CHAR!='\\'
|
||||||
|
ptr=name;
|
||||||
|
while ((ptr=strchr(ptr,'\\'))!=NULL)
|
||||||
|
*ptr++=DIRSEP_CHAR;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* create a symbol from the name of the include file; this allows the system
|
/* create a symbol from the name of the include file; this allows the system
|
||||||
* to test for multiple inclusions
|
* to test for multiple inclusions
|
||||||
*/
|
*/
|
||||||
@ -3020,4 +3029,3 @@ static char itohstr[30];
|
|||||||
*ptr='\0'; /* and a zero-terminator */
|
*ptr='\0'; /* and a zero-terminator */
|
||||||
return itohstr;
|
return itohstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user