Source-Changes-HG archive

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

[src/trunk]: src/sys/sys Reorder things so that multiple inclusion protection...



details:   https://anonhg.NetBSD.org/src/rev/86e881d55b32
branches:  trunk
changeset: 540028:86e881d55b32
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Dec 01 22:57:17 2002 +0000

description:
Reorder things so that multiple inclusion protection so optional
definitions are outside the protection checks.

diffstat:

 sys/sys/ioctl_compat.h |   8 ++++----
 sys/sys/mbuf.h         |  10 +++++++---
 sys/sys/tty.h          |   8 ++++----
 sys/sys/ttychars.h     |   5 +++--
 4 files changed, 18 insertions(+), 13 deletions(-)

diffs (102 lines):

diff -r 7e9e9d371f57 -r 86e881d55b32 sys/sys/ioctl_compat.h
--- a/sys/sys/ioctl_compat.h    Sun Dec 01 21:32:05 2002 +0000
+++ b/sys/sys/ioctl_compat.h    Sun Dec 01 22:57:17 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ioctl_compat.h,v 1.12 2001/11/11 00:00:15 perry Exp $  */
+/*     $NetBSD: ioctl_compat.h,v 1.13 2002/12/01 22:57:17 matt Exp $   */
 
 /*
  * Copyright (c) 1990, 1993
@@ -40,12 +40,12 @@
  *     @(#)ioctl_compat.h      8.4 (Berkeley) 1/21/94
  */
 
+#include <sys/ttychars.h>
+#include <sys/ttydev.h>
+
 #ifndef _SYS_IOCTL_COMPAT_H_
 #define        _SYS_IOCTL_COMPAT_H_
 
-#include <sys/ttychars.h>
-#include <sys/ttydev.h>
-
 struct tchars {
        char    t_intrc;        /* interrupt */
        char    t_quitc;        /* quit */
diff -r 7e9e9d371f57 -r 86e881d55b32 sys/sys/mbuf.h
--- a/sys/sys/mbuf.h    Sun Dec 01 21:32:05 2002 +0000
+++ b/sys/sys/mbuf.h    Sun Dec 01 22:57:17 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mbuf.h,v 1.67 2002/06/30 22:40:40 thorpej Exp $        */
+/*     $NetBSD: mbuf.h,v 1.68 2002/12/01 22:57:17 matt Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1999, 2001 The NetBSD Foundation, Inc.
@@ -665,7 +665,10 @@
 struct mbuf *m_aux_add __P((struct mbuf *, int, int));
 struct mbuf *m_aux_find __P((struct mbuf *, int, int));
 void m_aux_delete __P((struct mbuf *, struct mbuf *));
+#endif /* _KERNEL */
+#endif /* !_SYS_MBUF_H_ */
 
+#ifdef _KERNEL
 #ifdef MBTYPES
 const int mbtypes[] = {                                /* XXX */
        M_FREE,         /* MT_FREE      0       should be on free list */
@@ -677,7 +680,8 @@
        M_MBUF,         /* MT_CONTROL   6       extra-data protocol message */
        M_MBUF,         /* MT_OOBDATA   7       expedited data  */
 };
+#undef MBTYPES
+#else
+extern const int mbtypes[];
 #endif /* MBTYPES */
 #endif /* _KERNEL */
-
-#endif /* !_SYS_MBUF_H_ */
diff -r 7e9e9d371f57 -r 86e881d55b32 sys/sys/tty.h
--- a/sys/sys/tty.h     Sun Dec 01 21:32:05 2002 +0000
+++ b/sys/sys/tty.h     Sun Dec 01 22:57:17 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tty.h,v 1.53 2002/10/23 09:15:01 jdolecek Exp $        */
+/*     $NetBSD: tty.h,v 1.54 2002/12/01 22:57:17 matt Exp $    */
 
 /*-
  * Copyright (c) 1982, 1986, 1993
@@ -40,14 +40,14 @@
  *     @(#)tty.h       8.7 (Berkeley) 1/9/95
  */
 
-#ifndef _SYS_TTY_H_
-#define _SYS_TTY_H_
-
 #include <sys/termios.h>
 #include <sys/select.h>                /* For struct selinfo. */
 #include <sys/queue.h>
 #include <sys/callout.h>
 
+#ifndef _SYS_TTY_H_
+#define _SYS_TTY_H_
+
 /*
  * Clists are actually ring buffers. The c_cc, c_cf, c_cl fields have
  * exactly the same behaviour as in true clists.
diff -r 7e9e9d371f57 -r 86e881d55b32 sys/sys/ttychars.h
--- a/sys/sys/ttychars.h        Sun Dec 01 21:32:05 2002 +0000
+++ b/sys/sys/ttychars.h        Sun Dec 01 22:57:17 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ttychars.h,v 1.6 1994/06/29 06:45:54 cgd Exp $ */
+/*     $NetBSD: ttychars.h,v 1.7 2002/12/01 22:57:17 matt Exp $        */
 
 /*-
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -59,7 +59,8 @@
        char    tc_werasc;      /* word erase */
        char    tc_lnextc;      /* literal next character */
 };
+#endif /* !_SYS_TTYCHARS_H_ */
+
 #ifdef USE_OLD_TTY
 #include <sys/ttydefaults.h>   /* to pick up character defaults */
 #endif
-#endif /* !_SYS_TTYCHARS_H_ */



Home | Main Index | Thread Index | Old Index