comparison libpurple/internal.h @ 19114:6de2e9ba0930

merge of '2970edca111b3535ae0703e3c866ad1c3b87df94' and 'a2b508e8680ac3f20965226a5dd83f7e2a3b15bb'
author Eric Polino <aluink@pidgin.im>
date Sun, 24 Jun 2007 02:56:09 +0000
parents 4cc042912ac2
children ed470f35ceab c9bcf4f11e30
comparison
equal deleted inserted replaced
19102:7f26e5b98b15 19114:6de2e9ba0930
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 114 #ifndef MAXPATHLEN
115 # define MAXPATHLEN 1024 115 # ifdef PATH_MAX
116 # define MAXPATHLEN PATH_MAX
117 # else
118 # define MAXPATHLEN 1024
119 # endif
116 #endif 120 #endif
117 121
118 #ifndef HOST_NAME_MAX 122 #ifndef HOST_NAME_MAX
119 # define HOST_NAME_MAX 255 123 # define HOST_NAME_MAX 255
120 #endif 124 #endif
121
122 #define PATHSIZE 1024
123 125
124 #include <glib.h> 126 #include <glib.h>
125 #if !GLIB_CHECK_VERSION(2,4,0) 127 #if !GLIB_CHECK_VERSION(2,4,0)
126 # define G_MAXUINT32 ((guint32) 0xffffffff) 128 # define G_MAXUINT32 ((guint32) 0xffffffff)
127 #endif 129 #endif
174 # else 176 # else
175 # define G_GSIZE_FORMAT "u" 177 # define G_GSIZE_FORMAT "u"
176 # endif 178 # endif
177 #endif 179 #endif
178 180
181 #ifndef 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
187 #endif
188
179 /* Safer ways to work with static buffers. When using non-static 189 /* Safer ways to work with static buffers. When using non-static
180 * buffers, either use g_strdup_* functions (preferred) or use 190 * buffers, either use g_strdup_* functions (preferred) or use
181 * g_strlcpy/g_strlcpy directly. */ 191 * g_strlcpy/g_strlcpy directly. */
182 #define purple_strlcpy(dest, src) g_strlcpy(dest, src, sizeof(dest)) 192 #define purple_strlcpy(dest, src) g_strlcpy(dest, src, sizeof(dest))
183 #define purple_strlcat(dest, src) g_strlcat(dest, src, sizeof(dest)) 193 #define purple_strlcat(dest, src) g_strlcat(dest, src, sizeof(dest))