From: simon Date: Fri, 22 Sep 2000 13:16:49 +0000 (+0000) Subject: Enable better build-time flexibility over which WinSock to include X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/4d331a77f20f321f867f5907e2ffc06249378881 Enable better build-time flexibility over which WinSock to include git-svn-id: svn://svn.tartarus.org/sgt/putty@615 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/Makefile b/Makefile index 37d881e7..13419307 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,15 @@ # - COMPAT=/DWIN32S_COMPAT # Generates a binary that works (minimally) with Win32s. # +# - COMPAT=/DAUTO_WINSOCK +# Causes PuTTY to assume that includes its own WinSock +# header file, so that it won't try to include . +# +# - COMPAT=/DWINSOCK_TWO +# Causes the PuTTY utilities to include instead of +# , except Plink which _needs_ WinSock 2 so it already +# does this. +# # - RCFL=/DASCIICTLS # Uses ASCII rather than Unicode to specify the tab control in # the resource file. Probably most useful when compiling with diff --git a/plink.c b/plink.c index db48d544..0a740622 100644 --- a/plink.c +++ b/plink.c @@ -2,7 +2,9 @@ * PLink - a command-line (stdin/stdout) variant of PuTTY. */ +#ifndef AUTO_WINSOCK #include +#endif #include #include #include diff --git a/raw.c b/raw.c index f7df52cb..cf6d04f8 100644 --- a/raw.c +++ b/raw.c @@ -1,7 +1,13 @@ #include #include #include +#ifndef AUTO_WINSOCK +#ifdef WINSOCK_TWO +#include +#else #include +#endif +#endif #include "putty.h" diff --git a/scp.c b/scp.c index 7466e433..8c7df21a 100644 --- a/scp.c +++ b/scp.c @@ -9,7 +9,13 @@ */ #include +#ifndef AUTO_WINSOCK +#ifdef WINSOCK_TWO +#include +#else #include +#endif +#endif #include #include #include diff --git a/ssh.c b/ssh.c index 3cfab606..97c6839b 100644 --- a/ssh.c +++ b/ssh.c @@ -2,7 +2,13 @@ #include #include #include +#ifndef AUTO_WINSOCK +#ifdef WINSOCK_TWO +#include +#else #include +#endif +#endif #include "putty.h" #include "tree234.h" diff --git a/telnet.c b/telnet.c index 5e6ba3c2..6618fdf8 100644 --- a/telnet.c +++ b/telnet.c @@ -1,7 +1,13 @@ #include #include #include +#ifndef AUTO_WINSOCK +#ifdef WINSOCK_TWO +#include +#else #include +#endif +#endif #include "putty.h" diff --git a/windlg.c b/windlg.c index ca869141..77db0512 100644 --- a/windlg.c +++ b/windlg.c @@ -1,7 +1,13 @@ #include #include #include +#ifndef AUTO_WINSOCK +#ifdef WINSOCK_TWO +#include +#else #include +#endif +#endif #include #include diff --git a/window.c b/window.c index be4b4e8d..9c973faf 100644 --- a/window.c +++ b/window.c @@ -1,6 +1,12 @@ #include #include +#ifndef AUTO_WINSOCK +#ifdef WINSOCK_TWO +#include +#else #include +#endif +#endif #include #include #include