Use MAXPATHLEN, not PATH_MAX which isn't defined with MSVC.
authorTor Lillqvist <tml@iki.fi>
Thu, 1 Mar 2001 10:59:55 +0000 (10:59 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Thu, 1 Mar 2001 10:59:55 +0000 (10:59 +0000)
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.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gutils.c
gutils.c

index 66f914d..05a7ff0 100644 (file)
--- 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.
index 66f914d..05a7ff0 100644 (file)
@@ -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.
index 66f914d..05a7ff0 100644 (file)
@@ -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.
index 66f914d..05a7ff0 100644 (file)
@@ -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.
index 66f914d..05a7ff0 100644 (file)
@@ -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.
index 66f914d..05a7ff0 100644 (file)
@@ -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.
index 66f914d..05a7ff0 100644 (file)
@@ -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.
index 66f914d..05a7ff0 100644 (file)
@@ -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.
index be7feb6..48ac588 100644 (file)
@@ -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);
index be7feb6..48ac588 100644 (file)
--- 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);