~ubuntu-branches/ubuntu/edgy/curl/edgy

« back to all changes in this revision

Viewing changes to lib/hostip6.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2005-07-26 19:03:01 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20050726190301-x2m2vmjgc8fwnic5
Tags: 7.14.0-2ubuntu1
Synchronize with Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
 * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
9
9
 *
10
10
 * This software is licensed as described in the file COPYING, which
11
11
 * you should have received as part of this distribution. The terms
18
18
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19
19
 * KIND, either express or implied.
20
20
 *
21
 
 * $Id: hostip6.c,v 1.10 2004/10/06 07:50:18 bagder Exp $
 
21
 * $Id: hostip6.c,v 1.14 2005/04/19 23:19:23 bagder Exp $
22
22
 ***************************************************************************/
23
23
 
24
24
#include "setup.h"
26
26
#include <string.h>
27
27
#include <errno.h>
28
28
 
29
 
#define _REENTRANT
30
 
 
31
29
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
32
30
#include <malloc.h>
33
31
#else
67
65
#include <process.h>
68
66
#endif
69
67
 
70
 
#if (defined(NETWARE) && defined(__NOVELL_LIBC__))
71
 
#undef in_addr_t
72
 
#define in_addr_t unsigned long
73
 
#endif
74
 
 
75
68
#include "urldata.h"
76
69
#include "sendf.h"
77
70
#include "hostip.h"
79
72
#include "share.h"
80
73
#include "strerror.h"
81
74
#include "url.h"
 
75
#include "inet_pton.h"
82
76
 
83
77
#define _MPRINTF_REPLACE /* use our functions only */
84
78
#include <curl/mprintf.h>
247
241
    }
248
242
  }
249
243
 
250
 
  if((1 == inet_pton(AF_INET, hostname, addrbuf)) ||
251
 
     (1 == inet_pton(AF_INET6, hostname, addrbuf))) {
 
244
  if((1 == Curl_inet_pton(AF_INET, hostname, addrbuf)) ||
 
245
     (1 == Curl_inet_pton(AF_INET6, hostname, addrbuf))) {
252
246
    /* the given address is numerical only, prevent a reverse lookup */
253
247
    ai_flags = AI_NUMERICHOST;
254
248
  }