summaryrefslogtreecommitdiff
path: root/tests/server/util.c
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2006-09-13 13:41:53 +0000
committerGisle Vanem <gvanem@broadpark.no>2006-09-13 13:41:53 +0000
commit56bf97ffc9b6e61d3ebf3b5e5a0dfff030b4125e (patch)
tree928644d56379186188ea54567628c4db3351bedc /tests/server/util.c
parent7d3e719a2ccdaeb79a62aaf2243f93c9855008ef (diff)
downloadcurl-56bf97ffc9b6e61d3ebf3b5e5a0dfff030b4125e.tar.gz
'in6addr_any' must be placed in .c-file. Added 'REAL_WIN32' for
all Win32 targets except CygWin. Cleanup.
Diffstat (limited to 'tests/server/util.c')
-rw-r--r--tests/server/util.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/server/util.c b/tests/server/util.c
index c8faebbb5..724cb8517 100644
--- a/tests/server/util.c
+++ b/tests/server/util.c
@@ -55,6 +55,10 @@
#include "getpart.h"
#include "util.h"
+#if defined(ENABLE_IPV6) && defined(__MINGW32__)
+const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }};
+#endif
+
/*
* ourerrno() returns the errno (or equivalent) on this platform to
* hide platform specific for the function that calls this.
@@ -97,7 +101,7 @@ void logmsg(const char *msg, ...)
}
}
-#if defined(WIN32) && !defined(__CYGWIN__)
+#if defined(REAL_WIN32)
/* use instead of perror() on generic windows */
void win32_perror (const char *msg)
{
@@ -111,9 +115,7 @@ void win32_perror (const char *msg)
fprintf(stderr, "%s: ", msg);
fprintf(stderr, "%s\n", buf);
}
-#endif
-#if defined(WIN32) && !defined(__CYGWIN__)
void win32_init(void)
{
WORD wVersionRequested;
@@ -143,7 +145,7 @@ void win32_cleanup(void)
{
WSACleanup();
}
-#endif
+#endif /* REAL_WIN32 */
/* set by the main code to point to where the test dir is */
const char *path=".";
@@ -154,4 +156,3 @@ char *test2file(long testno)
snprintf(filename, sizeof(filename), TEST_DATA_PATH, path, testno);
return filename;
}
-