Mercurial > pidgin.yaz
comparison libpurple/internal.h @ 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 | 7df46d8bf114 |
children | ed470f35ceab c9bcf4f11e30 |
comparison
equal
deleted
inserted
replaced
18203:c23aef39f9bb | 18204:4cc042912ac2 |
---|---|
109 # include <netdb.h> | 109 # include <netdb.h> |
110 # include <signal.h> | 110 # include <signal.h> |
111 # include <unistd.h> | 111 # include <unistd.h> |
112 #endif | 112 #endif |
113 | 113 |
114 #ifndef MAXPATHLEN | |
115 # ifdef PATH_MAX | |
116 # define MAXPATHLEN PATH_MAX | |
117 # else | |
118 # define MAXPATHLEN 1024 | |
119 # endif | |
120 #endif | |
121 | |
114 #ifndef HOST_NAME_MAX | 122 #ifndef HOST_NAME_MAX |
115 # define HOST_NAME_MAX 255 | 123 # define HOST_NAME_MAX 255 |
116 #endif | 124 #endif |
117 | 125 |
118 #include <glib.h> | 126 #include <glib.h> |
169 # define G_GSIZE_FORMAT "u" | 177 # define G_GSIZE_FORMAT "u" |
170 # endif | 178 # endif |
171 #endif | 179 #endif |
172 | 180 |
173 #ifndef G_GNUC_NULL_TERMINATED | 181 #ifndef G_GNUC_NULL_TERMINATED |
174 # define G_GNUC_NULL_TERMINATED | 182 # if __GNUC__ >= 4 |
183 # define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__)) | |
184 # else | |
185 # define G_GNUC_NULL_TERMINATED | |
186 # endif | |
175 #endif | 187 #endif |
176 | 188 |
177 /* Safer ways to work with static buffers. When using non-static | 189 /* Safer ways to work with static buffers. When using non-static |
178 * buffers, either use g_strdup_* functions (preferred) or use | 190 * buffers, either use g_strdup_* functions (preferred) or use |
179 * g_strlcpy/g_strlcpy directly. */ | 191 * g_strlcpy/g_strlcpy directly. */ |