comparison libpurple/protocols/gg/lib/common.c @ 32827:4a34689eeb33 default tip

merged from im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 19 Nov 2011 14:42:54 +0900
parents c94e2bfae121
children
comparison
equal deleted inserted replaced
32692:0f94ec89f0bc 32827:4a34689eeb33
22 /** 22 /**
23 * \file common.c 23 * \file common.c
24 * 24 *
25 * \brief Funkcje wykorzystywane przez różne moduły biblioteki 25 * \brief Funkcje wykorzystywane przez różne moduły biblioteki
26 */ 26 */
27 #ifndef _WIN32 27 #include "compat.h"
28 # include <sys/types.h> 28 #include <sys/types.h>
29 # include <sys/ioctl.h> 29 #ifdef sun
30 # include <sys/socket.h> 30 # include <sys/filio.h>
31 # include <netinet/in.h>
32 # include <arpa/inet.h>
33 # ifdef sun
34 # include <sys/filio.h>
35 # endif
36 #endif 31 #endif
37 32
38 #include <errno.h> 33 #include <errno.h>
39 #include <fcntl.h> 34 #include <fcntl.h>
40 #ifndef _WIN32
41 # include <netdb.h>
42 #endif
43 #include <stdarg.h> 35 #include <stdarg.h>
44 #include <stdio.h> 36 #include <stdio.h>
45 #include <stdlib.h> 37 #include <stdlib.h>
46 #include <string.h> 38 #include <string.h>
47 #include <unistd.h> 39 #include <unistd.h>
90 free(buf); 82 free(buf);
91 return NULL; 83 return NULL;
92 } 84 }
93 buf = tmp; 85 buf = tmp;
94 res = vsnprintf(buf, size, format, ap); 86 res = vsnprintf(buf, size, format, ap);
95 } while (res == size - 1 || res == -1); 87 } while (res >= size - 1 || res == -1);
96 } 88 }
97 #else 89 #else
98 { 90 {
99 char tmp[2]; 91 char tmp[2];
100 92