From 15b9bcb121e1f3735a2c98a11afdb52a03301d7e Mon Sep 17 00:00:00 2001 From: peter Date: Wed, 29 Dec 1999 04:46:21 +0000 Subject: Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL" is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come. --- sys/netkey/key.h | 4 ++-- sys/netkey/key_debug.c | 26 ++++++++++---------------- sys/netkey/key_debug.h | 8 ++++---- sys/netkey/keydb.h | 4 ++-- sys/netkey/keysock.h | 4 ++-- 5 files changed, 20 insertions(+), 26 deletions(-) (limited to 'sys/netkey') diff --git a/sys/netkey/key.h b/sys/netkey/key.h index ec02403..2062a24 100644 --- a/sys/netkey/key.h +++ b/sys/netkey/key.h @@ -34,7 +34,7 @@ #ifndef _NETKEY_KEY_H_ #define _NETKEY_KEY_H_ -#if defined(KERNEL) +#ifdef _KERNEL extern struct key_cb key_cb; @@ -74,5 +74,5 @@ extern void key_sa_routechange __P((struct sockaddr *dst)); MALLOC_DECLARE(M_SECA); #endif /* MALLOC_DECLARE */ -#endif /* defined(KERNEL) */ +#endif /* _KERNEL */ #endif /* _NETKEY_KEY_H_ */ diff --git a/sys/netkey/key_debug.c b/sys/netkey/key_debug.c index ad91068..fc6e3a3 100644 --- a/sys/netkey/key_debug.c +++ b/sys/netkey/key_debug.c @@ -32,19 +32,13 @@ /* KAME @(#)$Id: key_debug.c,v 1.1.6.2.4.3 1999/07/06 12:05:13 itojun Exp $ */ #ifdef _KERNEL -# ifndef KERNEL -# define KERNEL -# endif -#endif - -#ifdef KERNEL #include "opt_inet6.h" #include "opt_ipsec.h" #endif #include #include -#ifdef KERNEL +#ifdef _KERNEL #include #include #endif @@ -59,13 +53,13 @@ #include #include -#if !defined(KERNEL) +#ifndef _KERNEL #include #include #include -#endif /* defined(KERNEL) */ +#endif -#if !defined(KERNEL) || (defined(KERNEL) && defined(IPSEC_DEBUG)) +#if !defined(_KERNEL) || (defined(_KERNEL) && defined(IPSEC_DEBUG)) static void kdebug_sadb_prop __P((struct sadb_ext *)); static void kdebug_sadb_identity __P((struct sadb_ext *)); @@ -75,11 +69,11 @@ static void kdebug_sadb_sa __P((struct sadb_ext *)); static void kdebug_sadb_address __P((struct sadb_ext *)); static void kdebug_sadb_key __P((struct sadb_ext *)); -#ifdef KERNEL +#ifdef _KERNEL static void kdebug_secreplay __P((struct secreplay *)); #endif -#ifndef KERNEL +#ifndef _KERNEL #define panic(param) { printf(param); exit(-1); } #endif @@ -234,7 +228,7 @@ kdebug_sadb_identity(ext) printf(" type=%d id=%lu", id->sadb_ident_type, (u_long)id->sadb_ident_id); if (len) { -#ifdef KERNEL +#ifdef _KERNEL ipsec_hexdump((caddr_t)(id + 1), len); /*XXX cast ?*/ #else char *p, *ep; @@ -422,7 +416,7 @@ kdebug_sadb_x_policy(ext) return; } -#ifdef KERNEL +#ifdef _KERNEL /* %%%: about SPD and SAD */ void kdebug_secpolicy(sp) @@ -626,7 +620,7 @@ kdebug_mbuf(m0) return; } -#endif /* KERNEL */ +#endif /* _KERNEL */ void kdebug_sockaddr(addr) @@ -655,7 +649,7 @@ kdebug_sockaddr(addr) return; } -#endif /* !defined(KERNEL) || (defined(KERNEL) && defined(IPSEC_DEBUG)) */ +#endif /* !defined(_KERNEL) || (defined(_KERNEL) && defined(IPSEC_DEBUG)) */ void ipsec_bindump(buf, len) diff --git a/sys/netkey/key_debug.h b/sys/netkey/key_debug.h index 2ce0dc0..53eead8 100644 --- a/sys/netkey/key_debug.h +++ b/sys/netkey/key_debug.h @@ -55,16 +55,16 @@ #define KEYDEBUG(lev,arg) if ((key_debug_level & (lev)) == (lev)) { arg; } -#ifdef KERNEL +#ifdef _KERNEL extern u_int32_t key_debug_level; -#endif /*KERNEL*/ +#endif struct sadb_msg; struct sadb_ext; extern void kdebug_sadb __P((struct sadb_msg *)); extern void kdebug_sadb_x_policy __P((struct sadb_ext *)); -#ifdef KERNEL +#ifdef _KERNEL struct secpolicy; struct secpolicyindex; struct secasindex; @@ -77,7 +77,7 @@ extern void kdebug_secasindex __P((struct secasindex *)); extern void kdebug_secasv __P((struct secasvar *)); extern void kdebug_mbufhdr __P((struct mbuf *)); extern void kdebug_mbuf __P((struct mbuf *)); -#endif /*KERNEL*/ +#endif struct sockaddr; extern void kdebug_sockaddr __P((struct sockaddr *)); diff --git a/sys/netkey/keydb.h b/sys/netkey/keydb.h index 9574a44..af4b3ba 100644 --- a/sys/netkey/keydb.h +++ b/sys/netkey/keydb.h @@ -32,7 +32,7 @@ #ifndef _NETKEY_KEYDB_H_ #define _NETKEY_KEYDB_H_ -#ifdef KERNEL +#ifdef _KERNEL /* Security Assocciation Index */ /* NOTE: Encure to be same address family */ @@ -130,6 +130,6 @@ struct key_cb { int any_count; }; -#endif /* KERNEL */ +#endif /* _KERNEL */ #endif /* _NETKEY_KEYDB_H_ */ diff --git a/sys/netkey/keysock.h b/sys/netkey/keysock.h index 2fb475f..b899edd 100644 --- a/sys/netkey/keysock.h +++ b/sys/netkey/keysock.h @@ -34,7 +34,7 @@ #ifndef _NETKEY_KEYSOCK_H_ #define _NETKEY_KEYSOCK_H_ -#if defined(KERNEL) +#ifdef _KERNEL struct keycb { struct rawcb kp_raw; /* rawcb */ int kp_promisc; /* promiscuous mode */ @@ -51,6 +51,6 @@ extern int key_usrreq __P((struct socket *, int, struct mbuf *, extern int key_sendup __P((struct socket *, struct sadb_msg *, u_int, int)); -#endif /* defined(KERNEL) */ +#endif /* _KERNEL */ #endif _NETKEY_KEYSOCK_H_ -- cgit v1.1