]> git.pond.sub.org Git - empserver/commitdiff
Define WIN32_LEAN_AND_MEAN for Windows
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 12 Apr 2009 17:07:30 +0000 (19:07 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 13 Apr 2009 10:55:15 +0000 (12:55 +0200)
m4/my_windows_api.m4
src/lib/w32/posixio.c

index 3404cdb0f185c29738df717d5528002a87a67c68..e24481b7bf5363b08d4f7c2a542fc41f8a45261e 100644 (file)
@@ -10,6 +10,8 @@ AC_DEFUN([MY_WINDOWS_API],
        AC_MSG_RESULT([$Windows_API])
        if test $Windows_API = yes; then
                AC_DEFINE([WINDOWS], 1, [Define if compiling for Windows API])
+               AC_DEFINE([WIN32_LEAN_AND_MEAN], 1,
+                       [Define to make Windows includes pull in less junk])
                LIBS_SOCKETS="-lws2_32"
        else
                LIBS_SOCKETS=
index 0f69f76897b2380c1a5a3a8ec861f351f05b2f79..45a379cfb101b9241f9f7ffd8fb93ec9ef5cf723 100644 (file)
@@ -49,8 +49,9 @@
 #include <fcntl.h>
 #include <io.h>
 #include <share.h>
-#include <stdio.h>
 #include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
 /*
  * Need to include winsock2.h before ws2tcpip.h.
  * Use sys/socket.h to ensure the #undef NS_ALL