The R Project SVN R

Rev

Rev 75220 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 75220 Rev 76978
Line 1... Line 1...
1
/*
1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 2001-2017  The R Core Team.
3
 *  Copyright (C) 2001-2019  The R Core Team.
4
 *  Copyright (C) 1998-2012  Daniel Veillard.
4
 *  Copyright (C) 1998-2012  Daniel Veillard.
5
 *
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 2 of the License, or
8
 *  the Free Software Foundation; either version 2 of the License, or
Line 98... Line 98...
98
# include <netdb.h>
98
# include <netdb.h>
99
# include <sys/socket.h>
99
# include <sys/socket.h>
100
# include <netinet/in.h>
100
# include <netinet/in.h>
101
#endif
101
#endif
102
 
102
 
-
 
103
extern struct hostent *R_gethostbyname(const char *name);
-
 
104
 
103
#ifdef HAVE_FCNTL_H
105
#ifdef HAVE_FCNTL_H
104
#include <fcntl.h>
106
#include <fcntl.h>
105
#endif
107
#endif
106
#ifdef HAVE_ERRNO_H
108
#ifdef HAVE_ERRNO_H
107
#include <errno.h>
109
#include <errno.h>
Line 1114... Line 1116...
1114
#if defined(SUPPORT_IP6) && defined(RES_USE_INET6)
1116
#if defined(SUPPORT_IP6) && defined(RES_USE_INET6)
1115
    if (!(_res.options & RES_INIT))
1117
    if (!(_res.options & RES_INIT))
1116
	res_init();
1118
	res_init();
1117
    _res.options |= RES_USE_INET6;
1119
    _res.options |= RES_USE_INET6;
1118
#endif
1120
#endif
1119
    h=gethostbyname(host);
1121
    h=R_gethostbyname(host);
1120
    if (h==NULL)
1122
    if (h==NULL)
1121
    {
1123
    {
1122
	RxmlMessage(2, _("unable to resolve '%s'"), host);
1124
	RxmlMessage(2, _("unable to resolve '%s'"), host);
1123
	return(-1);
1125
	return(-1);
1124
    }
1126
    }