remove #if 0'ed sections.

This commit is contained in:
itojun 2000-01-17 08:34:04 +00:00
parent 88d175cdc4
commit 79641939e0
2 changed files with 2 additions and 61 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: getaddrinfo.c,v 1.17 1999/12/27 10:20:59 itojun Exp $ */
/* $NetBSD: getaddrinfo.c,v 1.18 2000/01/17 08:34:04 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -47,19 +47,8 @@
* in ai_flags?
*/
#if 0
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#else
#define HAVE_SOCKADDR_SA_LEN
#endif
#include <sys/types.h>
#include <sys/param.h>
#if 0
#include <sys/sysctl.h>
#endif
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
@ -75,28 +64,6 @@
#include <stdio.h>
#include <errno.h>
#if 0
#ifndef HAVE_PORTABLE_PROTOTYPE
#include "cdecl_ext.h"
#endif
#ifndef HAVE_U_INT32_T
#include "bittypes.h"
#endif
#ifndef HAVE_SOCKADDR_STORAGE
#include "sockstorage.h"
#endif
#ifndef HAVE_ADDRINFO
#include "addrinfo.h"
#endif
#if defined(__KAME__) && defined(INET6)
# define FAITH
#endif
#endif
#define SUCCESS 0
#define ANY 0
#define YES 1
@ -995,9 +962,7 @@ get_ai(pai, afd, addr)
memcpy(ai, pai, sizeof(struct addrinfo));
ai->ai_addr = (struct sockaddr *)(ai + 1);
memset(ai->ai_addr, 0, afd->a_socklen);
#ifdef HAVE_SOCKADDR_SA_LEN
ai->ai_addr->sa_len = afd->a_socklen;
#endif
ai->ai_addrlen = afd->a_socklen;
ai->ai_addr->sa_family = ai->ai_family = afd->a_af;
p = (char *)(ai->ai_addr);

View File

@ -1,4 +1,4 @@
/* $NetBSD: getnameinfo.c,v 1.7 2000/01/05 04:54:54 itojun Exp $ */
/* $NetBSD: getnameinfo.c,v 1.8 2000/01/17 08:34:05 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -39,14 +39,6 @@
* modified).
*/
#if 0
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#else
#define HAVE_SA_LEN
#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
@ -58,16 +50,6 @@
#include <string.h>
#include <stddef.h>
#if 0
#ifndef HAVE_PORTABLE_PROTOTYPE
#include "cdecl_ext.h"
#endif
#ifndef HAVE_ADDRINFO
#include "addrinfo.h"
#endif
#endif
#define SUCCESS 0
#define ANY 0
#define YES 1
@ -126,10 +108,8 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
if (sa == NULL)
return ENI_NOSOCKET;
#ifdef HAVE_SA_LEN
if (sa->sa_len != salen)
return ENI_SALEN;
#endif
family = sa->sa_family;
for (i = 0; afdl[i].a_af; i++)
@ -179,11 +159,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
flags |= NI_NUMERICHOST;
v4a >>= IN_CLASSA_NSHIFT;
#if 0
if (v4a == 0 || v4a == IN_LOOPBACKNET)
#else
if (v4a == 0)
#endif
flags |= NI_NUMERICHOST;
break;
#ifdef INET6