comparison libpurple/protocols/gg/lib/common.c @ 32819:2c6510167895 default tip

propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24) to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 02 Jun 2012 02:30:49 +0000
parents c94e2bfae121
children
comparison
equal deleted inserted replaced
32818:01ff09d4a463 32819:2c6510167895
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