Mercurial > pidgin
changeset 18204:4cc042912ac2
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
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Wed, 20 Jun 2007 01:28:57 +0000 |
parents | c23aef39f9bb |
children | 692cded900f8 66bcb7ff60d8 |
files | libpurple/core.c libpurple/internal.h |
diffstat | 2 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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 <unistd.h> #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