Implement on Win32. Append the executable file name suffixes from PATHEXT

2001-03-01  Tor Lillqvist  <tml@iki.fi>

	* gutils.c(g_find_program_in_path): Implement on Win32. Append the
	executable file name suffixes from PATHEXT in turn while
	looking	for the program.
	(g_find_program_in_path): If the program we are looking for is a
	relative path in a subdirectory, don't do any path search.
This commit is contained in:
Tor Lillqvist
2001-03-01 10:25:12 +00:00
committed by Tor Lillqvist
parent b6ba941b50
commit 00988d0d76
12 changed files with 174 additions and 28 deletions

View File

@@ -3,12 +3,16 @@
* gutils.c (g_path_is_absolute): (Win32) Remove test for initial
double backslash (UNC path), this will of course be matched by the
test for an initial G_DIR_SEPARATOR right up front. Silly me.
(g_find_program_in_path): Implement on Win32.
(g_find_program_in_path): Implement on Win32. Append the
executable file name suffixes from PATHEXT in turn while looking
for the program.
(g_find_program_in_path): If the program we are looking for is a
relative path in a subdirectory, don't do any path search.
(g_get_any_init): (Win32) Also look for the USERPROFILE env var
indicating the home directory equivalent.
* testglib.c (main): Test g_find_program_in_path() on Win32 by
looking for more.com and regedit.exe.
looking for more.com and regedit.
* glib.def: Add g_find_program_in_path.