mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-11-04 01:58:54 +01:00 
			
		
		
		
	Use MAXPATHLEN, not PATH_MAX which isn't defined with MSVC.
2001-03-01 Tor Lillqvist <tml@iki.fi> * gutils.c (g_find_program_in_path): (Win32): Use MAXPATHLEN, not PATH_MAX which isn't defined with MSVC.
This commit is contained in:
		
				
					committed by
					
						
						Tor Lillqvist
					
				
			
			
				
	
			
			
			
						parent
						
							00988d0d76
						
					
				
				
					commit
					d4960b2895
				
			@@ -10,6 +10,8 @@
 | 
			
		||||
	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.
 | 
			
		||||
	(g_find_program_in_path): (Win32): Use MAXPATHLEN, not PATH_MAX
 | 
			
		||||
	which isn't defined with MSVC.
 | 
			
		||||
 | 
			
		||||
	* testglib.c (main): Test g_find_program_in_path() on Win32 by
 | 
			
		||||
	looking for more.com and regedit.
 | 
			
		||||
 
 | 
			
		||||
@@ -10,6 +10,8 @@
 | 
			
		||||
	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.
 | 
			
		||||
	(g_find_program_in_path): (Win32): Use MAXPATHLEN, not PATH_MAX
 | 
			
		||||
	which isn't defined with MSVC.
 | 
			
		||||
 | 
			
		||||
	* testglib.c (main): Test g_find_program_in_path() on Win32 by
 | 
			
		||||
	looking for more.com and regedit.
 | 
			
		||||
 
 | 
			
		||||
@@ -10,6 +10,8 @@
 | 
			
		||||
	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.
 | 
			
		||||
	(g_find_program_in_path): (Win32): Use MAXPATHLEN, not PATH_MAX
 | 
			
		||||
	which isn't defined with MSVC.
 | 
			
		||||
 | 
			
		||||
	* testglib.c (main): Test g_find_program_in_path() on Win32 by
 | 
			
		||||
	looking for more.com and regedit.
 | 
			
		||||
 
 | 
			
		||||
@@ -10,6 +10,8 @@
 | 
			
		||||
	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.
 | 
			
		||||
	(g_find_program_in_path): (Win32): Use MAXPATHLEN, not PATH_MAX
 | 
			
		||||
	which isn't defined with MSVC.
 | 
			
		||||
 | 
			
		||||
	* testglib.c (main): Test g_find_program_in_path() on Win32 by
 | 
			
		||||
	looking for more.com and regedit.
 | 
			
		||||
 
 | 
			
		||||
@@ -10,6 +10,8 @@
 | 
			
		||||
	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.
 | 
			
		||||
	(g_find_program_in_path): (Win32): Use MAXPATHLEN, not PATH_MAX
 | 
			
		||||
	which isn't defined with MSVC.
 | 
			
		||||
 | 
			
		||||
	* testglib.c (main): Test g_find_program_in_path() on Win32 by
 | 
			
		||||
	looking for more.com and regedit.
 | 
			
		||||
 
 | 
			
		||||
@@ -10,6 +10,8 @@
 | 
			
		||||
	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.
 | 
			
		||||
	(g_find_program_in_path): (Win32): Use MAXPATHLEN, not PATH_MAX
 | 
			
		||||
	which isn't defined with MSVC.
 | 
			
		||||
 | 
			
		||||
	* testglib.c (main): Test g_find_program_in_path() on Win32 by
 | 
			
		||||
	looking for more.com and regedit.
 | 
			
		||||
 
 | 
			
		||||
@@ -10,6 +10,8 @@
 | 
			
		||||
	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.
 | 
			
		||||
	(g_find_program_in_path): (Win32): Use MAXPATHLEN, not PATH_MAX
 | 
			
		||||
	which isn't defined with MSVC.
 | 
			
		||||
 | 
			
		||||
	* testglib.c (main): Test g_find_program_in_path() on Win32 by
 | 
			
		||||
	looking for more.com and regedit.
 | 
			
		||||
 
 | 
			
		||||
@@ -10,6 +10,8 @@
 | 
			
		||||
	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.
 | 
			
		||||
	(g_find_program_in_path): (Win32): Use MAXPATHLEN, not PATH_MAX
 | 
			
		||||
	which isn't defined with MSVC.
 | 
			
		||||
 | 
			
		||||
	* testglib.c (main): Test g_find_program_in_path() on Win32 by
 | 
			
		||||
	looking for more.com and regedit.
 | 
			
		||||
 
 | 
			
		||||
@@ -270,7 +270,7 @@ g_find_program_in_path (const gchar *program)
 | 
			
		||||
#else
 | 
			
		||||
  {
 | 
			
		||||
    gchar *tmp;
 | 
			
		||||
    gchar moddir[PATH_MAX], sysdir[PATH_MAX], windir[PATH_MAX];
 | 
			
		||||
    gchar moddir[MAXPATHLEN], sysdir[MAXPATHLEN], windir[MAXPATHLEN];
 | 
			
		||||
 | 
			
		||||
    GetModuleFileName (NULL, moddir, sizeof (moddir));
 | 
			
		||||
    tmp = g_path_get_dirname (moddir);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								gutils.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								gutils.c
									
									
									
									
									
								
							@@ -270,7 +270,7 @@ g_find_program_in_path (const gchar *program)
 | 
			
		||||
#else
 | 
			
		||||
  {
 | 
			
		||||
    gchar *tmp;
 | 
			
		||||
    gchar moddir[PATH_MAX], sysdir[PATH_MAX], windir[PATH_MAX];
 | 
			
		||||
    gchar moddir[MAXPATHLEN], sysdir[MAXPATHLEN], windir[MAXPATHLEN];
 | 
			
		||||
 | 
			
		||||
    GetModuleFileName (NULL, moddir, sizeof (moddir));
 | 
			
		||||
    tmp = g_path_get_dirname (moddir);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user