diff options
author | Yang Tse <yangsita@gmail.com> | 2009-11-09 12:57:26 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-11-09 12:57:26 +0000 |
commit | 39c0bac44ceba14950cd9d4a7d0c652be5389a9d (patch) | |
tree | e455a14986e937722fbe35ffb15de6fddec7f990 /ares_library_init.c | |
parent | 91031e8ce4ad31de42e9713f232f1363334d3761 (diff) | |
download | c-ares-39c0bac44ceba14950cd9d4a7d0c652be5389a9d.tar.gz c-ares-39c0bac44ceba14950cd9d4a7d0c652be5389a9d.tar.bz2 c-ares-39c0bac44ceba14950cd9d4a7d0c652be5389a9d.zip |
Test for USE_WINSOCK since it is more restrictive than WIN32
Diffstat (limited to 'ares_library_init.c')
-rw-r--r-- | ares_library_init.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ares_library_init.c b/ares_library_init.c index a2486ac..72a6ac9 100644 --- a/ares_library_init.c +++ b/ares_library_init.c @@ -24,7 +24,7 @@ /* library-private global and unique instance vars */ -#ifdef WIN32 +#ifdef USE_WINSOCK fpGetNetworkParams_t fpGetNetworkParams = ZERO_NULL; fpSystemFunction036_t fpSystemFunction036 = ZERO_NULL; #endif @@ -34,7 +34,7 @@ fpSystemFunction036_t fpSystemFunction036 = ZERO_NULL; static unsigned int ares_initialized; static int ares_init_flags; -#ifdef WIN32 +#ifdef USE_WINSOCK static HMODULE hnd_iphlpapi; static HMODULE hnd_advapi32; #endif @@ -42,7 +42,7 @@ static HMODULE hnd_advapi32; static int ares_win32_init(void) { -#ifdef WIN32 +#ifdef USE_WINSOCK hnd_iphlpapi = 0; hnd_iphlpapi = LoadLibrary("iphlpapi.dll"); @@ -78,7 +78,7 @@ static int ares_win32_init(void) static void ares_win32_cleanup(void) { -#ifdef WIN32 +#ifdef USE_WINSOCK if (hnd_advapi32) FreeLibrary(hnd_advapi32); if (hnd_iphlpapi) @@ -123,7 +123,7 @@ void ares_library_cleanup(void) int ares_library_initialized(void) { -#ifdef WIN32 +#ifdef USE_WINSOCK if (!ares_initialized) return ARES_ENOTINITIALIZED; #endif |