From 245e3122df4ec12fee41552a909be75714a268a2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 26 Apr 2004 14:18:00 +0000 Subject: Made defines instead of plain numbers for the Curl_resolv() return code to make the code easier to read --- lib/hostip.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'lib/hostip.h') diff --git a/lib/hostip.h b/lib/hostip.h index e0cc6beb4..75245e6bd 100644 --- a/lib/hostip.h +++ b/lib/hostip.h @@ -51,10 +51,12 @@ struct Curl_dns_entry { * The returned data *MUST* be "unlocked" with Curl_resolv_unlock() after * use, or we'll leak memory! */ -int Curl_resolv(struct connectdata *conn, - char *hostname, - int port, - struct Curl_dns_entry **dnsentry); +/* return codes */ +#define CURLRESOLV_ERROR -1 +#define CURLRESOLV_RESOLVED 0 +#define CURLRESOLV_PENDING 1 +int Curl_resolv(struct connectdata *conn, char *hostname, + int port, struct Curl_dns_entry **dnsentry); /* * Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've @@ -201,6 +203,10 @@ Curl_cache_addr(struct SessionHandle *data, Curl_addrinfo *addr, #define CURLRES_SYNCH #endif +#ifndef USE_LIBIDN +#define CURLRES_IDN +#endif + /* Allocate enough memory to hold the full name information structs and * everything. OSF1 is known to require at least 8872 bytes. The buffer * required for storing all possible aliases and IP numbers is according to -- cgit v1.2.3