We don't want to be using MAXPATHLEN except for backwards compatibility.

Sun, 01 Jul 2007 01:10:21 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Sun, 01 Jul 2007 01:10:21 +0000
changeset 18549
e7465df778db
parent 18548
afbe0b530b39
child 18550
a98ed091a821

We don't want to be using MAXPATHLEN except for backwards compatibility.

libpurple/internal.h file | annotate | diff | comparison | revisions
--- a/libpurple/internal.h	Sun Jul 01 01:09:29 2007 +0000
+++ b/libpurple/internal.h	Sun Jul 01 01:10:21 2007 +0000
@@ -111,11 +111,16 @@
 # include <unistd.h>
 #endif
 
-#ifndef MAXPATHLEN
-# ifdef PATH_MAX
-#  define MAXPATHLEN PATH_MAX
-# else
-#  define MAXPATHLEN 1024
+/* MAXPATHLEN should only be used with readlink() on glib < 2.4.0.  For
+ * anything else, use g_file_read_link() or other dynamic functions.  This is
+ * important because Hurd has no hard limits on path length. */
+#if !GLIB_CHECK_VERSION(2,4,0)
+# ifndef MAXPATHLEN
+#  ifdef PATH_MAX
+#   define MAXPATHLEN PATH_MAX
+#  else
+#   define MAXPATHLEN 1024
+#  endif
 # endif
 #endif
 

mercurial