... | ... |
@@ -11,6 +11,10 @@ |
11 | 11 |
// |
12 | 12 |
//===----------------------------------------------------------------------===// |
13 | 13 |
|
14 |
+/* this shouldn't be part of win32 proj at all, but its easier to exclude here |
|
15 |
+ * */ |
|
16 |
+#ifndef _WIN32 |
|
17 |
+ |
|
14 | 18 |
#include "llvm/Analysis/ConstantFolding.h" |
15 | 19 |
#include "llvm/Analysis/Dominators.h" |
16 | 20 |
#include "llvm/Analysis/LoopInfo.h" |
... | ... |
@@ -318,4 +322,4 @@ void PointerTracking::print(raw_ostream &OS, const Module* M) const { |
318 | 318 |
} |
319 | 319 |
} |
320 | 320 |
} |
321 |
- |
|
321 |
+#endif |
... | ... |
@@ -831,7 +831,8 @@ private: |
831 | 831 |
ostr << operand << " " ; |
832 | 832 |
V->print(ostr); |
833 | 833 |
Ty->print(ostr); |
834 |
- cli_dbgmsg_internal("[Bytecode JIT]: %s\n", ostr.str().c_str()); |
|
834 |
+ M->dump(); |
|
835 |
+ cli_dbgmsg_internal("[Bytecode JIT]: operand %d: %s\n", operand,ostr.str().c_str()); |
|
835 | 836 |
} |
836 | 837 |
llvm_report_error("(libclamav) Type mismatch converting operand"); |
837 | 838 |
} |
... | ... |
@@ -273,6 +273,21 @@ ssize_t w32_recv(int sockfd, void *buf, size_t len, int flags) { |
273 | 273 |
return (ssize_t)ret; |
274 | 274 |
} |
275 | 275 |
|
276 |
+int w32_getpeername(int s, struct sockaddr *name, int *namelen) |
|
277 |
+{ |
|
278 |
+ int ret = getpeername((SOCKET)s, name, namelen); |
|
279 |
+ if (ret == SOCKET_ERROR) { |
|
280 |
+ wsock2errno(); |
|
281 |
+ return -1; |
|
282 |
+ } |
|
283 |
+ return ret; |
|
284 |
+} |
|
285 |
+ |
|
286 |
+char *w32_inet_ntoa(struct sockaddr_in in) |
|
287 |
+{ |
|
288 |
+ return inet_ntoa(in); |
|
289 |
+} |
|
290 |
+ |
|
276 | 291 |
int w32_closesocket(int sockfd) { |
277 | 292 |
if(closesocket((SOCKET)sockfd) == SOCKET_ERROR) { |
278 | 293 |
wsock2errno(); |
... | ... |
@@ -47,6 +47,8 @@ int poll_with_event(struct pollfd *fds, int nfds, int timeout, HANDLE event); |
47 | 47 |
int w32_accept(SOCKET sockfd, const struct sockaddr *addr, socklen_t *addrlen); |
48 | 48 |
int w32_listen(int sockfd, int backlog); |
49 | 49 |
int w32_shutdown(int sockfd, int how); |
50 |
+int w32_getpeername(int sd, struct sockaddr *name, int *namelen); |
|
51 |
+char *w32_inet_ntoa(struct sockaddr_in in); |
|
50 | 52 |
int fcntl(int fd, int cmd, ...); |
51 | 53 |
|
52 | 54 |
#endif |
... | ... |
@@ -66,6 +66,8 @@ char *strptime(const char *s, const char *format, struct tm *tm); |
66 | 66 |
#define gai_strerror w32_strerror |
67 | 67 |
#define freeaddrinfo w32_freeaddrinfo |
68 | 68 |
#define inet_ntop w32_inet_ntop |
69 |
+#define inet_ntoa w32_inet_ntoa |
|
70 |
+#define getpeername w32_getpeername |
|
69 | 71 |
#define gethostbyname w32_gethostbyname |
70 | 72 |
#define select w32_select |
71 | 73 |
#define poll w32_poll |