From c6b45e7bd5101201ec632ead90adebcfd04bbfb2 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 16 Jun 2009 13:10:17 +0000 Subject: [PATCH] 2009-06-16 15:09 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * examples/uhttpd2/socket.c ! Including winsock2.h to avoid missing macro SD_BOTH on MSVC and POCC (maybe more) compilers. --- harbour/ChangeLog | 5 +++++ harbour/examples/uhttpd2/socket.c | 23 +++++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 134d37ebbc..fa598612f8 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,11 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-06-16 15:09 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * examples/uhttpd2/socket.c + ! Including winsock2.h to avoid missing macro SD_BOTH + on MSVC and POCC (maybe more) compilers. + 2009-06-16 15:03 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * utils/hbmk2/hbmk2.prg + Added preliminary support for autosetup for several more diff --git a/harbour/examples/uhttpd2/socket.c b/harbour/examples/uhttpd2/socket.c index 2ba5a674de..2f78f1a440 100644 --- a/harbour/examples/uhttpd2/socket.c +++ b/harbour/examples/uhttpd2/socket.c @@ -47,17 +47,20 @@ #include "hbvm.h" #if defined( HB_OS_WIN ) -#include -#define socklen_t int -#define SHUT_RDWR SD_BOTH + #define _WINSOCKAPI_ /* Prevents inclusion of winsock.h in windows.h */ + #define HB_SOCKET_T SOCKET + #include + #include + #define socklen_t int + #define SHUT_RDWR SD_BOTH #else -#include -#include -#include -#include -#include -#define INVALID_SOCKET (-1) -typedef int SOCKET; + #include + #include + #include + #include + #include + #define INVALID_SOCKET (-1) + typedef int SOCKET; #endif #ifdef hb_parnidef