handle absolute paths under windows that start with drive letters

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1203 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 17 years ago
parent 1233d08209
commit a71df446b6

@ -5,6 +5,8 @@
* src/flash/amd_flash.c: Likewise.
* src/lib/safe-ctype.c: Include from libiberty as it is needed on some
non-POSIX ports (like mingw).
* src/cmd/include.c (cmd_include_or_script_run): Add handling of absolute
paths under Windows that take the form <letter>:\.
2008-05-04 Mike Frysinger <vapier@gentoo.org>

@ -52,8 +52,11 @@ cmd_include_or_script_run( chain_t *chain, int is_include, char *params[] )
* assume that user wants to ignore the search path */
path = params[1];
#ifdef __MINGW32__
if (isalpha(*path) && path[1] == ':') path += 2;
#endif
while( *path == '.' ) path++;
if(*path == '/' || ! is_include)
if(*path == '/' || *path == '\\' || ! is_include)
{
path = strdup(params[1]);
}

Loading…
Cancel
Save