comparison src/libircclient-1-fixes.patch @ 2216:4bc329dea0a2

update package libircclient
author Mark Brand <mabrand@mabrand.nl>
date Mon, 23 Jan 2012 08:25:43 +0100
parents 946797142f53
children f653602a0500
comparison
equal deleted inserted replaced
2215:946797142f53 2216:4bc329dea0a2
1 This file is part of mingw-cross-env. 1 This file is part of mingw-cross-env.
2 See doc/index.html for further information. 2 See doc/index.html for further information.
3 3
4 Contains ad hoc patches for cross building. 4 Contains ad hoc patches for cross building.
5 5
6 From f959d621bbd143eba764a97605dc05c53340ea90 Mon Sep 17 00:00:00 2001 6 From 06b27e262de1d156ea31b52762ed372211b72de9 Mon Sep 17 00:00:00 2001
7 From: mingw-cross-env 7 From: mingw-cross-env
8 Date: Thu, 23 Jun 2011 15:47:52 +1000 8 Date: Mon, 23 Jan 2012 08:26:14 +0100
9 Subject: [PATCH 1/3] IPv6 support is broken and is forced to be disabled. 9 Subject: [PATCH 1/2] use the proper WIN32 define
10
11 This place is sufficient - IPv6 initialisation will now cause an error.
12
13 diff --git a/src/libircclient.c b/src/libircclient.c
14 index 21a50de..69d2225 100644
15 --- a/src/libircclient.c
16 +++ b/src/libircclient.c
17 @@ -239,7 +239,7 @@ int irc_connect6 (irc_session_t * session,
18 const char * username,
19 const char * realname)
20 {
21 -#if defined (ENABLE_IPV6)
22 +#if 0
23 struct sockaddr_in6 saddr;
24 struct addrinfo ainfo, *res = NULL;
25 char portStr[32], *p;
26 --
27 1.7.8.3
28 10
29 11
30 From 86a3ef0fc754cb1fb25124414b32bcfc65d413d3 Mon Sep 17 00:00:00 2001 12 diff --git a/examples/censor.cpp b/examples/censor.cpp
31 From: mingw-cross-env 13 index 0c15f4c..c784040 100644
32 Date: Thu, 23 Jun 2011 15:48:33 +1000 14 --- a/examples/censor.cpp
33 Subject: [PATCH 2/3] Use the proper WIN32 define. 15 +++ b/examples/censor.cpp
34 16 @@ -32,7 +32,7 @@
35 17 #include <errno.h>
18 #include <string.h>
19
20 -#if !defined (WIN32)
21 +#if !defined (_WIN32)
22 #include <unistd.h>
23 #endif
24
25 diff --git a/examples/irctest.c b/examples/irctest.c
26 index bd6dbc3..08d2ba7 100644
27 --- a/examples/irctest.c
28 +++ b/examples/irctest.c
29 @@ -51,7 +51,7 @@ void addlog (const char * fmt, ...)
30 va_list va_alist;
31
32 va_start (va_alist, fmt);
33 -#if defined (WIN32)
34 +#if defined (_WIN32)
35 _vsnprintf (buf, sizeof(buf), fmt, va_alist);
36 #else
37 vsnprintf (buf, sizeof(buf), fmt, va_alist);
38 diff --git a/examples/spammer.c b/examples/spammer.c
39 index ae9c2c7..2a0861b 100644
40 --- a/examples/spammer.c
41 +++ b/examples/spammer.c
42 @@ -17,7 +17,7 @@
43 #include <errno.h>
44 #include <string.h>
45
46 -#if defined (WIN32)
47 +#if defined (_WIN32)
48 #include <windows.h>
49
50 #define CREATE_THREAD(id,func,param) (CreateThread(0, 0, func, param, 0, id) == 0)
36 diff --git a/include/libircclient.h b/include/libircclient.h 51 diff --git a/include/libircclient.h b/include/libircclient.h
37 index 2dcd44c..af7d769 100644 52 index 2dcd44c..af7d769 100644
38 --- a/include/libircclient.h 53 --- a/include/libircclient.h
39 +++ b/include/libircclient.h 54 +++ b/include/libircclient.h
40 @@ -44,7 +44,7 @@ 55 @@ -44,7 +44,7 @@
44 -#if !defined (WIN32) 59 -#if !defined (WIN32)
45 +#if !defined (_WIN32) 60 +#if !defined (_WIN32)
46 #include <sys/select.h> /* fd_set */ 61 #include <sys/select.h> /* fd_set */
47 #else 62 #else
48 #include <winsock2.h> 63 #include <winsock2.h>
49 diff --git a/src/portable.c b/src/portable.c
50 index 81e0d7b..de85d27 100644
51 --- a/src/portable.c
52 +++ b/src/portable.c
53 @@ -12,7 +12,8 @@
54 * License for more details.
55 */
56
57 -#if !defined (WIN32)
58 +
59 +#if !defined (_WIN32)
60 #include "config.h"
61 #include <stdio.h>
62 #include <stdarg.h>
63 @@ -71,7 +72,7 @@
64 #if defined (ENABLE_THREADS)
65 static inline int libirc_mutex_init (port_mutex_t * mutex)
66 {
67 -#if defined (WIN32)
68 +#if defined (_WIN32)
69 InitializeCriticalSection (mutex);
70 return 0;
71 #elif defined (PTHREAD_MUTEX_RECURSIVE)
72 @@ -84,13 +85,13 @@ static inline int libirc_mutex_init (port_mutex_t * mutex)
73
74 return pthread_mutex_init (mutex, 0);
75
76 -#endif /* defined (WIN32) */
77 +#endif /* defined (_WIN32) */
78 }
79
80
81 static inline void libirc_mutex_destroy (port_mutex_t * mutex)
82 {
83 -#if defined (WIN32)
84 +#if defined (_WIN32)
85 DeleteCriticalSection (mutex);
86 #else
87 pthread_mutex_destroy (mutex);
88 @@ -100,7 +101,7 @@ static inline void libirc_mutex_destroy (port_mutex_t * mutex)
89
90 static inline void libirc_mutex_lock (port_mutex_t * mutex)
91 {
92 -#if defined (WIN32)
93 +#if defined (_WIN32)
94 EnterCriticalSection (mutex);
95 #else
96 pthread_mutex_lock (mutex);
97 @@ -110,7 +111,7 @@ static inline void libirc_mutex_lock (port_mutex_t * mutex)
98
99 static inline void libirc_mutex_unlock (port_mutex_t * mutex)
100 {
101 -#if defined (WIN32)
102 +#if defined (_WIN32)
103 LeaveCriticalSection (mutex);
104 #else
105 pthread_mutex_unlock (mutex);
106 diff --git a/src/sockets.c b/src/sockets.c
107 index 0925fed..0cbb14a 100644
108 --- a/src/sockets.c
109 +++ b/src/sockets.c
110 @@ -15,7 +15,7 @@
111 /*
112 * The sockets interface was moved out to simplify going OpenSSL integration.
113 */
114 -#if !defined (WIN32)
115 +#if !defined (_WIN32)
116 #include <sys/socket.h>
117 #include <netdb.h>
118 #include <arpa/inet.h>
119 @@ -47,7 +47,7 @@
120
121 static int socket_error()
122 {
123 -#if !defined (WIN32)
124 +#if !defined (_WIN32)
125 return errno;
126 #else
127 return WSAGetLastError();
128 @@ -64,7 +64,7 @@ static int socket_create (int domain, int type, socket_t * sock)
129
130 static int socket_make_nonblocking (socket_t * sock)
131 {
132 -#if !defined (WIN32)
133 +#if !defined (_WIN32)
134 return fcntl (*sock, F_SETFL, fcntl (*sock, F_GETFL,0 ) | O_NONBLOCK) != 0;
135 #else
136 unsigned long mode = 0;
137 @@ -75,7 +75,7 @@ static int socket_make_nonblocking (socket_t * sock)
138
139 static int socket_close (socket_t * sock)
140 {
141 -#if !defined (WIN32)
142 +#if !defined (_WIN32)
143 close (*sock);
144 #else
145 closesocket (*sock);
146 -- 64 --
147 1.7.8.3 65 1.7.8.3
148 66
149 67
150 From 7f37c588aeeed6d3fdb7ed15c6d5e6f123b2a2a8 Mon Sep 17 00:00:00 2001 68 From 1a54c4dda67b99c1c0c0c68b45a395b741cb7030 Mon Sep 17 00:00:00 2001
151 From: mingw-cross-env 69 From: mingw-cross-env
152 Date: Sun, 22 Jan 2012 22:39:23 +0100 70 Date: Sun, 22 Jan 2012 22:39:23 +0100
153 Subject: [PATCH 3/3] fix missing header 71 Subject: [PATCH 2/2] fix missing header
154 72
155 73
156 diff --git a/include/libircclient.h b/include/libircclient.h 74 diff --git a/include/libircclient.h b/include/libircclient.h
157 index af7d769..57c8516 100644 75 index af7d769..57c8516 100644
158 --- a/include/libircclient.h 76 --- a/include/libircclient.h