Moved more generic functions to util.[ch]

Added resolve.c to simply resolve a given host name
This commit is contained in:
Daniel Stenberg 2005-05-17 10:22:22 +00:00
parent ede9fb4fcc
commit 84fd4686e2
6 changed files with 238 additions and 157 deletions

View file

@ -26,5 +26,39 @@
int ourerrno(void);
void logmsg(const char *msg, ...);
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#if defined(WIN32) && !defined(__CYGWIN__)
#include <windows.h>
#include <winsock2.h>
#include <process.h>
#define sleep(sec) Sleep ((sec)*1000)
#define EINPROGRESS WSAEINPROGRESS
#define EWOULDBLOCK WSAEWOULDBLOCK
#define EISCONN WSAEISCONN
#define ENOTSOCK WSAENOTSOCK
#define ECONNREFUSED WSAECONNREFUSED
static void win32_cleanup(void);
#if defined(ENABLE_IPV6) && defined(__MINGW32__)
const struct in6_addr in6addr_any = {{ IN6ADDR_ANY_INIT }};
#endif
#endif
#endif
#if defined(WIN32) && !defined(__CYGWIN__)
#undef perror
#define perror(m) win32_perror(m)
#endif
void win32_init(void);
void win32_cleanup(void);