From: Tor Lillqvist Date: Thu, 1 Mar 2001 10:59:55 +0000 (+0000) Subject: Use MAXPATHLEN, not PATH_MAX which isn't defined with MSVC. X-Git-Tag: GLIB_1_3_3~91 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4960b2895eaadad2f2a4271b91a0aab852e74bd;p=platform%2Fupstream%2Fglib.git Use MAXPATHLEN, not PATH_MAX which isn't defined with MSVC. 2001-03-01 Tor Lillqvist * gutils.c (g_find_program_in_path): (Win32): Use MAXPATHLEN, not PATH_MAX which isn't defined with MSVC. --- diff --git a/ChangeLog b/ChangeLog index 66f914d..05a7ff0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 66f914d..05a7ff0 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -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. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 66f914d..05a7ff0 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -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. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 66f914d..05a7ff0 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -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. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 66f914d..05a7ff0 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -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. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 66f914d..05a7ff0 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -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. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 66f914d..05a7ff0 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -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. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 66f914d..05a7ff0 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -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. diff --git a/glib/gutils.c b/glib/gutils.c index be7feb6..48ac588 100644 --- a/glib/gutils.c +++ b/glib/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); diff --git a/gutils.c b/gutils.c index be7feb6..48ac588 100644 --- a/gutils.c +++ b/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);