diff options
author | Yang Tse <yangsita@gmail.com> | 2006-10-18 15:57:49 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2006-10-18 15:57:49 +0000 |
commit | 96445f1b7da2013c294c541530f0160e248b430e (patch) | |
tree | 9ede2bc5ab71c87db568e8891ce3c4b60541d75c /src | |
parent | 4bdd7596d305471a806f247d3a46395d7c7542e7 (diff) |
Introduce symbol USE_WINSOCK which will be defined when
using winsock or winsock2 API.
Diffstat (limited to 'src')
-rw-r--r-- | src/setup.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/setup.h b/src/setup.h index 6e0f23a15..139b7467f 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 <stdio.h> #ifdef __TANDEM |