Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys move decl of inetsw to its own header to avoid array of ...



details:   https://anonhg.NetBSD.org/src/rev/887fa936ab01
branches:  trunk
changeset: 580548:887fa936ab01
user:      yamt <yamt%NetBSD.org@localhost>
date:      Fri Apr 29 10:39:09 2005 +0000

description:
move decl of inetsw to its own header to avoid array of incomplete type.
found by gcc4.  reported by Adam Ciarcinski.

diffstat:

 sys/netinet/in_proto.c      |   5 +++--
 sys/netinet/in_proto.h      |  39 +++++++++++++++++++++++++++++++++++++++
 sys/netinet/ip_icmp.c       |   5 +++--
 sys/netinet/ip_input.c      |   5 +++--
 sys/netinet/ip_var.h        |   3 +--
 sys/netinet/raw_ip.c        |   5 +++--
 sys/netinet6/ah_input.c     |   5 +++--
 sys/netinet6/esp_input.c    |   5 +++--
 sys/netinet6/ipcomp_input.c |   5 +++--
 9 files changed, 61 insertions(+), 16 deletions(-)

diffs (242 lines):

diff -r ffd3448cef67 -r 887fa936ab01 sys/netinet/in_proto.c
--- a/sys/netinet/in_proto.c    Fri Apr 29 09:05:21 2005 +0000
+++ b/sys/netinet/in_proto.c    Fri Apr 29 10:39:09 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in_proto.c,v 1.68 2005/02/12 12:31:07 manu Exp $       */
+/*     $NetBSD: in_proto.c,v 1.69 2005/04/29 10:39:09 yamt Exp $       */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in_proto.c,v 1.68 2005/02/12 12:31:07 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in_proto.c,v 1.69 2005/04/29 10:39:09 yamt Exp $");
 
 #include "opt_mrouting.h"
 #include "opt_eon.h"                   /* ISO CLNL over IP */
@@ -87,6 +87,7 @@
 #include <netinet/ip_var.h>
 #include <netinet/ip_icmp.h>
 #include <netinet/in_pcb.h>
+#include <netinet/in_proto.h>
 
 #ifdef INET6
 #ifndef INET
diff -r ffd3448cef67 -r 887fa936ab01 sys/netinet/in_proto.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/netinet/in_proto.h    Fri Apr 29 10:39:09 2005 +0000
@@ -0,0 +1,39 @@
+/*     $NetBSD: in_proto.h,v 1.1 2005/04/29 10:39:09 yamt Exp $        */
+
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)ip_var.h    8.2 (Berkeley) 1/9/95
+ */
+
+#ifndef _NETINET_IN_PROTO_H_
+#define _NETINET_IN_PROTO_H_
+
+extern const struct protosw inetsw[];
+
+#endif /* _NETINET_IN_PROTO_H_ */
diff -r ffd3448cef67 -r 887fa936ab01 sys/netinet/ip_icmp.c
--- a/sys/netinet/ip_icmp.c     Fri Apr 29 09:05:21 2005 +0000
+++ b/sys/netinet/ip_icmp.c     Fri Apr 29 10:39:09 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_icmp.c,v 1.91 2005/02/26 22:45:12 perry Exp $       */
+/*     $NetBSD: ip_icmp.c,v 1.92 2005/04/29 10:39:09 yamt Exp $        */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -101,7 +101,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.91 2005/02/26 22:45:12 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.92 2005/04/29 10:39:09 yamt Exp $");
 
 #include "opt_ipsec.h"
 
@@ -126,6 +126,7 @@
 #include <netinet/ip_icmp.h>
 #include <netinet/ip_var.h>
 #include <netinet/in_pcb.h>
+#include <netinet/in_proto.h>
 #include <netinet/icmp_var.h>
 
 #ifdef IPSEC
diff -r ffd3448cef67 -r 887fa936ab01 sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c    Fri Apr 29 09:05:21 2005 +0000
+++ b/sys/netinet/ip_input.c    Fri Apr 29 10:39:09 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_input.c,v 1.214 2005/04/18 21:50:25 yamt Exp $      */
+/*     $NetBSD: ip_input.c,v 1.215 2005/04/29 10:39:09 yamt Exp $      */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -98,7 +98,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.214 2005/04/18 21:50:25 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.215 2005/04/29 10:39:09 yamt Exp $");
 
 #include "opt_inet.h"
 #include "opt_gateway.h"
@@ -131,6 +131,7 @@
 #include <netinet/in_systm.h>
 #include <netinet/ip.h>
 #include <netinet/in_pcb.h>
+#include <netinet/in_proto.h>
 #include <netinet/in_var.h>
 #include <netinet/ip_var.h>
 #include <netinet/ip_icmp.h>
