From: Yang Tse Date: Wed, 18 Oct 2006 15:57:49 +0000 (+0000) Subject: Introduce symbol USE_WINSOCK which will be defined when X-Git-Tag: curl-7_16_0~62 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96445f1b7da2013c294c541530f0160e248b430e;p=thirdparty%2Fcurl.git Introduce symbol USE_WINSOCK which will be defined when using winsock or winsock2 API. --- diff --git a/ares/setup.h b/ares/setup.h index 70af3be3c3..3b97e273eb 100644 --- a/ares/setup.h +++ b/ares/setup.h @@ -69,6 +69,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 + /* * Work-arounds for systems without configure support */ diff --git a/lib/setup.h b/lib/setup.h index a02834ecdc..6bcde3d5c0 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 diff --git a/src/setup.h b/src/setup.h index 6e0f23a153..139b7467fc 100644 --- a/src/setup.h +++ b/src/setup.h @@ -105,6 +105,23 @@ # 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 + + #include #ifdef __TANDEM