Commit 7e5170f3 authored by Martti Mela's avatar Martti Mela
Browse files

sres.c: changed _WIN32s to HAVE_WIN32s

darcs-hash:20070430114859-1b897-58f4f8497a36b19c7597d0862d5b4f5ec64a83af.gz
parent 4303ab55
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#elif HAVE_INTTYPES_H #elif HAVE_INTTYPES_H
#include <inttypes.h> #include <inttypes.h>
#else #else
#if defined(_WIN32) #if defined(HAVE_WIN32)
typedef _int8 int8_t; typedef _int8 int8_t;
typedef unsigned _int8 uint8_t; typedef unsigned _int8 uint8_t;
typedef unsigned _int16 uint16_t; typedef unsigned _int16 uint16_t;
...@@ -182,7 +182,7 @@ const char *inet_ntop(int af, void const *src, char *dst, size_t size); ...@@ -182,7 +182,7 @@ const char *inet_ntop(int af, void const *src, char *dst, size_t size);
/** /**
* How often to recheck nameserver information (seconds). * How often to recheck nameserver information (seconds).
*/ */
#ifndef _WIN32 #ifndef HAVE_WIN32
#define SRES_UPDATE_INTERVAL_SECS 5 #define SRES_UPDATE_INTERVAL_SECS 5
#else #else
#define SRES_UPDATE_INTERVAL_SECS 180 #define SRES_UPDATE_INTERVAL_SECS 180
...@@ -545,7 +545,7 @@ static int m_get_domain(char *d, int n, sres_message_t *m, uint16_t offset); ...@@ -545,7 +545,7 @@ static int m_get_domain(char *d, int n, sres_message_t *m, uint16_t offset);
#include <sofia-sip/su_debug.h> #include <sofia-sip/su_debug.h>
#ifdef _WIN32 #ifdef HAVE_WIN32
#include <winreg.h> #include <winreg.h>
#endif #endif
...@@ -1898,7 +1898,7 @@ int sres_update_config(sres_resolver_t *res, int always, time_t now) ...@@ -1898,7 +1898,7 @@ int sres_update_config(sres_resolver_t *res, int always, time_t now)
return retval; return retval;
} }
#if _WIN32 #if HAVE_WIN32
/** Number of octets to read from a registry key at a time */ /** Number of octets to read from a registry key at a time */
#define QUERY_DATALEN 1024 #define QUERY_DATALEN 1024
...@@ -2082,7 +2082,7 @@ static int sres_parse_win32_reg(sres_config_t *c) ...@@ -2082,7 +2082,7 @@ static int sres_parse_win32_reg(sres_config_t *c)
return ret; return ret;
} }
#endif /* _WIN32 */ #endif /* HAVE_WIN32 */
/** Parse /etc/resolv.conf file. /** Parse /etc/resolv.conf file.
* *
...@@ -2109,7 +2109,7 @@ sres_config_t *sres_parse_resolv_conf(sres_resolver_t *res, ...@@ -2109,7 +2109,7 @@ sres_config_t *sres_parse_resolv_conf(sres_resolver_t *res,
if (f) if (f)
fclose(f); fclose(f);
#if _WIN32 #if HAVE_WIN32
/* note: no 127.0.0.1 on win32 systems */ /* note: no 127.0.0.1 on win32 systems */
/* on win32, query the registry for nameservers */ /* on win32, query the registry for nameservers */
if (sres_parse_win32_ip(c) == 0 || sres_parse_win32_reg(c) == 0) if (sres_parse_win32_ip(c) == 0 || sres_parse_win32_reg(c) == 0)
...@@ -2403,7 +2403,7 @@ int sres_parse_nameserver(sres_config_t *c, char const *server) ...@@ -2403,7 +2403,7 @@ int sres_parse_nameserver(sres_config_t *c, char const *server)
static static
time_t sres_config_timestamp(sres_config_t const *c) time_t sres_config_timestamp(sres_config_t const *c)
{ {
#ifndef _WIN32 #ifndef HAVE_WIN32
struct stat st; struct stat st;
if (stat(c->c_filename, &st) == 0) if (stat(c->c_filename, &st) == 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment