1 /***************************************************************************
3 * Project ___| | | | _ \| |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
8 * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
10 * This software is licensed as described in the file COPYING, which
11 * you should have received as part of this distribution. The terms
12 * are also available at http://curl.haxx.se/docs/copyright.html.
14 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 * copies of the Software, and permit persons to whom the Software is
16 * furnished to do so, under the terms of the COPYING file.
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
21 ***************************************************************************/
27 #ifdef HAVE_SYS_SOCKET_H
28 #include <sys/socket.h>
30 #ifdef HAVE_NETINET_IN_H
31 #include <netinet/in.h>
36 #ifdef HAVE_ARPA_INET_H
37 #include <arpa/inet.h>
40 #include <stdlib.h> /* required for free() prototypes */
43 #include <unistd.h> /* for the close() proto */
63 #define _MPRINTF_REPLACE /* use our functions only */
64 #include <curl/mprintf.h>
66 #include "curl_memory.h"
67 /* The last #include file should be: */
70 /***********************************************************************
71 * Only for builds using synchronous name resolves
72 **********************************************************************/
76 * Curl_wait_for_resolv() for synch-builds. Curl_resolv() can never return
77 * wait==TRUE, so this function will never be called. If it still gets called,
78 * we return failure at once.
80 * We provide this function only to allow multi.c to remain unaware if we are
81 * doing asynch resolves or not.
83 CURLcode Curl_wait_for_resolv(struct connectdata *conn,
84 struct Curl_dns_entry **entry)
88 return CURLE_COULDNT_RESOLVE_HOST;
92 * This function will never be called when synch-built. If it still gets
93 * called, we return failure at once.
95 * We provide this function only to allow multi.c to remain unaware if we are
96 * doing asynch resolves or not.
98 CURLcode Curl_is_resolved(struct connectdata *conn,
99 struct Curl_dns_entry **dns)
104 return CURLE_COULDNT_RESOLVE_HOST;
108 * We just return OK, this function is never actually used for synch builds.
109 * It is present here to keep #ifdefs out from multi.c
112 int Curl_resolv_getsock(struct connectdata *conn,
120 return 0; /* no bits since we don't use any socks */
123 #endif /* truly sync */