--- a/libpurple/internal.h Sat Jul 14 18:13:59 2007 +0000 +++ b/libpurple/internal.h Sat Jul 14 18:36:34 2007 +0000 @@ -94,8 +94,9 @@ #include <langinfo.h> #endif +#include <gmodule.h> + #ifdef PURPLE_PLUGINS -# include <gmodule.h> # ifndef _WIN32 # include <dlfcn.h> # endif @@ -112,11 +113,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