diff -r ffd3448cef67 -r 887fa936ab01 sys/netinet/ip_var.h
--- a/sys/netinet/ip_var.h      Fri Apr 29 09:05:21 2005 +0000
+++ b/sys/netinet/ip_var.h      Fri Apr 29 10:39:09 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_var.h,v 1.70 2005/04/07 12:22:47 yamt Exp $ */
+/*     $NetBSD: ip_var.h,v 1.71 2005/04/29 10:39:09 yamt Exp $ */
 
 /*
  * Copyright (c) 1982, 1986, 1993
@@ -192,7 +192,6 @@
 #define        IP_HDR_ALIGNED_P(ip)    ((((vaddr_t) (ip)) & 3) == 0)
 #endif
 
-extern const struct protosw inetsw[];
 extern struct domain inetdomain;
 
 extern struct ipstat ipstat;           /* ip statistics */
diff -r ffd3448cef67 -r 887fa936ab01 sys/netinet/raw_ip.c
--- a/sys/netinet/raw_ip.c      Fri Apr 29 09:05:21 2005 +0000
+++ b/sys/netinet/raw_ip.c      Fri Apr 29 10:39:09 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: raw_ip.c,v 1.86 2005/03/11 06:16:16 atatat Exp $       */
+/*     $NetBSD: raw_ip.c,v 1.87 2005/04/29 10:39:09 yamt Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.86 2005/03/11 06:16:16 atatat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: raw_ip.c,v 1.87 2005/04/29 10:39:09 yamt Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -88,6 +88,7 @@
 #include <netinet/ip_mroute.h>
 #include <netinet/ip_icmp.h>
 #include <netinet/in_pcb.h>
+#include <netinet/in_proto.h>
 #include <netinet/in_var.h>
 
 #include <machine/stdarg.h>
diff -r ffd3448cef67 -r 887fa936ab01 sys/netinet6/ah_input.c
--- a/sys/netinet6/ah_input.c   Fri Apr 29 09:05:21 2005 +0000
+++ b/sys/netinet6/ah_input.c   Fri Apr 29 10:39:09 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ah_input.c,v 1.45 2005/04/23 14:05:28 manu Exp $       */
+/*     $NetBSD: ah_input.c,v 1.46 2005/04/29 10:39:09 yamt Exp $       */
 /*     $KAME: ah_input.c,v 1.64 2001/09/04 08:43:19 itojun Exp $       */
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ah_input.c,v 1.45 2005/04/23 14:05:28 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ah_input.c,v 1.46 2005/04/29 10:39:09 yamt Exp $");
 
 #include "opt_inet.h"
 
@@ -59,6 +59,7 @@
 #include <netinet/in.h>
 #include <netinet/in_systm.h>
 #include <netinet/in_var.h>
+#include <netinet/in_proto.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
 #include <netinet/ip_ecn.h>
diff -r ffd3448cef67 -r 887fa936ab01 sys/netinet6/esp_input.c
--- a/sys/netinet6/esp_input.c  Fri Apr 29 09:05:21 2005 +0000
+++ b/sys/netinet6/esp_input.c  Fri Apr 29 10:39:09 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: esp_input.c,v 1.36 2005/04/23 14:05:28 manu Exp $      */
+/*     $NetBSD: esp_input.c,v 1.37 2005/04/29 10:39:09 yamt Exp $      */
 /*     $KAME: esp_input.c,v 1.60 2001/09/04 08:43:19 itojun Exp $      */
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: esp_input.c,v 1.36 2005/04/23 14:05:28 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: esp_input.c,v 1.37 2005/04/29 10:39:09 yamt Exp $");
 
 #include "opt_inet.h"
 
@@ -61,6 +61,7 @@
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
 #include <netinet/in_var.h>
+#include <netinet/in_proto.h>
 #include <netinet/ip_ecn.h>
 #include <netinet/ip_icmp.h>
 
diff -r ffd3448cef67 -r 887fa936ab01 sys/netinet6/ipcomp_input.c
--- a/sys/netinet6/ipcomp_input.c       Fri Apr 29 09:05:21 2005 +0000
+++ b/sys/netinet6/ipcomp_input.c       Fri Apr 29 10:39:09 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipcomp_input.c,v 1.23 2005/04/23 14:05:28 manu Exp $   */
+/*     $NetBSD: ipcomp_input.c,v 1.24 2005/04/29 10:39:09 yamt Exp $   */
 /*     $KAME: ipcomp_input.c,v 1.29 2001/09/04 08:43:19 itojun Exp $   */
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipcomp_input.c,v 1.23 2005/04/23 14:05:28 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipcomp_input.c,v 1.24 2005/04/29 10:39:09 yamt Exp $");
 
 #include "opt_inet.h"
 
@@ -60,6 +60,7 @@
 #include <netinet/in.h>
 #include <netinet/in_systm.h>
 #include <netinet/in_var.h>
+#include <netinet/in_proto.h>
 #include <netinet/ip.h>
 #include <netinet/ip_var.h>
 #include <netinet/ip_ecn.h>



Home | Main Index | Thread Index | Old Index