From 96445f1b7da2013c294c541530f0160e248b430e Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 18 Oct 2006 15:57:49 +0000 Subject: Introduce symbol USE_WINSOCK which will be defined when using winsock or winsock2 API. --- lib/setup.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'lib') diff --git a/lib/setup.h b/lib/setup.h index a02834ecd..6bcde3d5c 100644 --- a/lib/setup.h +++ b/lib/setup.h @@ -103,6 +103,22 @@ # endif #endif +/* + * Define USE_WINSOCK to 2 if we have and use WINSOCK2 API, else + * define USE_WINSOCK to 1 if we have and use WINSOCK API, else + * undefine USE_WINSOCK. + */ + +#undef USE_WINSOCK + +#ifdef HAVE_WINSOCK2_H +# define USE_WINSOCK 2 +#else +# ifdef HAVE_WINSOCK_H +# define USE_WINSOCK 1 +# endif +#endif + #ifndef TRUE #define TRUE 1 -- cgit v1.2.3