Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/net remove #if 0'ed sections.
details: https://anonhg.NetBSD.org/src/rev/c45a4d0aecb2
branches: trunk
changeset: 480657:c45a4d0aecb2
user: itojun <itojun%NetBSD.org@localhost>
date: Mon Jan 17 08:34:04 2000 +0000
description:
remove #if 0'ed sections.
diffstat:
lib/libc/net/getaddrinfo.c | 37 +------------------------------------
lib/libc/net/getnameinfo.c | 26 +-------------------------
2 files changed, 2 insertions(+), 61 deletions(-)
diffs (132 lines):
diff -r 2854eeb39634 -r c45a4d0aecb2 lib/libc/net/getaddrinfo.c
--- a/lib/libc/net/getaddrinfo.c Mon Jan 17 08:33:45 2000 +0000
+++ b/lib/libc/net/getaddrinfo.c Mon Jan 17 08:34:04 2000 +0000
@@ -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 @@
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);
diff -r 2854eeb39634 -r c45a4d0aecb2 lib/libc/net/getnameinfo.c
--- a/lib/libc/net/getnameinfo.c Mon Jan 17 08:33:45 2000 +0000
+++ b/lib/libc/net/getnameinfo.c Mon Jan 17 08:34:04 2000 +0000
@@ -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 @@
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 @@
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
Home |
Main Index |
Thread Index |
Old Index