mirror of
https://github.com/curl/curl.git
synced 2026-08-24 17:03:32 +03:00
Moved more generic functions to util.[ch]
Added resolve.c to simply resolve a given host name
This commit is contained in:
parent
ede9fb4fcc
commit
84fd4686e2
6 changed files with 238 additions and 157 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue