From: Egor Date: Tue, 17 May 2022 19:50:55 +0000 (+0300) Subject: simplify win32 defines X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=d0e1d4b6f8cb9a09683c21e7ddefcc3c7613f58b;p=patchyircd.git simplify win32 defines --- diff --git a/NetSock/netsock.h b/NetSock/netsock.h index 8d56d74..28a493b 100644 --- a/NetSock/netsock.h +++ b/NetSock/netsock.h @@ -1,6 +1,10 @@ #ifndef _netsock_h #define _netsock_h #define FD_SETSIZE 1024 +#if _WIN32 +#define WINVER 0x0600 +#define _WIN32_WINNT 0x0600 +#endif // Standard headers #include @@ -10,19 +14,10 @@ // Windows #if defined(_WIN32) -#ifndef I_KNOW_HOW_TO_USE_A_LINKER -#pragma message("Warning: Windows detected.") -#pragma message("IMPORTANT: COMPILE WITH -lws2_32") -#pragma comment(lib, "ws2_32.lib") -#endif -//#include -//#include -//#include #include #include #include #ifdef _WIN64 -//#define PRISocket "lu" // The format string for SOCKET #define PRISocket "llu" // The format string for SOCKET #else #define PRISocket "u" // The format string for SOCKET diff --git a/config.example.mk b/config.example.mk index 9bb7a5e..84b508b 100644 --- a/config.example.mk +++ b/config.example.mk @@ -3,5 +3,5 @@ CC=clang CFLAGS=-Wall -Wextra -DHAS_TLS LDLIBS=-ltls CC.w32=i686-w64-mingw32-gcc -CFLAGS.w32=-Wall -Wextra -DI_KNOW_HOW_TO_USE_A_LINKER -DWINVER=0x0600 -D_WIN32_WINNT=0x0600 +CFLAGS.w32=-Wall -Wextra LDLIBS.w32=-lws2_32 diff --git a/main.c b/main.c index 48f301b..37310ec 100644 --- a/main.c +++ b/main.c @@ -1,7 +1,7 @@ -#include #include "common.h" #include "net.h" #include "irc.h" +#include #ifndef _WIN32 #include