resolv: Remove BSD compatibility conditionals and header
This commit is contained in:
parent
e5a0ec981c
commit
c40226cb4c
|
@ -1,3 +1,10 @@
|
||||||
|
2016-04-28 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
|
* resolv/arpa/nameser.h: Include <sys/types.h> unconditionally.
|
||||||
|
* resolv/gethnamaddr.c: Use include files from conf/portability.h.
|
||||||
|
Remove BSD-related preprocessor conditionals.
|
||||||
|
* conf/portability.h: Remove.
|
||||||
|
|
||||||
2016-04-28 Florian Weimer <fweimer@redhat.com>
|
2016-04-28 Florian Weimer <fweimer@redhat.com>
|
||||||
|
|
||||||
* resolv/resolv.h: Remove __BIND_NOSTATIC conditional.
|
* resolv/resolv.h: Remove __BIND_NOSTATIC conditional.
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
/* This file is used by some of the resolver code in inet/ that
|
|
||||||
comes from BIND 4.9. I have written this file instead of modifying
|
|
||||||
those things not to use it so that I can later drop in replacement
|
|
||||||
files from future BIND distributions without change. */
|
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
/* Some BIND code decides it can omit the definitions of some functions
|
|
||||||
if BSD is defined to some value. That might make sense when the BIND
|
|
||||||
code is augmenting or replacing an existing system library, but we can
|
|
||||||
never omit a function here, since we are defining the system library. */
|
|
||||||
|
|
||||||
#undef BSD
|
|
||||||
|
|
||||||
/* Some code does stupid compatibility kludges for SunOS braindeath
|
|
||||||
#ifdef sun. */
|
|
||||||
|
|
||||||
#undef sun
|
|
||||||
|
|
||||||
/* The source code copied from BIND for inet_addr/inet_aton
|
|
||||||
doesn't actually define the functions without these macros. */
|
|
||||||
|
|
||||||
#define NEED_INETADDR 1
|
|
||||||
#define NEED_INETATON 1
|
|
|
@ -57,11 +57,7 @@
|
||||||
#define BIND_4_COMPAT
|
#define BIND_4_COMPAT
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#if (!defined(BSD)) || (BSD < 199306)
|
#include <sys/types.h>
|
||||||
# include <sys/bitypes.h>
|
|
||||||
#else
|
|
||||||
# include <sys/types.h>
|
|
||||||
#endif
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
/*%
|
/*%
|
||||||
|
|
|
@ -66,6 +66,8 @@
|
||||||
#include <resolv.h>
|
#include <resolv.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#ifndef LOG_AUTH
|
#ifndef LOG_AUTH
|
||||||
# define LOG_AUTH 0
|
# define LOG_AUTH 0
|
||||||
|
@ -73,13 +75,6 @@
|
||||||
|
|
||||||
#define MULTI_PTRS_ARE_ALIASES 1 /* XXX - experimental */
|
#define MULTI_PTRS_ARE_ALIASES 1 /* XXX - experimental */
|
||||||
|
|
||||||
#if defined(BSD) && (BSD >= 199103) && defined(AF_INET6)
|
|
||||||
# include <stdlib.h>
|
|
||||||
# include <string.h>
|
|
||||||
#else
|
|
||||||
# include "../conf/portability.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(USE_OPTIONS_H)
|
#if defined(USE_OPTIONS_H)
|
||||||
# include <../conf/options.h>
|
# include <../conf/options.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -963,49 +958,3 @@ addrsort (char **ap, int num)
|
||||||
needsort++;
|
needsort++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(BSD43_BSD43_NFS) || defined(sun)
|
|
||||||
/* some libc's out there are bound internally to these names (UMIPS) */
|
|
||||||
void
|
|
||||||
ht_sethostent (int stayopen)
|
|
||||||
{
|
|
||||||
_sethtent(stayopen);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
ht_endhostent (void)
|
|
||||||
{
|
|
||||||
_endhtent();
|
|
||||||
}
|
|
||||||
|
|
||||||
struct hostent *
|
|
||||||
ht_gethostbyname (char *name)
|
|
||||||
{
|
|
||||||
return (_gethtbyname(name));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct hostent *
|
|
||||||
ht_gethostbyaddr (const char *addr, size_t len, int af)
|
|
||||||
{
|
|
||||||
return (_gethtbyaddr(addr, len, af));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct hostent *
|
|
||||||
gethostent (void)
|
|
||||||
{
|
|
||||||
return (_gethtent());
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
dns_service (void)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef dn_skipname
|
|
||||||
dn_skipname(comp_dn, eom)
|
|
||||||
const u_char *comp_dn, *eom;
|
|
||||||
{
|
|
||||||
return (__dn_skipname(comp_dn, eom));
|
|
||||||
}
|
|
||||||
#endif /*old-style libc with yp junk in it*/
|
|
||||||
|
|
Loading…
Reference in New Issue