aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-04-26 14:18:00 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-04-26 14:18:00 +0000
commit245e3122df4ec12fee41552a909be75714a268a2 (patch)
treef35c9c4c053a5fd9e06dfa118428b5f0c53e4170 /lib/hostip.h
parentffc5fa3a2be787c8198eb68836a45c440876c1bd (diff)
Made defines instead of plain numbers for the Curl_resolv() return code to
make the code easier to read
Diffstat (limited to 'lib/hostip.h')
-rw-r--r--lib/hostip.h14
1 files changed, 10 insertions, 4 deletions
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