* spawn.cc (find_exec): Use has_slash to determine if path has a slash rather
than calculating this twice.
This commit is contained in:
parent
8b57e664af
commit
1a21f33188
|
@ -1,3 +1,8 @@
|
||||||
|
2004-06-02 Christophe Jaillet <christophe.jaillet@wanadoo.fr>
|
||||||
|
|
||||||
|
* spawn.cc (find_exec): Use has_slash to determine if path has a slash
|
||||||
|
rather than calculating this twice.
|
||||||
|
|
||||||
2004-05-30 Pierre Humblet <pierre.humblet@ieee.org>
|
2004-05-30 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
* path.cc (mount_info::add_item): Make sure native path has drive
|
* path.cc (mount_info::add_item): Make sure native path has drive
|
||||||
|
|
|
@ -369,7 +369,12 @@ cmalloc (cygheap_types x, DWORD n)
|
||||||
MALLOC_CHECK;
|
MALLOC_CHECK;
|
||||||
c = (cygheap_entry *) _cmalloc (sizeof_cygheap (n));
|
c = (cygheap_entry *) _cmalloc (sizeof_cygheap (n));
|
||||||
if (!c)
|
if (!c)
|
||||||
|
{
|
||||||
system_printf ("cmalloc returned NULL");
|
system_printf ("cmalloc returned NULL");
|
||||||
|
#ifdef DEBUGGING
|
||||||
|
try_to_debug ();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
return creturn (x, c, n);
|
return creturn (x, c, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -114,11 +114,9 @@ find_exec (const char *name, path_conv& buf, const char *mywinenv,
|
||||||
|
|
||||||
/* Return the error condition if this is an absolute path or if there
|
/* Return the error condition if this is an absolute path or if there
|
||||||
is no PATH to search. */
|
is no PATH to search. */
|
||||||
if (strchr (name, '/') || strchr (name, '\\') ||
|
if (has_slash || strchr (name, '\\') || isdrive (name)
|
||||||
isdrive (name) ||
|
|| !(winpath = getwinenv (mywinenv))
|
||||||
!(winpath = getwinenv (mywinenv)) ||
|
|| !(path = winpath->get_native ()) || *path == '\0')
|
||||||
!(path = winpath->get_native ()) ||
|
|
||||||
*path == '\0')
|
|
||||||
goto errout;
|
goto errout;
|
||||||
|
|
||||||
debug_printf ("%s%s", mywinenv, path);
|
debug_printf ("%s%s", mywinenv, path);
|
||||||
|
|
Loading…
Reference in New Issue