# HG changeset patch # User Stu Tomlinson # Date 1182302937 0 # Node ID 4cc042912ac2c898387d2408d89429cbd2267283 # Parent c23aef39f9bb5ce5b050822bdba451d74cf67399 Bring back MAXPATHLEN (which was always guaranteed to be defined earlier anyway, zephyr was just missing the appropriate #include) and fix core.c for building on glib < 2.4, and a small tweak to the compatibility #define for G_GNUC_NULL_TERMINATED diff -r c23aef39f9bb -r 4cc042912ac2 libpurple/core.c --- a/libpurple/core.c Tue Jun 19 23:52:23 2007 +0000 +++ b/libpurple/core.c Wed Jun 20 01:28:57 2007 +0000 @@ -512,7 +512,7 @@ if ((linklen = readlink(name, buf, sizeof(buf) - 1) == -1)) { - char *name_utf8 = g_filename_to_utf8(name); + char *name_utf8 = g_filename_to_utf8(name, -1, NULL, NULL, NULL); purple_debug_error("core", "Error reading symlink %s: %s. Please report this at http://developer.pidgin.im\n", name_utf8, strerror(errno)); g_free(name_utf8); diff -r c23aef39f9bb -r 4cc042912ac2 libpurple/internal.h --- a/libpurple/internal.h Tue Jun 19 23:52:23 2007 +0000 +++ b/libpurple/internal.h Wed Jun 20 01:28:57 2007 +0000 @@ -111,6 +111,14 @@ # include #endif +#ifndef MAXPATHLEN +# ifdef PATH_MAX +# define MAXPATHLEN PATH_MAX +# else +# define MAXPATHLEN 1024 +# endif +#endif + #ifndef HOST_NAME_MAX # define HOST_NAME_MAX 255 #endif @@ -171,7 +179,11 @@ #endif #ifndef G_GNUC_NULL_TERMINATED -# define G_GNUC_NULL_TERMINATED +# if __GNUC__ >= 4 +# define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__)) +# else +# define G_GNUC_NULL_TERMINATED +# endif #endif /* Safer ways to work with static buffers. When using non-static