Commit ec3b850a authored by Martti Mela's avatar Martti Mela

mingw updates; compiles now until stun

darcs-hash:20060522142623-1b897-d4bdb6850adc8bf331f36224a06030b4b5be8ef6.gz
parent 84d95922
......@@ -8,8 +8,8 @@
# ----------------------------------------------------------------------
# Header paths
INCLUDES = -I$(srcdir)/../bnf -I../bnf \
-I$(srcdir)/../url -I../url \
INCLUDES = -I$(srcdir)/../url -I../url \
-I$(srcdir)/../bnf -I../bnf \
-I$(srcdir)/../su -I../su
# ----------------------------------------------------------------------
......
......@@ -68,11 +68,13 @@ typedef unsigned _int32 uint32_t;
#if HAVE_SIN6
#include <tpipv6.h>
#else
#if !defined(__MINGW32__)
struct sockaddr_storage {
short ss_family;
char ss_pad[126];
};
#endif
#endif
#else
#define closesocket(s) close(s)
#endif
......@@ -1765,7 +1767,11 @@ static int sres_parse_win32_reg_parse_dnsserver(sres_config_t *c, HKEY key, LPCT
su_home_t *home = c->c_home;
su_strlst_t *reg_dns_list;
char *name_servers = su_alloc(home, QUERY_DATALEN);
#if __MINGW32__
DWORD name_servers_length = QUERY_DATALEN;
#else
int name_servers_length = QUERY_DATALEN;
#endif
int ret, servers_added = 0;
/* get name servers and ... */
......@@ -1831,7 +1837,11 @@ static int sres_parse_win32_reg(sres_config_t *c)
FILETIME ftime;
int index, i, found = 0;
char *interface_guid = su_alloc(home, MAX_VALUE_NAME_LEN);
#if __MINGW32__
DWORD guid_size = QUERY_DATALEN;
#else
int guid_size = MAX_VALUE_NAME_LEN;
#endif
/* step 1: find interface specific nameservers */
......
......@@ -135,6 +135,8 @@ int setblocking(int s, int blocking)
return fcntl(s, F_SETFL, mode);
}
#if HAVE_POLL
/** Test few assumptions about sockets */
static
int test_socket(sres_context_t *ctx)
......@@ -231,6 +233,7 @@ static unsigned offset;
{ sres_free_answers(ctx->resolver, ctx->result); ctx->result = NULL; \
ctx->query = NULL; run(ctx); TEST_1(ctx->query); }
static
int poll_sockets(sres_context_t *ctx)
{
......@@ -1754,7 +1757,9 @@ int test_api_errors(sres_context_t *noctx)
TEST(errno, EFAULT); errno = 0;
TEST(sres_query_sockaddr(res, test_answer, ctx,
sres_qtype_any, sa), NULL);
#if defined(EAFNOSUPPORT)
TEST(errno, EAFNOSUPPORT); errno = 0;
#endif
TEST(sres_cached_answers(NULL, sres_qtype_any, "example.com"), NULL);
TEST(errno, EFAULT); errno = 0;
......@@ -2002,3 +2007,13 @@ int main(int argc, char **argv)
return error;
}
#else /* HAVE_POLL */
int main(int argc, char **argv)
{
printf("*** Test not supported without POLL API ***\n");
return 0;
}
#endif /* HAVE_POLL */
......@@ -38,10 +38,13 @@ BUILT_SOURCES = stun_tag_ref.c
COVERAGE_INPUT = $(libstun_la_SOURCES) $(include_sofia_HEADERS)
LDADD = libstun.la \
LDADD = \
libstun.la
../sresolv/libsresolv.la \
../su/libsu.la
stunc_LDADD = libstun.la ../sresolv/libsresolv.la ../su/libsu.la
lookup_stun_server_LDADD = libstun.la ../sresolv/libsresolv.la ../su/libsu.la
# ----------------------------------------------------------------------
......
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