diff options
author | Christopher Faylor <me@cgf.cx> | 2006-02-20 16:15:51 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-02-20 16:15:51 +0000 |
commit | 0a5f931a43595e099bca6a2fa11bb8ae55e02bd2 (patch) | |
tree | 7aa7a36ad907340324749e91ecbcfd619e7dbdc8 | |
parent | ec92c4d6ab6630301aac88aa2d0bbd7c2094e445 (diff) | |
download | newlib-0a5f931a43595e099bca6a2fa11bb8ae55e02bd2.zip newlib-0a5f931a43595e099bca6a2fa11bb8ae55e02bd2.tar.gz newlib-0a5f931a43595e099bca6a2fa11bb8ae55e02bd2.tar.bz2 |
* spawn.cc (av::fixup): Check for .bat and friends specifically now since these
extensions are no longer automatically detected.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/spawn.cc | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index fd94cae..c1644c6 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2006-02-20 Christopher Faylor <cgf@timesys.com> + + * spawn.cc (av::fixup): Check for .bat and friends specifically now + since these extensions are no longer automatically detected. + 2006-02-19 Christopher Faylor <cgf@timesys.com> * exceptions.cc (stackdump): Avoid dumping more than once. diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 5817a1d..1debb93 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -1058,9 +1058,13 @@ spawnvpe (int mode, const char *file, const char * const *argv, int av::fixup (const char *prog_arg, path_conv& real_path, const char *ext) { + const char *p; bool exeext = strcasematch (ext, ".exe"); - if (exeext && real_path.iscygexec () || strcasematch (ext, ".bat") - || strcasematch (ext, ".cmd")) + if (exeext && real_path.iscygexec () || strcasematch (ext, ".bat")) + return 0; + if (!*ext && ((p = ext - 4) > (char *) real_path) + && (strcasematch (p, ".bat") || strcasematch (p, ".cmd") + || strcasematch (p, ".btm")) return 0; while (1) { |