changeset 18395:ed470f35ceab

We don't want to be using MAXPATHLEN except for backwards compatibility.
author Richard Laager <rlaager@wiktel.com>
date Sun, 01 Jul 2007 01:10:21 +0000
parents b1fc539eb390
children 864c454a5e16
files libpurple/internal.h
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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