projects
/
fw
/
stlink
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
24171a2
)
undefine macros for socket redirection, fix warnings
author
Dave Murphy
<davem@devkitpro.org>
Sun, 29 Apr 2012 17:47:38 +0000
(18:47 +0100)
committer
Dave Murphy
<davem@devkitpro.org>
Sun, 29 Apr 2012 17:47:38 +0000
(18:47 +0100)
mingw/mingw.c
patch
|
blob
|
history
diff --git
a/mingw/mingw.c
b/mingw/mingw.c
index c394a160c150190827b3e48e442e4cba5c0d711a..0cae043c11a3610b525a9519ab7cb687f81443f2 100644
(file)
--- a/
mingw/mingw.c
+++ b/
mingw/mingw.c
@@
-2,6
+2,11
@@
#include "mingw.h"
#include "mingw.h"
+#undef socket
+#undef connect
+#undef accept
+#undef shutdown
+
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
@@
-10,7
+15,7
@@
int win32_poll(struct pollfd *fds, unsigned int nfds, int timo)
{
struct timeval timeout, *toptr;
fd_set ifds, ofds, efds, *ip, *op;
{
struct timeval timeout, *toptr;
fd_set ifds, ofds, efds, *ip, *op;
- int i, rc;
+
unsigned
int i, rc;
/* Set up the file-descriptor sets in ifds, ofds and efds. */
FD_ZERO(&ifds);
/* Set up the file-descriptor sets in ifds, ofds and efds. */
FD_ZERO(&ifds);
@@
-51,7
+56,7
@@
int win32_poll(struct pollfd *fds, unsigned int nfds, int timo)
return rc;
if(rc > 0) {
return rc;
if(rc > 0) {
- for (i = 0; i < nfds; ++i) {
+ for (
i = 0; i < nfds; ++i) {
int fd = fds[i].fd;
if(fds[i].events & (POLLIN|POLLPRI) && FD_ISSET(fd, &ifds))
fds[i].revents |= POLLIN;
int fd = fds[i].fd;
if(fds[i].events & (POLLIN|POLLPRI) && FD_ISSET(fd, &ifds))
fds[i].revents |= POLLIN;
@@
-162,7
+167,7
@@
int win32_close_socket(SOCKET fd) {
int rc;
rc = closesocket(fd);
int rc;
rc = closesocket(fd);
- return
0
;
+ return
rc
;
}
}