Use -D_KERNEL instead of -DKERNEL for greater FreeBSD compliance.

This commit is contained in:
Ralf Corsepius
2004-04-20 12:28:19 +00:00
parent c2b59d5c10
commit dc28f16d8e
49 changed files with 102 additions and 102 deletions

View File

@@ -268,7 +268,7 @@ typedef void if_init_f_t __P((void *));
} \
}
#ifdef KERNEL
#ifdef _KERNEL
#define IF_ENQ_DROP(ifq, m) if_enq_drop(ifq, m)
#if defined(__GNUC__) && defined(MT_HEADER)
@@ -295,7 +295,7 @@ int if_enq_drop __P((struct ifqueue *, struct mbuf *));
#endif
#endif
#endif /* KERNEL */
#endif /* _KERNEL */
#define IFQ_MAXLEN 50
#define IFNET_SLOWHZ 1 /* granularity is 1 second */
@@ -422,7 +422,7 @@ struct ifconf {
#include <net/if_arp.h>
#ifdef KERNEL
#ifdef _KERNEL
#define IFAFREE(ifa) \
if ((ifa)->ifa_refcnt <= 0) \
ifafree(ifa); \
@@ -469,6 +469,6 @@ void ifafree __P((struct ifaddr *));
int looutput __P((struct ifnet *,
struct mbuf *, struct sockaddr *, struct rtentry *));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_NET_IF_H_ */

View File

@@ -72,7 +72,7 @@ struct sockaddr_dl {
#define LLADDR(s) ((caddr_t)((s)->sdl_data + (s)->sdl_nlen))
#ifndef KERNEL
#ifndef _KERNEL
#include <sys/cdefs.h>
@@ -81,6 +81,6 @@ void link_addr __P((const char *, struct sockaddr_dl *));
char *link_ntoa __P((const struct sockaddr_dl *));
__END_DECLS
#endif /* !KERNEL */
#endif /* !_KERNEL */
#endif

View File

@@ -127,7 +127,7 @@ struct ifpppcstatsreq {
#define ifr_mtu ifr_ifru.ifru_metric
#endif
#if (defined(_KERNEL) || defined(KERNEL)) && !defined(NeXT)
#if (defined(_KERNEL) || defined(_KERNEL)) && !defined(NeXT)
void pppattach __P((void));
void pppintr __P((void));
#endif

View File

@@ -70,7 +70,7 @@
#define schednetisr(anisr) rtems_bsdnet_schednetisr(anisr)
#ifndef LOCORE
#ifdef KERNEL
#ifdef _KERNEL
extern volatile unsigned int netisr; /* scheduling bits for network */
typedef void netisr_t(void);

View File

@@ -65,7 +65,7 @@
#define BCMP(p1, p2, n) bcmp((char *)(p1), (char *)(p2), (int)(n))
#define BCOPY(p1, p2, n) bcopy((char *)(p1), (char *)(p2), (int)(n))
#ifndef KERNEL
#ifndef _KERNEL
#define ovbcopy bcopy
#endif

View File

@@ -39,7 +39,7 @@
*/
#ifndef _RADIX_H_
#include <sys/param.h>
#ifdef KERNEL
#ifdef _KERNEL
#include <sys/systm.h>
#include <sys/malloc.h>
#define M_DONTWAIT M_NOWAIT
@@ -1006,7 +1006,7 @@ void
rn_init()
{
char *cp, *cplim;
#ifdef KERNEL
#ifdef _KERNEL
struct domain *dom;
for (dom = domains; dom; dom = dom->dom_next)

View File

@@ -136,7 +136,7 @@ struct radix_node_head {
struct radix_node rnh_nodes[3]; /* empty tree for common case */
};
#ifndef KERNEL
#ifndef _KERNEL
#define Bcmp(a, b, n) bcmp(((char *)(a)), ((char *)(b)), (n))
#define Bcopy(a, b, n) bcopy(((char *)(a)), ((char *)(b)), (unsigned)(n))
#define Bzero(p, n) bzero((char *)(p), (int)(n));
@@ -148,7 +148,7 @@ struct radix_node_head {
#define Bzero(p, n) bzero((caddr_t)(p), (unsigned)(n));
#define R_Malloc(p, t, n) (p = (t) malloc((unsigned long)(n), M_RTABLE, M_DONTWAIT))
#define Free(p) free((caddr_t)p, M_RTABLE);
#endif /*KERNEL*/
#endif /*_KERNEL*/
extern struct radix_node_head *mask_rnhead;

View File

@@ -58,7 +58,7 @@ struct rawcb {
#define RAWSNDQ 8192
#define RAWRCVQ 8192
#ifdef KERNEL
#ifdef _KERNEL
extern struct rawcb rawcb; /* head of list */
int raw_attach __P((struct socket *, int));

View File

@@ -251,7 +251,7 @@ struct route_cb {
int any_count;
};
#ifdef KERNEL
#ifdef _KERNEL
#define RTFREE(rt) \
do { \
if ((rt)->rt_refcnt <= 1) \

View File

@@ -71,7 +71,7 @@ struct icmpstat {
{ "stats", CTLTYPE_STRUCT }, \
}
#ifdef KERNEL
#ifdef _KERNEL
SYSCTL_DECL(_net_inet_icmp);
extern struct icmpstat icmpstat;
#endif

View File

@@ -56,7 +56,7 @@
#define ETHERMTU (ETHER_MAX_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
#define ETHERMIN (ETHER_MIN_LEN-ETHER_HDR_LEN-ETHER_CRC_LEN)
#ifdef KERNEL
#ifdef _KERNEL
/*
* Macro to map an IP multicast address to an Ethernet multicast address.
* The high-order 25 bits of the Ethernet address are statically assigned,
@@ -127,7 +127,7 @@ struct sockaddr_inarp {
#define RTF_USETRAILERS RTF_PROTO1 /* use trailers */
#define RTF_ANNOUNCE RTF_PROTO2 /* announce new arp entry */
#ifdef KERNEL
#ifdef _KERNEL
extern u_char etherbroadcastaddr[ETHER_ADDR_LEN];
extern u_char ether_ipmulticast_min[ETHER_ADDR_LEN];
extern u_char ether_ipmulticast_max[ETHER_ADDR_LEN];

View File

@@ -62,7 +62,7 @@ struct igmpstat {
u_int igps_snd_reports; /* sent membership reports */
};
#ifdef KERNEL
#ifdef _KERNEL
extern struct igmpstat igmpstat;
#define IGMP_RANDOM_DELAY(X) (random() % (X) + 1)

View File

@@ -252,7 +252,7 @@ struct in_addr {
#define INADDR_ANY (u_long)0x00000000
#define INADDR_BROADCAST (u_long)0xffffffff /* must be masked */
#ifndef KERNEL
#ifndef _KERNEL
#define INADDR_NONE 0xffffffff /* -1 return */
#endif
@@ -414,7 +414,7 @@ struct ip_mreq {
}
#ifdef KERNEL
#ifdef _KERNEL
struct ifnet; struct mbuf; /* forward declarations for Standard C */
int in_broadcast __P((struct in_addr, struct ifnet *));
@@ -438,6 +438,6 @@ extern ip_nat_ctl_t *ip_nat_ctl_ptr;
#define IP_NAT_IN 0x00000001
#define IP_NAT_OUT 0x00000002
#endif /* KERNEL */
#endif /* _KERNEL */
#endif

View File

@@ -132,7 +132,7 @@ struct inpcbinfo {
#define sotoinpcb(so) ((struct inpcb *)(so)->so_pcb)
#ifdef KERNEL
#ifdef _KERNEL
void in_losing __P((struct inpcb *));
int in_pcballoc __P((struct socket *, struct inpcbinfo *));
int in_pcbbind __P((struct inpcb *, struct mbuf *));

View File

@@ -55,7 +55,7 @@ typedef u_long n_long; /* long as received from the net */
typedef u_long n_time; /* ms since 00:00 GMT, byte rev */
#ifdef KERNEL
#ifdef _KERNEL
n_time iptime __P((void));
#endif

View File

@@ -82,7 +82,7 @@ struct in_aliasreq {
((ntohl((in).s_addr) & ~((struct in_ifaddr *)(ifa)->ia_subnetmask))
#ifdef KERNEL
#ifdef _KERNEL
extern struct in_ifaddr *in_ifaddr;
extern struct ifqueue ipintrq; /* ip packet input queue */
extern struct in_addr zeroin_addr;
@@ -160,7 +160,7 @@ struct in_multi {
struct router_info *inm_rti; /* router info*/
};
#ifdef KERNEL
#ifdef _KERNEL
#ifdef SYSCTL_DECL
SYSCTL_DECL(_net_inet_ip);
@@ -236,6 +236,6 @@ int in_control __P((struct socket *, u_long, caddr_t, struct ifnet *));
void in_rtqdrain __P((void));
void ip_input __P((struct mbuf *));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* _NETINET_IN_VAR_H_ */

View File

@@ -171,13 +171,13 @@ struct ip_fw_chain {
/*
* Main firewall chains definitions and global var's definitions.
*/
#ifdef KERNEL
#ifdef _KERNEL
/*
* Function definitions.
*/
void ip_fw_init(void);
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* _IP_FW_H */

View File

@@ -182,7 +182,7 @@ struct icmp {
(type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
(type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
#ifdef KERNEL
#ifdef _KERNEL
void icmp_error __P((struct mbuf *, int, int, n_long, struct ifnet *));
void icmp_input __P((struct mbuf *, int));
#endif

View File

@@ -246,7 +246,7 @@ struct tbf
struct mbuf *tbf_t; /* tail-insertion pointer */
};
#ifdef KERNEL
#ifdef _KERNEL
extern int (*ip_mrouter_set) __P((int, struct socket *, struct mbuf *));
extern int (*ip_mrouter_get) __P((int, struct socket *, struct mbuf **));
@@ -257,6 +257,6 @@ extern int (*mrt_ioctl) __P((int, caddr_t));
extern int (*mrt_ioctl) __P((int, caddr_t, struct proc *));
#endif
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* _NETINET_IP_MROUTE_H_ */

View File

@@ -150,7 +150,7 @@ struct ipstat {
u_long ips_toolong; /* ip length > max ip packet size */
};
#ifdef KERNEL
#ifdef _KERNEL
/* flags passed to ip_output as last parameter */
#define IP_FORWARDING 0x1 /* most of ip header exists */
#define IP_RAWOUTPUT 0x2 /* raw ip header exists */
@@ -207,6 +207,6 @@ extern u_short ip_divert_port;
extern u_short ip_divert_ignore;
#endif /* IPDIVERT */
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* _NETINET_IP_VAR_H_ */

View File

@@ -60,7 +60,7 @@ static char *tanames[] =
#define TCP_NDEBUG 100
#ifndef KERNEL
#ifndef _KERNEL
/* XXX common variables for broken applications. */
struct tcp_debug tcp_debug[TCP_NDEBUG];
int tcp_debx;

View File

@@ -78,7 +78,7 @@
#define TCP_PAWS_IDLE (24 * 24 * 60 * 60 * PR_SLOWHZ)
/* timestamp wrap-around time */
#ifdef KERNEL
#ifdef _KERNEL
extern tcp_cc tcp_ccgen; /* global connection count */
/*
@@ -98,5 +98,5 @@ extern tcp_cc tcp_ccgen; /* global connection count */
extern tcp_seq tcp_iss; /* tcp initial send seq # */
#else
#define TCP_ISSINCR (250*1024) /* increment for tcp_iss each second */
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* _NETINET_TCP_SEQ_H_ */

View File

@@ -126,7 +126,7 @@ static char *tcptimers[] =
(tv) = (tvmax); \
}
#ifdef KERNEL
#ifdef _KERNEL
extern int tcp_keepinit; /* time to establish connection */
extern int tcp_keepidle; /* time before keepalive probes begin */
extern int tcp_keepintvl; /* time between keepalive probes */

View File

@@ -353,7 +353,7 @@ struct xtcpcb {
{ "keepinit", CTLTYPE_INT }, \
}
#ifdef KERNEL
#ifdef _KERNEL
#ifdef SYSCTL_DECL
SYSCTL_DECL(_net_inet_tcp);
#endif
@@ -400,6 +400,6 @@ extern struct pr_usrreqs tcp_usrreqs;
extern u_long tcp_sendspace;
extern u_long tcp_recvspace;
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* _NETINET_TCP_VAR_H_ */

View File

@@ -89,7 +89,7 @@ struct udpstat {
{ "recvspace", CTLTYPE_INT }, \
}
#ifdef KERNEL
#ifdef _KERNEL
SYSCTL_DECL(_net_inet_udp);
extern struct inpcbhead udb;

View File

@@ -269,7 +269,7 @@ struct nfsstats {
* such as SIGALRM will not expect file I/O system calls to be interrupted
* by them and break.
*/
#if defined(KERNEL) || defined(_KERNEL)
#if defined(_KERNEL) || defined(_KERNEL)
struct uio; struct buf; struct vattr; struct nameidata; /* XXX */
@@ -615,6 +615,6 @@ extern int nfs_debug;
#endif
#endif /* KERNEL */
#endif /* _KERNEL */
#endif

View File

@@ -15,14 +15,14 @@
#if defined(__INSIDE_RTEMS_BSD_TCPIP_STACK__)
#undef _COMPILING_BSD_KERNEL_
#undef KERNEL
#undef _KERNEL
#undef INET
#undef NFS
#undef DIAGNOSTIC
#undef BOOTP_COMPAT
#define _COMPILING_BSD_KERNEL_
#define KERNEL
#define _KERNEL
#define INET
#define NFS
#define DIAGNOSTIC

View File

@@ -87,7 +87,7 @@ struct sigaltstack {
int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */
};
#ifdef KERNEL
#ifdef _KERNEL
typedef int boolean_t;
typedef struct vm_page *vm_page_t;
#endif

View File

@@ -186,7 +186,7 @@ extern TAILQ_HEAD(bqueues, buf) bufqueues[BUFFER_QUEUES];
#define B_CLRBUF 0x01 /* Request allocated buffer be cleared. */
#define B_SYNC 0x02 /* Do all allocations synchronously. */
#ifdef KERNEL
#ifdef _KERNEL
extern int nbuf; /* The number of buffer headers */
extern struct buf *buf; /* The buffer headers. */
extern char *buffers; /* The buffer contents. */
@@ -243,6 +243,6 @@ void vm_bounce_alloc __P((struct buf *));
void vm_bounce_free __P((struct buf *));
vm_offset_t vm_bounce_kva_alloc __P((int));
void vm_bounce_kva_alloc_free __P((vm_offset_t, int));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_SYS_BUF_H_ */

View File

@@ -49,7 +49,7 @@ struct callout {
int c_time; /* ticks to the event */
};
#ifdef KERNEL
#ifdef _KERNEL
extern struct callout *callfree, *callout, calltodo;
extern int ncallout;
#endif

View File

@@ -94,7 +94,7 @@ struct bdevsw {
int d_maj; /* the major number we were assigned */
};
#ifdef KERNEL
#ifdef _KERNEL
extern struct bdevsw *bdevsw[];
#endif
@@ -118,7 +118,7 @@ struct cdevsw {
int d_maj;
};
#ifdef KERNEL
#ifdef _KERNEL
extern struct cdevsw *cdevsw[];
#endif
@@ -136,7 +136,7 @@ struct linesw {
l_modem_t *l_modem;
};
#ifdef KERNEL
#ifdef _KERNEL
extern struct linesw linesw[];
extern int nlinesw;
@@ -158,7 +158,7 @@ struct swdevt {
#define SW_SEQUENTIAL 0x02
#define sw_freed sw_flags /* XXX compat */
#ifdef KERNEL
#ifdef _KERNEL
d_open_t noopen;
d_close_t noclose;
d_read_t noread;
@@ -221,7 +221,7 @@ int isdisk __P((dev_t dev, int type));
int iskmemdev __P((dev_t dev));
int iszerodev __P((dev_t dev));
void setconf __P((void));
#endif /* KERNEL */
#endif /* _KERNEL */
#include <machine/conf.h>

View File

@@ -63,7 +63,7 @@ struct domain {
int dom_maxrtkey; /* for routing layer */
};
#ifdef KERNEL
#ifdef _KERNEL
extern struct domain *domains;
extern struct domain localdomain;

View File

@@ -258,7 +258,7 @@ struct kmembuckets {
long kb_couldfree; /* over high water mark and could free */
};
#ifdef KERNEL
#ifdef _KERNEL
#define MINALLOCSIZE (1 << MINBUCKET)
#define BUCKETINDX(size) \
((size) <= (MINALLOCSIZE * 128) \
@@ -350,6 +350,6 @@ void *contigmalloc __P((unsigned long size, int type, int flags,
unsigned long alignment, unsigned long boundary));
void free __P((void *addr, int type));
void *malloc __P((unsigned long size, int type, int flags));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_SYS_MALLOC_H_ */

View File

@@ -376,7 +376,7 @@ struct mbstat {
u_short m_mtypes[256]; /* type specific mbuf allocations */
};
#ifdef KERNEL
#ifdef _KERNEL
extern struct mbuf *mbutl; /* virtual address of mclusters */
extern char *mclrefcnt; /* cluster reference counts */
extern struct mbstat mbstat;

View File

@@ -37,7 +37,7 @@
#ifndef _SYS_MOUNT_H_
#define _SYS_MOUNT_H_
#ifndef KERNEL
#ifndef _KERNEL
#include <sys/ucred.h>
#endif
#include <sys/queue.h>
@@ -233,7 +233,7 @@ struct vfsconf {
/*
* Operations supported on mounted file system.
*/
#ifdef KERNEL
#ifdef _KERNEL
extern int doforce; /* Flag to permit forcible unmounting. */
extern struct vfsconf void_vfsconf;
@@ -312,7 +312,7 @@ struct vfsops {
DATA_SET(vfs_set,_fs_vfsconf)
#endif /* VFS_LKM */
#endif /* KERNEL */
#endif /* _KERNEL */
/*
* Flags for various system call interfaces.
@@ -331,7 +331,7 @@ struct fhandle {
};
typedef struct fhandle fhandle_t;
#ifdef KERNEL
#ifdef _KERNEL
#include <net/radix.h>
#include <sys/socket.h> /* XXX for AF_MAX */
@@ -351,7 +351,7 @@ struct netexport {
struct netcred ne_defexported; /* Default export */
struct radix_node_head *ne_rtable[AF_MAX+1]; /* Individual exports */
};
#endif /* KERNEL */
#endif /* _KERNEL */
/*
* Export arguments for local filesystem mount calls.
@@ -477,7 +477,7 @@ struct nfs_args {
#define NFSMNT_AUTHERR 0x80000000 /* Authentication error */
#endif /* NFS */
#ifdef KERNEL
#ifdef _KERNEL
extern int (*mountroot) __P((void *));
extern struct vfsops *mountrootvfsops;
@@ -503,7 +503,7 @@ void vfs_unbusy __P((struct mount *)); /* mark a vfs not busy */
extern CIRCLEQ_HEAD(mntlist, mount) mountlist; /* mounted filesystem list */
extern struct vfsops *vfssw[]; /* filesystem type table */
#else /* KERNEL */
#else /* _KERNEL */
#include <sys/cdefs.h>
@@ -526,6 +526,6 @@ int vfsisloadable __P((const char *));
int vfsload __P((const char *));
__END_DECLS
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_SYS_MOUNT_H_ */

View File

@@ -166,7 +166,7 @@ char *prurequests[] = {
};
#endif
#ifdef KERNEL /* users shouldn't see this decl */
#ifdef _KERNEL /* users shouldn't see this decl */
struct stat;
struct ifnet;
@@ -223,7 +223,7 @@ int pru_sense_null __P((struct socket *so, struct stat *sb));
extern struct pr_usrreqs pru_oldstyle;
#endif /* PRU_OLDSTYLE */
#endif /* KERNEL */
#endif /* _KERNEL */
/*
* The arguments to the ctlinput routine are
@@ -292,7 +292,7 @@ char *prcorequests[] = {
};
#endif
#ifdef KERNEL
#ifdef _KERNEL
struct protosw *pffindproto __P((int family, int protocol, int type));
struct protosw *pffindtype __P((int family, int type));
#endif

View File

@@ -557,7 +557,7 @@ struct { \
(elm)->field.cqe_next; \
}
#ifdef KERNEL
#ifdef _KERNEL
/*
* XXX insque() and remque() are an old way of handling certain queues.

View File

@@ -60,11 +60,11 @@ struct rtprio {
};
#endif
#ifndef KERNEL
#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
int rtprio __P((int, pid_t, struct rtprio *));
__END_DECLS
#endif /* !KERNEL */
#endif /* !_KERNEL */
#endif /* !_SYS_RTPRIO_H_ */

View File

@@ -51,7 +51,7 @@ struct selinfo {
};
#define SI_COLL 0x0001 /* collision occurred */
#ifdef KERNEL
#ifdef _KERNEL
struct proc;
void selrecord __P((struct proc *selector, struct selinfo *));

View File

@@ -147,7 +147,7 @@ static int sigprop[NSIG + 1] = {
#define sigcantmask (sigmask(SIGKILL) | sigmask(SIGSTOP))
#ifdef KERNEL
#ifdef _KERNEL
/*
* Machine-independent functions:
*/
@@ -167,5 +167,5 @@ void trapsignal __P((struct proc *p, int sig, u_long code));
* Machine-dependent functions:
*/
void sendsig __P((sig_t action, int sig, int returnmask, u_long code));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_SYS_SIGNALVAR_H_ */

View File

@@ -342,7 +342,7 @@ struct omsghdr {
int msg_accrightslen;
};
#ifndef KERNEL
#ifndef _KERNEL
__BEGIN_DECLS
int accept __P((int, struct sockaddr *, int *));
@@ -365,7 +365,7 @@ int socket __P((int, int, int));
int socketpair __P((int, int, int, int *));
__END_DECLS
#else /* KERNEL */
#else /* _KERNEL */
void pfctlinput __P((int, struct sockaddr *));
#endif /* !KERNEL */
#endif /* !_KERNEL */
#endif /* !_SYS_SOCKET_H_ */

View File

@@ -200,7 +200,7 @@ struct socket {
#define sowwakeup(so) sowakeup((so), &(so)->so_snd)
#ifdef KERNEL
#ifdef _KERNEL
extern u_long sb_max;
/* to catch callers missing new second argument to sonewconn: */
@@ -276,6 +276,6 @@ int sosetopt __P((struct socket *so, int level, int optname,
struct mbuf *m0));
int soshutdown __P((struct socket *so, int how));
void sowakeup __P((struct socket *so, struct sockbuf *sb));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_SYS_SOCKETVAR_H_ */

View File

@@ -102,7 +102,7 @@ struct ctlname {
*/
#define CTL_AUTO_START 0x100
#ifdef KERNEL
#ifdef _KERNEL
#define SYSCTL_HANDLER_ARGS struct sysctl_oid *oidp, void *arg1, int arg2, \
struct sysctl_req *req
@@ -277,7 +277,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
sysctl_add_oid(ctx, parent, nbr, name, (access), \
ptr, arg, handler, fmt, descr)
#endif /* KERNEL */
#endif /* _KERNEL */
/*
* Top-level identifiers
@@ -551,7 +551,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
{ "timer_max", CTLTYPE_INT }, \
}
#ifdef KERNEL
#ifdef _KERNEL
/*
* Declare some common oids.
@@ -602,7 +602,7 @@ int sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid **noid,
int *nindx, struct sysctl_req *req);
void sysctl_wire_old_buffer(struct sysctl_req *req, size_t len);
#else /* !KERNEL */
#else /* !_KERNEL */
#include <sys/cdefs.h>
__BEGIN_DECLS
@@ -610,6 +610,6 @@ int sysctl(int *, u_int, void *, size_t *, void *, size_t);
int sysctlbyname(const char *, void *, size_t *, void *, size_t);
int sysctlnametomib(const char *, int *, size_t *);
__END_DECLS
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_SYS_SYSCTL_H_ */

View File

@@ -151,7 +151,7 @@ CODE facilitynames[] = {
};
#endif
#ifdef KERNEL
#ifdef _KERNEL
#define LOG_PRINTF -1 /* pseudo-priority to indicate use of printf */
#endif
@@ -175,9 +175,9 @@ CODE facilitynames[] = {
#define LOG_PERROR 0x20 /* log to stderr as well */
/*
#ifdef KERNEL
#ifdef _KERNEL
#else not KERNEL */
#else not _KERNEL */
#include <sys/cdefs.h>
#include <stdarg.h>
@@ -190,6 +190,6 @@ void syslog __P((int, const char *, ...));
void vsyslog __P((int, const char *, va_list));
__END_DECLS
/* #endif !KERNEL */
/* #endif !_KERNEL */
#endif

View File

@@ -50,7 +50,7 @@ struct ucred {
#define NOCRED ((struct ucred *)0) /* no credential available */
#define FSCRED ((struct ucred *)-1) /* filesystem credential */
#ifdef KERNEL
#ifdef _KERNEL
#define crhold(cr) (cr)->cr_ref++
struct ucred *crcopy __P((struct ucred *cr));
@@ -59,6 +59,6 @@ void crfree __P((struct ucred *cr));
struct ucred *crget __P((void));
int suser __P((struct ucred *cred, u_short *acflag));
int groupmember __P((gid_t gid, struct ucred *cred));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_SYS_UCRED_H_ */

View File

@@ -56,7 +56,7 @@ enum uio_seg {
UIO_NOCOPY /* don't copy, already in object */
};
#ifdef KERNEL
#ifdef _KERNEL
struct uio {
struct iovec *uio_iov;
int uio_iovcnt;
@@ -72,13 +72,13 @@ struct uio {
*/
#define UIO_MAXIOV 1024 /* max 1K of iov's */
#define UIO_SMALLIOV 8 /* 8 on stack, else malloc */
#endif /* KERNEL */
#endif /* _KERNEL */
#ifdef KERNEL
#ifdef _KERNEL
int uiomove __P((caddr_t, int, struct uio *));
#else /* !KERNEL */
#else /* !_KERNEL */
#include <sys/cdefs.h>
@@ -87,6 +87,6 @@ ssize_t readv __P((int, const struct iovec *, int));
ssize_t writev __P((int, const struct iovec *, int));
__END_DECLS
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_SYS_UIO_H_ */

View File

@@ -52,7 +52,7 @@ typedef struct vm_map *vm_map_t;
struct vm_object;
typedef struct vm_object *vm_object_t;
#ifndef KERNEL
#ifndef _KERNEL
/*
* This is defined in <sys/types.h> for the kernel so that non-vm kernel
* sources (mainly Mach-derived ones such as ddb) don't have to include

View File

@@ -44,7 +44,7 @@ struct vmtotal;
struct mount;
struct vnode;
#ifdef KERNEL
#ifdef _KERNEL
#ifdef TYPEDEF_FOR_UAP
int getpagesize __P((struct proc * p, void *, int *));
@@ -98,6 +98,6 @@ void vm_object_print __P((/* db_expr_t */ int, boolean_t, /* db_expr_t */ int,
char *));
void vm_fault_quick __P((caddr_t v, int prot));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_VM_EXTERN_H_ */

View File

@@ -98,7 +98,7 @@
#endif
#ifdef KERNEL
#ifdef _KERNEL
extern vm_size_t page_mask;
extern int page_shift;
@@ -153,13 +153,13 @@ extern int page_shift;
* Convert addresses to pages and vice versa.
* No rounding is used.
*/
#ifdef KERNEL
#ifdef _KERNEL
#define num_pages(x) \
((vm_offset_t)((((vm_offset_t)(x)) + PAGE_MASK) >> PAGE_SHIFT))
extern vm_size_t mem_size; /* size of physical memory (bytes) */
extern vm_offset_t first_addr; /* first physical page */
extern vm_offset_t last_addr; /* last physical page */
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* ASSEMBLER */
#endif /* _VM_PARAM_ */