Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of unused defines in mimgw.h #583

Merged
merged 14 commits into from
Apr 6, 2017
Merged
9 changes: 0 additions & 9 deletions src/mingw/mingw.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@
#define _USE_W32_SOCKETS 1
#include <windows.h>

#define ENOTCONN WSAENOTCONN
#define EWOULDBLOCK WSAEWOULDBLOCK
#define ENOBUFS WSAENOBUFS
#define ECONNRESET WSAECONNRESET
#define ESHUTDOWN WSAESHUTDOWN
#define EAFNOSUPPORT WSAEAFNOSUPPORT
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
#define EINPROGRESS WSAEINPROGRESS
#define EISCONN WSAEISCONN

/* winsock doesn't feature poll(), so there is a version implemented
* in terms of select() in mingw.c. The following definitions
Expand Down
4 changes: 3 additions & 1 deletion src/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ void *mmap (void *addr, size_t len, int prot, int flags, int fd, long long offs

count = read(fd, buf, len);

if (count != len) {
if (count != (ssize_t)len) {
free (buf);
return MAP_FAILED;
}

return buf;
(void)flags;
}

int munmap (void *addr, size_t len) {
free (addr);
return 0;
(void)len;
}