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.
This commit is contained in:
Peter Wemm 1999-12-29 05:07:58 +00:00
parent 664a31e496
commit c447342094
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=55206
111 changed files with 272 additions and 258 deletions

View file

@ -78,7 +78,7 @@ typedef struct _dirdesc {
#endif /* _POSIX_SOURCE */
#ifndef KERNEL
#ifndef _KERNEL
#include <sys/cdefs.h>
@ -100,6 +100,6 @@ int readdir_r __P((DIR *, struct dirent *, struct dirent **));
#endif /* not POSIX */
__END_DECLS
#endif /* !KERNEL */
#endif /* !_KERNEL */
#endif /* !_DIRENT_H_ */

View file

@ -1,5 +1,6 @@
/*
* @(#)des_crypt.h 2.1 88/08/11 4.0 RPCSRC; from 1.4 88/02/08 (C) 1986 SMI
* $FreeBSD$
*
* des_crypt.h, des library routine interface
* Copyright (C) 1986, Sun Microsystems, Inc.
@ -101,7 +102,7 @@ ecb_crypt(/* key, buf, len, mode */); /*
#endif
__END_DECLS
#ifndef KERNEL
#ifndef _KERNEL
/*
* Set des parity for a key.
* DES parity is odd and in the low bit of each byte

View file

@ -264,7 +264,7 @@ extern int svc_maxfd;
extern fd_set svc_fdset;
#define svc_fds svc_fdset.fds_bits[0] /* compatibility */
#ifndef KERNEL
#ifndef _KERNEL
/*
* a small program implemented by the svc_rpc implementation itself;
* also see clnt.h for protocol numbers.

View file

@ -129,7 +129,7 @@ typedef struct __rpc_xdr {
* to be decoded. If this pointer is 0, then the type routines should
* allocate dynamic storage of the appropriate size and return it.
*/
#ifdef KERNEL
#ifdef _KERNEL
typedef bool_t (*xdrproc_t) __P((XDR *, void *, u_int));
#else
/*

View file

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
#if !defined(lint) && !defined(KERNEL) && defined(LIBC_SCCS)
#if !defined(lint) && !defined(_KERNEL) && defined(LIBC_SCCS)
#if 0
static char sccsid[] = "@(#)mcount.c 8.1 (Berkeley) 6/4/93";
#endif
@ -41,7 +41,7 @@ static const char rcsid[] =
#include <sys/param.h>
#include <sys/gmon.h>
#ifdef KERNEL
#ifdef _KERNEL
#include <sys/systm.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
@ -78,7 +78,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
register struct tostruct *top, *prevtop;
register struct gmonparam *p;
register long toindex;
#ifdef KERNEL
#ifdef _KERNEL
MCOUNT_DECL(s)
#endif
@ -91,14 +91,14 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
if (p->state != GMON_PROF_ON)
return;
#endif
#ifdef KERNEL
#ifdef _KERNEL
MCOUNT_ENTER(s);
#else
p->state = GMON_PROF_BUSY;
#endif
frompci = frompc - p->lowpc;
#ifdef KERNEL
#ifdef _KERNEL
/*
* When we are called from an exception handler, frompci may be
* for a user address. Convert such frompci's to the index of
@ -112,7 +112,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
if (frompci >= p->textsize)
goto done;
}
#endif /* KERNEL */
#endif
#ifdef GUPROF
if (p->state != GMON_PROF_HIRES)
@ -161,7 +161,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
skip_guprof_stuff:
#endif /* GUPROF */
#ifdef KERNEL
#ifdef _KERNEL
/*
* When we are called from an exception handler, frompc is faked
* to be for where the exception occurred. We've just solidified
@ -177,7 +177,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
else
frompci = (uintfptr_t)btrap - p->lowpc;
}
#endif /* KERNEL */
#endif
/*
* check that frompc is a reasonable pc value.
@ -259,7 +259,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
}
done:
#ifdef KERNEL
#ifdef _KERNEL
MCOUNT_EXIT(s);
#else
p->state = GMON_PROF_ON;
@ -267,7 +267,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
return;
overflow:
p->state = GMON_PROF_ERROR;
#ifdef KERNEL
#ifdef _KERNEL
MCOUNT_EXIT(s);
#endif
return;

View file

@ -123,14 +123,14 @@ authunix_create(machname, uid, gid, len, aup_gids)
* Allocate and set up auth handle
*/
auth = (AUTH *)mem_alloc(sizeof(*auth));
#ifndef KERNEL
#ifndef _KERNEL
if (auth == NULL) {
(void)fprintf(stderr, "authunix_create: out of memory\n");
return (NULL);
}
#endif
au = (struct audata *)mem_alloc(sizeof(*au));
#ifndef KERNEL
#ifndef _KERNEL
if (au == NULL) {
(void)fprintf(stderr, "authunix_create: out of memory\n");
return (NULL);
@ -166,7 +166,7 @@ authunix_create(machname, uid, gid, len, aup_gids)
abort();
au->au_origcred.oa_length = len = XDR_GETPOS(&xdrs);
au->au_origcred.oa_flavor = AUTH_UNIX;
#ifdef KERNEL
#ifdef _KERNEL
au->au_origcred.oa_base = mem_alloc((u_int) len);
#else
if ((au->au_origcred.oa_base = mem_alloc((u_int) len)) == NULL) {

View file

@ -33,7 +33,12 @@
#ident "@(#)svc_auth.c 1.16 94/04/24 SMI"
#if !defined(lint) && defined(SCCSIDS)
#if 0
static char sccsid[] = "@(#)svc_auth.c 1.26 89/02/07 Copyr 1984 Sun Micro";
#else
static const char rcsid[] =
"$FreeBSD$";
#endif
#endif
/*
@ -41,7 +46,7 @@ static char sccsid[] = "@(#)svc_auth.c 1.26 89/02/07 Copyr 1984 Sun Micro";
*
*/
#ifdef KERNEL
#ifdef _KERNEL
#include <sys/param.h>
#include <rpc/types.h>
#include <rpc/xdr.h>

View file

@ -50,9 +50,9 @@ static const char rcsid[] =
#include <sys/param.h>
#include <sys/user.h>
#include <sys/proc.h>
#define KERNEL
#define _KERNEL
#include <sys/file.h>
#undef KERNEL
#undef _KERNEL
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <nlist.h>

View file

@ -30,7 +30,7 @@
#include <sys/types.h>
#ifdef KERNEL
#ifdef _KERNEL
#include <sys/systm.h>
#else
#include <string.h>
@ -40,7 +40,7 @@
static void MD5Transform __P((u_int32_t [4], const unsigned char [64]));
#ifdef KERNEL
#ifdef _KERNEL
#define memset(x,y,z) bzero(x,z);
#define memcpy(x,y,z) bcopy(y, x, z)
#endif

View file

@ -74,9 +74,9 @@
#endif
/* Avoid unwanted userlandish components */
#define KERNEL
#define _KERNEL
#include <sys/errno.h>
#undef KERNEL
#undef _KERNEL
/* special stand error codes */
#define EADAPT (ELAST+1) /* bad adaptor */

View file

@ -89,7 +89,7 @@ __initialized__:
.SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S
CFLAGS+= ${COPTS} -DKERNEL ${CWARNFLAGS}
CFLAGS+= ${COPTS} -D_KERNEL ${CWARNFLAGS}
CFLAGS+= -DKLD_MODULE
# Don't use any standard or source-relative include directories.

View file

@ -44,7 +44,7 @@
#define MAX_PNP_LDN 20
/* Static ports to access PnP state machine */
#ifndef KERNEL
#ifndef _KERNEL
#ifdef PC98
/* pnp.h is included from pnpinfo.c. */
#define _PNP_ADDRESS 0x259
@ -267,7 +267,7 @@ struct pnp_cinfo {
} mem[4];
};
#ifdef KERNEL
#ifdef _KERNEL
struct pnp_device {
char *pd_name;
@ -310,6 +310,6 @@ int enable_pnp_card(void);
*/
void pnp_configure __P((void));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_I386_ISA_PNP_H_ */

View file

@ -31,9 +31,9 @@
#ifndef _CAM_CAM_H
#define _CAM_CAM_H 1
#ifdef KERNEL
#ifdef _KERNEL
#include <opt_cam.h>
#endif /* KERNEL */
#endif
#include <sys/cdefs.h>
@ -163,7 +163,7 @@ void cam_strvis(u_int8_t *dst, const u_int8_t *src, int srclen, int dstlen);
int cam_strmatch(const u_int8_t *str, const u_int8_t *pattern, int str_len);
__END_DECLS
#ifdef KERNEL
#ifdef _KERNEL
static __inline void cam_init_pinfo(cam_pinfo *pinfo);
static __inline void cam_init_pinfo(cam_pinfo *pinfo)
@ -171,6 +171,6 @@ static __inline void cam_init_pinfo(cam_pinfo *pinfo)
pinfo->priority = CAM_PRIORITY_NONE;
pinfo->index = CAM_UNQUEUED_INDEX;
}
#endif /* KERNEL */
#endif
#endif /* _CAM_CAM_H */

View file

@ -34,7 +34,7 @@
#include <sys/queue.h>
#include <sys/cdefs.h>
#include <sys/time.h>
#ifndef KERNEL
#ifndef _KERNEL
#include <sys/callout.h>
#endif
#include <cam/cam_debug.h>

View file

@ -31,7 +31,7 @@
#ifndef _CAM_CAM_CONF_H
#define _CAM_CAM_CONF_H 1
#ifdef KERNEL
#ifdef _KERNEL
#define CAMCONF_UNSPEC 255
#define CAMCONF_ANY 254
@ -62,6 +62,6 @@ struct cam_periph_config
extern struct cam_sim_config cam_sinit[];
extern struct cam_periph_config cam_pinit[];
#endif /* KERNEL */
#endif
#endif /* _CAM_CAM_CONF_H */

View file

@ -30,9 +30,9 @@
#ifndef _CAM_CAM_DEBUG_H
#define _CAM_CAM_DEBUG_H 1
#if defined(CAMDEBUG) && defined(KERNEL)
#if defined(CAMDEBUG) && defined(_KERNEL)
#include <machine/clock.h>
#endif /* CAMDEBUG && KERNEL */
#endif /* CAMDEBUG && _KERNEL */
/*
* Debugging flags.
@ -47,7 +47,7 @@ typedef enum {
CAM_DEBUG_PERIPH = 0x20 /* print out peripheral calls */
} cam_debug_flags;
#if defined(CAMDEBUG) && defined(KERNEL)
#if defined(CAMDEBUG) && defined(_KERNEL)
/* Path we want to debug */
extern struct cam_path *cam_dpath;
@ -80,12 +80,12 @@ extern u_int32_t cam_debug_delay;
DELAY(cam_debug_delay); \
}
#else /* !CAMDEBUG || !KERNEL */
#else /* !CAMDEBUG || !_KERNEL */
#define CAM_DEBUGGED(A, B) 0
#define CAM_DEBUG(A, B, C)
#define CAM_DEBUG_PRINT(A, B)
#endif /* CAMDEBUG && KERNEL */
#endif /* CAMDEBUG && _KERNEL */
#endif /* _CAM_CAM_DEBUG_H */

View file

@ -18,7 +18,7 @@
#ifndef _CAM_CAM_EXTEND_H
#define _CAM_CAM_EXTEND_H 1
#ifdef KERNEL
#ifdef _KERNEL
struct extend_array;
void *cam_extend_get(struct extend_array *ea, int index);
@ -26,5 +26,5 @@ struct extend_array *cam_extend_new(void);
void *cam_extend_set(struct extend_array *ea, int index, void *value);
void cam_extend_release(struct extend_array *ea, int index);
#endif /* KERNEL */
#endif
#endif /* _CAM_CAM_EXTEND_H */

View file

@ -33,7 +33,7 @@
#include <sys/queue.h>
#ifdef KERNEL
#ifdef _KERNEL
extern struct linker_set periphdriver_set;
@ -144,5 +144,5 @@ void cam_periph_freeze_after_event(struct cam_periph *periph,
int cam_periph_error(union ccb *ccb, cam_flags camflags,
u_int32_t sense_flags, union ccb *save_ccb);
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* _CAM_CAM_PERIPH_H */

View file

@ -31,7 +31,7 @@
#ifndef _CAM_CAM_QUEUE_H
#define _CAM_CAM_QUEUE_H 1
#ifdef KERNEL
#ifdef _KERNEL
#include <sys/queue.h>
@ -234,5 +234,5 @@ cam_ccbq_release_opening(struct cam_ccbq *ccbq)
ccbq->devq_openings++;
}
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* _CAM_CAM_QUEUE_H */

View file

@ -31,7 +31,7 @@
#ifndef _CAM_CAM_SIM_H
#define _CAM_CAM_SIM_H 1
#ifdef KERNEL
#ifdef _KERNEL
/*
* The sim driver creates a sim for each controller. The sim device
@ -131,5 +131,5 @@ cam_sim_bus(struct cam_sim *sim)
return (sim->bus_id);
}
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* _CAM_CAM_SIM_H */

View file

@ -46,7 +46,7 @@ struct cam_path;
/* Path functions */
#ifdef KERNEL
#ifdef _KERNEL
void xpt_action(union ccb *new_ccb);
void xpt_setup_ccb(struct ccb_hdr *ccb_h,
@ -69,7 +69,7 @@ struct cam_sim *xpt_path_sim(struct cam_path *path);
struct cam_periph *xpt_path_periph(struct cam_path *path);
void xpt_async(u_int32_t async_code, struct cam_path *path,
void *async_arg);
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* _CAM_CAM_XPT_H */

View file

@ -36,7 +36,7 @@
#include <cam/cam_xpt.h>
/* Functions accessed by the peripheral drivers */
#ifdef KERNEL
#ifdef _KERNEL
void xpt_polled_action(union ccb *ccb);
union ccb *xpt_alloc_ccb(void);
void xpt_free_ccb(union ccb *free_ccb);
@ -46,6 +46,6 @@ int32_t xpt_add_periph(struct cam_periph *periph);
void xpt_remove_periph(struct cam_periph *periph);
void xpt_announce_periph(struct cam_periph *periph,
char *announce_string);
#endif /* KERNEL */
#endif
#endif /* _CAM_CAM_XPT_PERIPH_H */

View file

@ -36,7 +36,7 @@
#include <cam/cam_queue.h>
/* Functions accessed by SIM drivers */
#ifdef KERNEL
#ifdef _KERNEL
int32_t xpt_bus_register(struct cam_sim *sim, u_int32_t bus);
int32_t xpt_bus_deregister(u_int8_t path_id);
u_int32_t xpt_freeze_simq(struct cam_sim *sim, u_int count);
@ -45,7 +45,7 @@ u_int32_t xpt_freeze_devq(struct cam_path *path, u_int count);
void xpt_release_devq(struct cam_path *path, u_int count,
int run_queue);
void xpt_done(union ccb *done_ccb);
#endif /* KERNEL */
#endif
#endif /* _CAM_CAM_XPT_SIM_H */

View file

@ -53,7 +53,7 @@
#endif
#if defined(DJGPP) || defined(__CYGWIN32__)
#ifdef KERNEL
#ifdef _KERNEL
typedef unsigned long u_long;
typedef unsigned int u_int;
typedef unsigned short u_short;
@ -72,11 +72,11 @@ struct timespec {
long ts_sec;
long ts_nsec;
};
#else /* DJGPP but not KERNEL */
#else /* DJGPP but not _KERNEL */
#include <sys/types.h>
#include <sys/time.h>
typedef unsigned long long u_quad_t;
#endif /* !KERNEL */
#endif /* !_KERNEL */
#endif /* !DJGPP */

View file

@ -89,7 +89,7 @@ __initialized__:
.SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S
CFLAGS+= ${COPTS} -DKERNEL ${CWARNFLAGS}
CFLAGS+= ${COPTS} -D_KERNEL ${CWARNFLAGS}
CFLAGS+= -DKLD_MODULE
# Don't use any standard or source-relative include directories.

View file

@ -94,7 +94,7 @@
#undef NOPROTO
#endif
#if !defined(KERNEL) && (defined(__STDC__) || defined(VMS) || defined(M_XENIX) || defined(MSDOS))
#if !defined(_KERNEL) && (defined(__STDC__) || defined(VMS) || defined(M_XENIX) || defined(MSDOS))
#ifndef __NetBSD__
#include <string.h>
#endif

View file

@ -53,7 +53,7 @@ struct sha1_ctxt {
u_int8_t count;
};
#if defined(KERNEL) || defined(_KERNEL)
#ifdef _KERNEL
extern void sha1_init __P((struct sha1_ctxt *));
extern void sha1_pad __P((struct sha1_ctxt *));
extern void sha1_loop __P((struct sha1_ctxt *, caddr_t, size_t));

View file

@ -92,7 +92,7 @@ struct iso_node {
#define VTOI(vp) ((struct iso_node *)(vp)->v_data)
#define ITOV(ip) ((ip)->i_vnode)
#ifdef KERNEL
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_ISOFSMNT);
@ -123,4 +123,4 @@ void cd9660_ihashins __P((struct iso_node *));
int cd9660_tstamp_conv7 __P((u_char *, struct timespec *, enum ISO_FTYPE));
int cd9660_tstamp_conv17 __P((u_char *, struct timespec *));
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -213,7 +213,7 @@ struct iso_extended_attributes {
u_char len_au [ISODCL (247, 250)]; /* 723 */
};
#ifdef KERNEL
#ifdef _KERNEL
/* CD-ROM Format type */
enum ISO_FTYPE { ISO_FTYPE_DEFAULT, ISO_FTYPE_9660, ISO_FTYPE_RRIP,
@ -270,7 +270,7 @@ int isofncmp __P((u_char *, int, u_char *, int, int));
void isofntrans __P((u_char *, int, u_char *, u_short *, int, int, int));
ino_t isodirino __P((struct iso_directory_record *, struct iso_mnt *));
#endif /* KERNEL */
#endif /* _KERNEL */
/*
* The isonum_xxx functions are inlined anyway, and could come handy even

View file

@ -53,7 +53,7 @@
#endif
#if defined(DJGPP) || defined(__CYGWIN32__)
#ifdef KERNEL
#ifdef _KERNEL
typedef unsigned long u_long;
typedef unsigned int u_int;
typedef unsigned short u_short;
@ -72,11 +72,11 @@ struct timespec {
long ts_sec;
long ts_nsec;
};
#else /* DJGPP but not KERNEL */
#else /* DJGPP but not _KERNEL */
#include <sys/types.h>
#include <sys/time.h>
typedef unsigned long long u_quad_t;
#endif /* !KERNEL */
#endif /* !_KERNEL */
#endif /* !DJGPP */

View file

@ -38,7 +38,7 @@
* $FreeBSD$
*/
#ifdef KERNEL
#ifdef _KERNEL
struct fdescmount {
struct vnode *f_root; /* Root node */
};
@ -76,4 +76,4 @@ extern dev_t devctty;
extern int fdesc_init __P((struct vfsconf *));
extern int fdesc_root __P((struct mount *, struct vnode **));
extern int fdesc_allocvp __P((fdntype, int, struct mount *, struct vnode **));
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -212,7 +212,7 @@ struct denode {
#define de_forw de_chain[0]
#define de_back de_chain[1]
#ifdef KERNEL
#ifdef _KERNEL
#define VTODE(vp) ((struct denode *)(vp)->v_data)
#define DETOV(de) ((de)->de_vnode)
@ -283,4 +283,4 @@ int deupdat __P((struct denode *dep, int waitfor));
int removede __P((struct denode *pdep, struct denode *dep));
int detrunc __P((struct denode *dep, u_long length, int flags, struct ucred *cred, struct proc *p));
int doscheckpath __P(( struct denode *source, struct denode *target));
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -127,7 +127,7 @@ struct winentry {
#define DD_YEAR_MASK 0xFE00 /* year - 1980 */
#define DD_YEAR_SHIFT 9
#ifdef KERNEL
#ifdef _KERNEL
struct dirent;
void unix2dostime __P((struct timespec *tsp, u_int16_t *ddp,
u_int16_t *dtp, u_int8_t *dhp));
@ -140,4 +140,4 @@ int win2unixfn __P((struct winentry *wep, struct dirent *dp, int chksum, int tab
u_int8_t winChksum __P((u_int8_t *name));
int winSlotCnt __P((const u_char *un, int unlen));
int winLenFixup __P((const u_char *un, int unlen));
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -83,7 +83,7 @@
#define MSDOSFSEOF(pmp, cn) ((((cn) | ~(pmp)->pm_fatmask) & CLUST_EOFS) == CLUST_EOFS)
#ifdef KERNEL
#ifdef _KERNEL
/*
* These are the values for the function argument to the function
* fatentry().
@ -105,4 +105,4 @@ int freeclusterchain __P((struct msdosfsmount *pmp, u_long startchain));
int extendfile __P((struct denode *dep, u_long count, struct buf **bpp, u_long *ncp, int flags));
void fc_purge __P((struct denode *dep, u_int frcn));
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -51,7 +51,7 @@
#ifndef _MSDOSFS_MSDOSFSMOUNT_H_
#define _MSDOSFS_MSDOSFSMOUNT_H_
#ifdef KERNEL
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_MSDOSFSMNT);
@ -193,7 +193,7 @@ struct msdosfsmount {
int msdosfs_init __P((struct vfsconf *vfsp));
int msdosfs_mountroot __P((void));
#endif /* KERNEL */
#endif /* _KERNEL */
/*
* Arguments to mount MSDOS filesystems.

View file

@ -47,7 +47,7 @@ struct null_mount {
struct vnode *nullm_rootvp; /* Reference to root null_node */
};
#ifdef KERNEL
#ifdef _KERNEL
/*
* A cache of vnode references
*/
@ -73,4 +73,4 @@ extern struct vnode *null_checkvp __P((struct vnode *vp, char *fil, int lno));
extern int null_bypass __P((struct vop_generic_args *ap));
extern vop_t **null_vnodeop_p;
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -49,7 +49,7 @@
#define NWFSIOC_GETEINFO _IOR('n',2,struct nw_entry_info)
#define NWFSIOC_GETNS _IOR('n',3,int)
#ifdef KERNEL
#ifdef _KERNEL
#include <sys/vnode.h>
#include <sys/mount.h>
@ -78,6 +78,6 @@ int nwfs_ioctl(struct vop_ioctl_args *ap);
int nwfs_doio(struct buf *bp, struct ucred *cr, struct proc *p);
int nwfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred,
struct proc *p, int intrflg);
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* _NWFS_H_ */

View file

@ -70,11 +70,11 @@ struct nwfs_args {
struct ncp_nlstables nls;
};
#ifdef KERNEL
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_NWFSMNT);
#endif
#endif /* KERNEL */
#endif
#endif /* !_NWFS_MOUNT_H_ */

View file

@ -50,7 +50,7 @@ struct portal_cred {
gid_t pcr_groups[NGROUPS]; /* From ucred */
};
#ifdef KERNEL
#ifdef _KERNEL
struct portalmount {
struct vnode *pm_root; /* Root node */
struct file *pm_server; /* Held reference to server socket */
@ -68,4 +68,4 @@ struct portalnode {
#define PORTAL_ROOTFILEID 2
extern vop_t **portal_vnodeop_p;
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -83,7 +83,7 @@ struct pfsnode {
/*
* Kernel stuff follows
*/
#ifdef KERNEL
#ifdef _KERNEL
#define CNEQ(cnp, s, len) \
((cnp)->cn_namelen == (len) && \
(bcmp((s), (cnp)->cn_nameptr, (len)) == 0))
@ -159,4 +159,4 @@ extern vop_t **procfs_vnodeop_p;
int procfs_root __P((struct mount *, struct vnode **));
int procfs_rw __P((struct vop_read_args *));
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -62,7 +62,7 @@ struct umap_mount {
group mapping in ficus */
};
#ifdef KERNEL
#ifdef _KERNEL
/*
* A cache of vnode references
*/
@ -88,4 +88,4 @@ extern struct vnode *umap_checkvp __P((struct vnode *vp, char *fil, int lno));
#endif
extern vop_t **umap_vnodeop_p;
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -56,7 +56,7 @@ struct union_mount {
int um_op; /* Operation mode */
};
#ifdef KERNEL
#ifdef _KERNEL
#ifndef DIAGNOSTIC
#define DIAGNOSTIC
@ -152,4 +152,4 @@ extern vop_t **union_vnodeop_p;
extern struct vfsops union_vfsops;
extern int uniondebug;
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -55,7 +55,7 @@ struct mfs_args {
u_long size; /* size of file system */
};
#ifdef KERNEL
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_UFSMNT);
@ -125,6 +125,6 @@ struct ufsmount {
#define MNINDIR(ump) ((ump)->um_nindir)
#define blkptrtodb(ump, b) ((b) << (ump)->um_bptrtodb)
#define is_sequential(ump, a, b) ((b) == (a) + ump->um_seqinc)
#endif /* KERNEL */
#endif /* _KERNEL */
#endif

View file

@ -130,7 +130,7 @@ struct inode {
#define IN_HASHED 0x0080 /* Inode is on hash list */
#define IN_LAZYMOD 0x0100 /* Modified, but don't write yet. */
#ifdef KERNEL
#ifdef _KERNEL
/*
* Structure used to pass around logical block paths generated by
* ufs_getlbns and used by truncate and bmap code.
@ -156,6 +156,6 @@ struct ufid {
ino_t ufid_ino; /* File number (ino). */
int32_t ufid_gen; /* Generation number. */
};
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_UFS_UFS_INODE_H_ */

View file

@ -55,7 +55,7 @@ struct mfs_args {
u_long size; /* size of file system */
};
#ifdef KERNEL
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_UFSMNT);
@ -125,6 +125,6 @@ struct ufsmount {
#define MNINDIR(ump) ((ump)->um_nindir)
#define blkptrtodb(ump, b) ((b) << (ump)->um_bptrtodb)
#define is_sequential(ump, a, b) ((b) == (a) + ump->um_seqinc)
#endif /* KERNEL */
#endif /* _KERNEL */
#endif

View file

@ -130,7 +130,7 @@ struct inode {
#define IN_HASHED 0x0080 /* Inode is on hash list */
#define IN_LAZYMOD 0x0100 /* Modified, but don't write yet. */
#ifdef KERNEL
#ifdef _KERNEL
/*
* Structure used to pass around logical block paths generated by
* ufs_getlbns and used by truncate and bmap code.
@ -156,6 +156,6 @@ struct ufid {
ino_t ufid_ino; /* File number (ino). */
int32_t ufid_gen; /* Generation number. */
};
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_UFS_UFS_INODE_H_ */

View file

@ -36,7 +36,7 @@ typedef void isa_config_cb(void *arg, struct isa_config *config, int enable);
#include "isa_if.h"
#include <isa/pnpvar.h>
#ifdef KERNEL
#ifdef _KERNEL
/*
* ISA devices are partially ordered to ensure that devices which are
@ -157,6 +157,6 @@ extern void isa_dma_release __P((int chan));
extern int isa_dmastatus __P((int chan));
extern int isa_dmastop __P((int chan));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_ISA_ISAVAR_H_ */

View file

@ -48,7 +48,7 @@
#endif
/* Static ports to access PnP state machine */
#if defined(PC98) && defined(KERNEL)
#if defined(PC98) && defined(_KERNEL)
/* pnp.h is included from pnpinfo.c. */
#define _PNP_ADDRESS 0x259
#define _PNP_WRITE_DATA 0xa59

View file

@ -29,7 +29,7 @@
#ifndef _ISA_PNPVAR_H_
#define _ISA_PNPVAR_H_
#ifdef KERNEL
#ifdef _KERNEL
#if 0
void pnp_write(int d, u_char r); /* used by Luigi's sound driver */
@ -55,6 +55,6 @@ u_char pnp_read(int d); /* currently unused, but who knows... */
char *pnp_eisaformat(u_int32_t id);
void pnp_parse_resources(device_t dev, u_char *resources, int len);
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_ISA_PNPVAR_H_ */

View file

@ -92,7 +92,7 @@ struct iso_node {
#define VTOI(vp) ((struct iso_node *)(vp)->v_data)
#define ITOV(ip) ((ip)->i_vnode)
#ifdef KERNEL
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_ISOFSMNT);
@ -123,4 +123,4 @@ void cd9660_ihashins __P((struct iso_node *));
int cd9660_tstamp_conv7 __P((u_char *, struct timespec *, enum ISO_FTYPE));
int cd9660_tstamp_conv17 __P((u_char *, struct timespec *));
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -213,7 +213,7 @@ struct iso_extended_attributes {
u_char len_au [ISODCL (247, 250)]; /* 723 */
};
#ifdef KERNEL
#ifdef _KERNEL
/* CD-ROM Format type */
enum ISO_FTYPE { ISO_FTYPE_DEFAULT, ISO_FTYPE_9660, ISO_FTYPE_RRIP,
@ -270,7 +270,7 @@ int isofncmp __P((u_char *, int, u_char *, int, int));
void isofntrans __P((u_char *, int, u_char *, u_short *, int, int, int));
ino_t isodirino __P((struct iso_directory_record *, struct iso_mnt *));
#endif /* KERNEL */
#endif /* _KERNEL */
/*
* The isonum_xxx functions are inlined anyway, and could come handy even

View file

@ -14,13 +14,13 @@
#include <sys/param.h>
#include <sys/inflate.h>
#ifdef KERNEL
#ifdef _KERNEL
#include <sys/systm.h>
#include <sys/kernel.h>
#endif
#include <sys/malloc.h>
#ifdef KERNEL
#ifdef _KERNEL
static MALLOC_DEFINE(M_GZIP, "Gzip trees", "Gzip trees");
#endif
@ -30,11 +30,11 @@ static MALLOC_DEFINE(M_GZIP, "Gzip trees", "Gzip trees");
#define ulg u_long
/* Stuff to make inflate() work */
#ifdef KERNEL
#ifdef _KERNEL
#define memzero(dest,len) bzero(dest,len)
#endif
#define NOMEMCPY
#ifdef KERNEL
#ifdef _KERNEL
#define FPRINTF printf
#else
extern void putstr (char *);
@ -49,7 +49,7 @@ extern void putstr (char *);
static const int qflag = 0;
#ifndef KERNEL /* want to use this file in kzip also */
#ifndef _KERNEL /* want to use this file in kzip also */
extern unsigned char *kzipmalloc (int);
extern void kzipfree (void*);
#define malloc(x, y, z) kzipmalloc((x))
@ -447,7 +447,7 @@ huft_build(glbl, b, n, s, d, e, t, m)
/* Generate counts for each bit length */
el = n > 256 ? b[256] : BMAX; /* set length of EOB code, if any */
#ifdef KERNEL
#ifdef _KERNEL
memzero((char *) c, sizeof(c));
#else
for (i = 0; i < BMAX+1; i++)
@ -1045,14 +1045,14 @@ inflate(glbl)
struct inflate *glbl;
{
int i;
#ifdef KERNEL
#ifdef _KERNEL
u_char *p = NULL;
if (!glbl->gz_slide)
p = glbl->gz_slide = malloc(GZ_WSIZE, M_GZIP, M_WAITOK);
#endif
if (!glbl->gz_slide)
#ifdef KERNEL
#ifdef _KERNEL
return(ENOMEM);
#else
return 3; /* kzip expects 3 */
@ -1067,7 +1067,7 @@ inflate(glbl)
huft_free(glbl, glbl->gz_fixed_tl);
glbl->gz_fixed_tl = (struct huft *) NULL;
}
#ifdef KERNEL
#ifdef _KERNEL
if (p == glbl->gz_slide) {
free(glbl->gz_slide, M_GZIP);
glbl->gz_slide = NULL;

View file

@ -30,7 +30,7 @@
#include <sys/types.h>
#ifdef KERNEL
#ifdef _KERNEL
#include <sys/systm.h>
#else
#include <string.h>
@ -39,7 +39,7 @@
#include <sys/md5.h>
#ifdef KERNEL
#ifdef _KERNEL
#define memset(x,y,z) bzero(x,z);
#define memcpy(x,y,z) bcopy(y, x, z)
#endif

View file

@ -63,7 +63,7 @@
* $FreeBSD$
*/
#ifdef KERNEL
#ifdef _KERNEL
#include <sys/param.h>
#include <sys/systm.h>
@ -116,12 +116,12 @@ static void blst_copy(blmeta_t *scan, daddr_t blk, daddr_t radix,
daddr_t skip, blist_t dest, daddr_t count);
static daddr_t blst_radix_init(blmeta_t *scan, daddr_t radix,
int skip, daddr_t count);
#ifndef KERNEL
#ifndef _KERNEL
static void blst_radix_print(blmeta_t *scan, daddr_t blk,
daddr_t radix, int skip, int tab);
#endif
#ifdef KERNEL
#ifdef _KERNEL
static MALLOC_DEFINE(M_SWAP, "SWAP", "Swap space");
#endif

View file

@ -35,7 +35,7 @@
#include <sys/param.h>
#include <sys/gmon.h>
#ifdef KERNEL
#ifdef _KERNEL
#ifndef GUPROF
#include <sys/systm.h>
#endif
@ -74,7 +74,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
register struct tostruct *top, *prevtop;
register struct gmonparam *p;
register long toindex;
#ifdef KERNEL
#ifdef _KERNEL
MCOUNT_DECL(s)
#endif
@ -87,14 +87,14 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
if (p->state != GMON_PROF_ON)
return;
#endif
#ifdef KERNEL
#ifdef _KERNEL
MCOUNT_ENTER(s);
#else
p->state = GMON_PROF_BUSY;
#endif
frompci = frompc - p->lowpc;
#ifdef KERNEL
#ifdef _KERNEL
/*
* When we are called from an exception handler, frompci may be
* for a user address. Convert such frompci's to the index of
@ -108,7 +108,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
if (frompci >= p->textsize)
goto done;
}
#endif /* KERNEL */
#endif
#ifdef GUPROF
if (p->state == GMON_PROF_HIRES) {
@ -140,7 +140,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
}
#endif /* GUPROF */
#ifdef KERNEL
#ifdef _KERNEL
/*
* When we are called from an exception handler, frompc is faked
* to be for where the exception occurred. We've just solidified
@ -156,7 +156,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
else
frompci = (uintfptr_t)btrap - p->lowpc;
}
#endif /* KERNEL */
#endif
/*
* check that frompc is a reasonable pc value.
@ -238,7 +238,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
}
done:
#ifdef KERNEL
#ifdef _KERNEL
MCOUNT_EXIT(s);
#else
p->state = GMON_PROF_ON;
@ -246,7 +246,7 @@ _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */
return;
overflow:
p->state = GMON_PROF_ERROR;
#ifdef KERNEL
#ifdef _KERNEL
MCOUNT_EXIT(s);
#endif
return;

View file

@ -38,7 +38,7 @@
* $FreeBSD$
*/
#ifdef KERNEL
#ifdef _KERNEL
struct fdescmount {
struct vnode *f_root; /* Root node */
};
@ -76,4 +76,4 @@ extern dev_t devctty;
extern int fdesc_init __P((struct vfsconf *));
extern int fdesc_root __P((struct mount *, struct vnode **));
extern int fdesc_allocvp __P((fdntype, int, struct mount *, struct vnode **));
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -39,7 +39,7 @@
#define _PATH_KERNFS "/kern" /* Default mountpoint */
#ifdef KERNEL
#ifdef _KERNEL
struct kernfs_mount {
struct vnode *kf_root; /* Root node */
};
@ -53,4 +53,4 @@ struct kernfs_node {
extern vop_t **kernfs_vnodeop_p;
extern dev_t rrootdev;
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -47,7 +47,7 @@ struct null_mount {
struct vnode *nullm_rootvp; /* Reference to root null_node */
};
#ifdef KERNEL
#ifdef _KERNEL
/*
* A cache of vnode references
*/
@ -73,4 +73,4 @@ extern struct vnode *null_checkvp __P((struct vnode *vp, char *fil, int lno));
extern int null_bypass __P((struct vop_generic_args *ap));
extern vop_t **null_vnodeop_p;
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -50,7 +50,7 @@ struct portal_cred {
gid_t pcr_groups[NGROUPS]; /* From ucred */
};
#ifdef KERNEL
#ifdef _KERNEL
struct portalmount {
struct vnode *pm_root; /* Root node */
struct file *pm_server; /* Held reference to server socket */
@ -68,4 +68,4 @@ struct portalnode {
#define PORTAL_ROOTFILEID 2
extern vop_t **portal_vnodeop_p;
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -83,7 +83,7 @@ struct pfsnode {
/*
* Kernel stuff follows
*/
#ifdef KERNEL
#ifdef _KERNEL
#define CNEQ(cnp, s, len) \
((cnp)->cn_namelen == (len) && \
(bcmp((s), (cnp)->cn_nameptr, (len)) == 0))
@ -159,4 +159,4 @@ extern vop_t **procfs_vnodeop_p;
int procfs_root __P((struct mount *, struct vnode **));
int procfs_rw __P((struct vop_read_args *));
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -62,7 +62,7 @@ struct umap_mount {
group mapping in ficus */
};
#ifdef KERNEL
#ifdef _KERNEL
/*
* A cache of vnode references
*/
@ -88,4 +88,4 @@ extern struct vnode *umap_checkvp __P((struct vnode *vp, char *fil, int lno));
#endif
extern vop_t **umap_vnodeop_p;
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -56,7 +56,7 @@ struct union_mount {
int um_op; /* Operation mode */
};
#ifdef KERNEL
#ifdef _KERNEL
#ifndef DIAGNOSTIC
#define DIAGNOSTIC
@ -152,4 +152,4 @@ extern vop_t **union_vnodeop_p;
extern struct vfsops union_vfsops;
extern int uniondebug;
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -20,11 +20,11 @@ linux_assym.h: linux_genassym.o
genassym -o ${.TARGET} ${.ALLSRC}
linux_locore.o: linux_locore.s linux_assym.h
${CC} -c -x assembler-with-cpp -DLOCORE -DKERNEL ${CFLAGS} \
${CC} -c -x assembler-with-cpp -DLOCORE -D_KERNEL ${CFLAGS} \
${.IMPSRC} -o ${.TARGET}
linux_genassym.o: linux_genassym.c linux.h @ machine
${CC} -c ${CFLAGS} -UKERNEL ${.IMPSRC}
${CC} -c ${CFLAGS} -U_KERNEL ${.IMPSRC}
opt_compat.h:
echo "#define COMPAT_43 1" > opt_compat.h

View file

@ -10,7 +10,7 @@ SRCS= svr4_sysent.c svr4_sysvec.c opt_compat.h opt_global.h opt_vmpage.h \
OBJS= svr4_locore.o
NOMAN=1
MAN8= svr4.8
CFLAGS+= -DKERNEL
CFLAGS+= -D_KERNEL
MAINTAINER= newton@freebsd.org
EXPORT_SYMS=_svr4_mod
@ -22,11 +22,11 @@ svr4_assym.h: svr4_genassym.o
genassym -o ${.TARGET} ${.ALLSRC}
svr4_locore.o: svr4_locore.s svr4_assym.h
${CC} -c -x assembler-with-cpp -DLOCORE -DKERNEL ${CFLAGS} \
${CC} -c -x assembler-with-cpp -DLOCORE -D_KERNEL ${CFLAGS} \
${.IMPSRC} -o ${.TARGET}
svr4_genassym.o: svr4_genassym.c svr4.h @ machine
${CC} -c ${CFLAGS} -UKERNEL ${.IMPSRC}
${CC} -c ${CFLAGS} -U_KERNEL ${.IMPSRC}
opt_compat.h:
echo "#define COMPAT_43 1" > opt_compat.h

View file

@ -212,7 +212,7 @@ struct denode {
#define de_forw de_chain[0]
#define de_back de_chain[1]
#ifdef KERNEL
#ifdef _KERNEL
#define VTODE(vp) ((struct denode *)(vp)->v_data)
#define DETOV(de) ((de)->de_vnode)
@ -283,4 +283,4 @@ int deupdat __P((struct denode *dep, int waitfor));
int removede __P((struct denode *pdep, struct denode *dep));
int detrunc __P((struct denode *dep, u_long length, int flags, struct ucred *cred, struct proc *p));
int doscheckpath __P(( struct denode *source, struct denode *target));
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -127,7 +127,7 @@ struct winentry {
#define DD_YEAR_MASK 0xFE00 /* year - 1980 */
#define DD_YEAR_SHIFT 9
#ifdef KERNEL
#ifdef _KERNEL
struct dirent;
void unix2dostime __P((struct timespec *tsp, u_int16_t *ddp,
u_int16_t *dtp, u_int8_t *dhp));
@ -140,4 +140,4 @@ int win2unixfn __P((struct winentry *wep, struct dirent *dp, int chksum, int tab
u_int8_t winChksum __P((u_int8_t *name));
int winSlotCnt __P((const u_char *un, int unlen));
int winLenFixup __P((const u_char *un, int unlen));
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -83,7 +83,7 @@
#define MSDOSFSEOF(pmp, cn) ((((cn) | ~(pmp)->pm_fatmask) & CLUST_EOFS) == CLUST_EOFS)
#ifdef KERNEL
#ifdef _KERNEL
/*
* These are the values for the function argument to the function
* fatentry().
@ -105,4 +105,4 @@ int freeclusterchain __P((struct msdosfsmount *pmp, u_long startchain));
int extendfile __P((struct denode *dep, u_long count, struct buf **bpp, u_long *ncp, int flags));
void fc_purge __P((struct denode *dep, u_int frcn));
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -51,7 +51,7 @@
#ifndef _MSDOSFS_MSDOSFSMOUNT_H_
#define _MSDOSFS_MSDOSFSMOUNT_H_
#ifdef KERNEL
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_MSDOSFSMNT);
@ -193,7 +193,7 @@ struct msdosfsmount {
int msdosfs_init __P((struct vfsconf *vfsp));
int msdosfs_mountroot __P((void));
#endif /* KERNEL */
#endif /* _KERNEL */
/*
* Arguments to mount MSDOS filesystems.

View file

@ -40,7 +40,7 @@
#ifndef _NFS_NFS_H_
#define _NFS_NFS_H_
#ifdef KERNEL
#ifdef _KERNEL
#include "opt_nfs.h"
#endif
@ -83,7 +83,7 @@
#define NFS_GATHERDELAY 10 /* Default write gather delay (msec) */
#endif
#define NFS_DIRBLKSIZ 4096 /* Must be a multiple of DIRBLKSIZ */
#ifdef KERNEL
#ifdef _KERNEL
#define DIRBLKSIZ 512 /* XXX we used to use ufs's DIRBLKSIZ */
#endif
@ -299,7 +299,7 @@ struct nfsstats {
{ "nfsprivport", CTLTYPE_INT }, \
}
#ifdef KERNEL
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_NFSREQ);
@ -734,6 +734,6 @@ int nfsrv_write __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
void nfsrv_rcv __P((struct socket *so, void *arg, int waitflag));
void nfsrv_slpderef __P((struct nfssvc_sock *slp));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif

View file

@ -95,12 +95,12 @@ struct nfsmount {
u_int64_t nm_maxfilesize; /* maximum file size */
};
#if defined(KERNEL) || defined(_KERNEL)
#if defined(_KERNEL)
/*
* Convert mount ptr to nfsmount ptr.
*/
#define VFSTONFS(mp) ((struct nfsmount *)((mp)->mnt_data))
#endif /* KERNEL */
#endif
#endif

View file

@ -41,7 +41,7 @@
#ifndef _NFS_NFSNODE_H_
#define _NFS_NFSNODE_H_
#if !defined(_NFS_NFS_H_) && !defined(KERNEL)
#if !defined(_NFS_NFS_H_) && !defined(_KERNEL)
#include <nfs/nfs.h>
#endif
@ -157,7 +157,7 @@ extern TAILQ_HEAD(nfs_bufq, buf) nfs_bufq;
extern struct proc *nfs_iodwant[NFS_MAXASYNCDAEMON];
extern struct nfsmount *nfs_iodmount[NFS_MAXASYNCDAEMON];
#if defined(KERNEL) || defined(_KERNEL)
#if defined(_KERNEL)
/*
* nfs_rslock - Attempt to obtain lock on nfsnode
@ -205,6 +205,6 @@ void nfs_invaldir __P((struct vnode *));
#define nqnfs_lease_updatetime nfs_lease_updatetime
#endif /* KERNEL */
#endif /* _KERNEL */
#endif

View file

@ -62,7 +62,7 @@
#define NQNFS_VER3 3
#define NQNFS_EVICTSIZ 156 /* Size of eviction request in bytes */
#if defined(KERNEL) || defined(_KERNEL)
#if defined(_KERNEL)
/*
* Definitions used for saving the "last lease expires" time in Non-volatile
* RAM on the server. The default definitions below assume that NOVRAM is not

View file

@ -40,7 +40,7 @@
#ifndef _NFS_NFS_H_
#define _NFS_NFS_H_
#ifdef KERNEL
#ifdef _KERNEL
#include "opt_nfs.h"
#endif
@ -83,7 +83,7 @@
#define NFS_GATHERDELAY 10 /* Default write gather delay (msec) */
#endif
#define NFS_DIRBLKSIZ 4096 /* Must be a multiple of DIRBLKSIZ */
#ifdef KERNEL
#ifdef _KERNEL
#define DIRBLKSIZ 512 /* XXX we used to use ufs's DIRBLKSIZ */
#endif
@ -299,7 +299,7 @@ struct nfsstats {
{ "nfsprivport", CTLTYPE_INT }, \
}
#ifdef KERNEL
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_NFSREQ);
@ -734,6 +734,6 @@ int nfsrv_write __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
void nfsrv_rcv __P((struct socket *so, void *arg, int waitflag));
void nfsrv_slpderef __P((struct nfssvc_sock *slp));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif

View file

@ -40,7 +40,7 @@
#ifndef _NFS_NFS_H_
#define _NFS_NFS_H_
#ifdef KERNEL
#ifdef _KERNEL
#include "opt_nfs.h"
#endif
@ -83,7 +83,7 @@
#define NFS_GATHERDELAY 10 /* Default write gather delay (msec) */
#endif
#define NFS_DIRBLKSIZ 4096 /* Must be a multiple of DIRBLKSIZ */
#ifdef KERNEL
#ifdef _KERNEL
#define DIRBLKSIZ 512 /* XXX we used to use ufs's DIRBLKSIZ */
#endif
@ -299,7 +299,7 @@ struct nfsstats {
{ "nfsprivport", CTLTYPE_INT }, \
}
#ifdef KERNEL
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_NFSREQ);
@ -734,6 +734,6 @@ int nfsrv_write __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
void nfsrv_rcv __P((struct socket *so, void *arg, int waitflag));
void nfsrv_slpderef __P((struct nfssvc_sock *slp));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif

View file

@ -95,12 +95,12 @@ struct nfsmount {
u_int64_t nm_maxfilesize; /* maximum file size */
};
#if defined(KERNEL) || defined(_KERNEL)
#if defined(_KERNEL)
/*
* Convert mount ptr to nfsmount ptr.
*/
#define VFSTONFS(mp) ((struct nfsmount *)((mp)->mnt_data))
#endif /* KERNEL */
#endif
#endif

View file

@ -41,7 +41,7 @@
#ifndef _NFS_NFSNODE_H_
#define _NFS_NFSNODE_H_
#if !defined(_NFS_NFS_H_) && !defined(KERNEL)
#if !defined(_NFS_NFS_H_) && !defined(_KERNEL)
#include <nfs/nfs.h>
#endif
@ -157,7 +157,7 @@ extern TAILQ_HEAD(nfs_bufq, buf) nfs_bufq;
extern struct proc *nfs_iodwant[NFS_MAXASYNCDAEMON];
extern struct nfsmount *nfs_iodmount[NFS_MAXASYNCDAEMON];
#if defined(KERNEL) || defined(_KERNEL)
#if defined(_KERNEL)
/*
* nfs_rslock - Attempt to obtain lock on nfsnode
@ -205,6 +205,6 @@ void nfs_invaldir __P((struct vnode *));
#define nqnfs_lease_updatetime nfs_lease_updatetime
#endif /* KERNEL */
#endif /* _KERNEL */
#endif

View file

@ -40,7 +40,7 @@
#ifndef _NFS_NFS_H_
#define _NFS_NFS_H_
#ifdef KERNEL
#ifdef _KERNEL
#include "opt_nfs.h"
#endif
@ -83,7 +83,7 @@
#define NFS_GATHERDELAY 10 /* Default write gather delay (msec) */
#endif
#define NFS_DIRBLKSIZ 4096 /* Must be a multiple of DIRBLKSIZ */
#ifdef KERNEL
#ifdef _KERNEL
#define DIRBLKSIZ 512 /* XXX we used to use ufs's DIRBLKSIZ */
#endif
@ -299,7 +299,7 @@ struct nfsstats {
{ "nfsprivport", CTLTYPE_INT }, \
}
#ifdef KERNEL
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_NFSREQ);
@ -734,6 +734,6 @@ int nfsrv_write __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
void nfsrv_rcv __P((struct socket *so, void *arg, int waitflag));
void nfsrv_slpderef __P((struct nfssvc_sock *slp));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif

View file

@ -40,7 +40,7 @@
#ifndef _NFS_NFS_H_
#define _NFS_NFS_H_
#ifdef KERNEL
#ifdef _KERNEL
#include "opt_nfs.h"
#endif
@ -83,7 +83,7 @@
#define NFS_GATHERDELAY 10 /* Default write gather delay (msec) */
#endif
#define NFS_DIRBLKSIZ 4096 /* Must be a multiple of DIRBLKSIZ */
#ifdef KERNEL
#ifdef _KERNEL
#define DIRBLKSIZ 512 /* XXX we used to use ufs's DIRBLKSIZ */
#endif
@ -299,7 +299,7 @@ struct nfsstats {
{ "nfsprivport", CTLTYPE_INT }, \
}
#ifdef KERNEL
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_NFSREQ);
@ -734,6 +734,6 @@ int nfsrv_write __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
void nfsrv_rcv __P((struct socket *so, void *arg, int waitflag));
void nfsrv_slpderef __P((struct nfssvc_sock *slp));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif

View file

@ -40,7 +40,7 @@
#ifndef _NFS_NFS_H_
#define _NFS_NFS_H_
#ifdef KERNEL
#ifdef _KERNEL
#include "opt_nfs.h"
#endif
@ -83,7 +83,7 @@
#define NFS_GATHERDELAY 10 /* Default write gather delay (msec) */
#endif
#define NFS_DIRBLKSIZ 4096 /* Must be a multiple of DIRBLKSIZ */
#ifdef KERNEL
#ifdef _KERNEL
#define DIRBLKSIZ 512 /* XXX we used to use ufs's DIRBLKSIZ */
#endif
@ -299,7 +299,7 @@ struct nfsstats {
{ "nfsprivport", CTLTYPE_INT }, \
}
#ifdef KERNEL
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_NFSREQ);
@ -734,6 +734,6 @@ int nfsrv_write __P((struct nfsrv_descript *nfsd, struct nfssvc_sock *slp,
struct proc *procp, struct mbuf **mrq));
void nfsrv_rcv __P((struct socket *so, void *arg, int waitflag));
void nfsrv_slpderef __P((struct nfssvc_sock *slp));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif

View file

@ -49,7 +49,7 @@
#define NWFSIOC_GETEINFO _IOR('n',2,struct nw_entry_info)
#define NWFSIOC_GETNS _IOR('n',3,int)
#ifdef KERNEL
#ifdef _KERNEL
#include <sys/vnode.h>
#include <sys/mount.h>
@ -78,6 +78,6 @@ int nwfs_ioctl(struct vop_ioctl_args *ap);
int nwfs_doio(struct buf *bp, struct ucred *cr, struct proc *p);
int nwfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred,
struct proc *p, int intrflg);
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* _NWFS_H_ */

View file

@ -70,11 +70,11 @@ struct nwfs_args {
struct ncp_nlstables nls;
};
#ifdef KERNEL
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_NWFSMNT);
#endif
#endif /* KERNEL */
#endif
#endif /* !_NWFS_MOUNT_H_ */

View file

@ -23,6 +23,8 @@
* 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.
*
* $FreeBSD$
*/
#ifndef __PC98_PC98_PC98_MACHDEP_H__
@ -40,7 +42,7 @@ int scsi_da_bios_params __P((struct ccb_calc_geometry *));
#define PC98_SAVE_AREA(highreso_flag) (0xa1000)
#define PC98_SAVE_AREA_ADDRESS (0x10)
#if defined(KERNEL) && !defined(LOCORE)
#if defined(_KERNEL) && !defined(LOCORE)
/* BIOS parameter block */
extern unsigned char pc98_system_parameter[]; /* in locore.c */
#define OFS_BOOT_boothowto 0x210
@ -70,6 +72,6 @@ extern unsigned char pc98_system_parameter[]; /* in locore.c */
# define PC98_TYPE_CHECK(x) ((pc98_machine_type & (x)) == (x))
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* __PC98_PC98_PC98_MACHDEP_H__ */

View file

@ -33,7 +33,7 @@
#ifndef _PCCARD_CARDINFO_H_
#define _PCCARD_CARDINFO_H_
#ifndef KERNEL
#ifndef _KERNEL
#include <sys/types.h>
#endif
#include <sys/ioccom.h>

View file

@ -47,7 +47,7 @@ struct mn_control {
unsigned ts[M32_CHAN];
};
#ifdef KERNEL
#ifdef _KERNEL
#define PPP_HEADER_LEN 4 /* XXX: should live in some header somewhere */
#include <sys/param.h>
@ -1287,4 +1287,4 @@ mn_attach (pcici_t tag, int unit)
return;
}
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -46,9 +46,9 @@
#define NCR_GETCC_WITHMSG
#if defined (__FreeBSD__) && defined(KERNEL)
#if defined (__FreeBSD__) && defined(_KERNEL)
#include "opt_ncr.h"
#endif /* defined(KERNEL) */
#endif
/*==========================================================
**
@ -175,7 +175,7 @@
#include <sys/param.h>
#include <sys/time.h>
#ifdef KERNEL
#ifdef _KERNEL
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/buf.h>
@ -186,7 +186,7 @@
#include <vm/vm.h>
#include <vm/pmap.h>
#include <vm/vm_extern.h>
#endif /* KERNEL */
#endif
#include <pci/pcivar.h>
#include <pci/pcireg.h>
@ -1304,7 +1304,7 @@ struct scripth {
**==========================================================
*/
#ifdef KERNEL
#ifdef _KERNEL
static nccb_p ncr_alloc_nccb (ncb_p np, u_long target, u_long lun);
static void ncr_complete (ncb_p np, nccb_p cp);
static int ncr_delta (int * from, int * to);
@ -1346,7 +1346,7 @@ static void ncr_wakeup (ncb_p np, u_long code);
static const char* ncr_probe (pcici_t tag, pcidi_t type);
static void ncr_attach (pcici_t tag, int unit);
#endif /* KERNEL */
#endif /* _KERNEL */
/*==========================================================
**
@ -1369,7 +1369,7 @@ static const u_long ncr_version = NCR_VERSION * 11
+ (u_long) sizeof (struct lcb) * 3
+ (u_long) sizeof (struct tcb) * 2;
#ifdef KERNEL
#ifdef _KERNEL
static const int nncr=MAX_UNITS; /* XXX to be replaced by SYSCTL */
static ncb_p ncrp [MAX_UNITS]; /* XXX to be replaced by SYSCTL */
@ -7198,4 +7198,4 @@ printf ("Sum = %04x\n", sum);
#endif /* NCR_TEKRAM_EEPROM */
/*=========================================================================*/
#endif /* KERNEL */
#endif /* _KERNEL */

View file

@ -44,7 +44,7 @@
/* For struct sigevent:
*/
#ifdef KERNEL
#ifdef _KERNEL
#include <sys/signal.h>
#else
#include <signal.h>
@ -87,7 +87,7 @@ struct aiocb {
int aio_lio_opcode; /* Operation to be performed */
};
#ifndef KERNEL
#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
@ -105,6 +105,6 @@ int aio_suspend __P((caio_listio_ctl[], int, const struct timespec *));
int aio_fsync __P((int, struct aiocb *));
__END_DECLS
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* _P1003_1B_AIO_H_ */

View file

@ -34,6 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#include <sys/_posix.h>
@ -56,7 +57,7 @@ struct mq_attr {
long mq_curmsgs; /* number of messages currently queued */
};
#ifndef KERNEL
#ifndef _KERNEL
#include <sys/cdefs.h>
@ -71,6 +72,6 @@ int mq_setattr __P((mqd_t, const struct mq_attr *, struct mq_attr *));
int mq_getattr __P((mqd_t, struct mq_attr *));
__END_DECLS
#endif /* KERNEL */
#endif
#endif /* _MQUEUE_H_ */

View file

@ -35,11 +35,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#include <sys/types.h> /* For pid_t */
#ifndef KERNEL
#ifndef _KERNEL
#include <time.h> /* Per P1003.4 */
#endif
@ -54,7 +55,7 @@ struct sched_param
int sched_priority;
};
#ifndef KERNEL
#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
@ -70,6 +71,6 @@ int sched_get_priority_min __P((int));
int sched_rr_get_interval __P((pid_t, struct timespec *));
__END_DECLS
#endif /* KERNEL */
#endif
#endif /* _SCHED_H_ */

View file

@ -34,6 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#include <sys/_posix.h>
@ -45,7 +46,7 @@
typedef int sem_t;
#ifndef KERNEL
#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
@ -60,6 +61,6 @@ int sem_post __P((sem_t *));
int sem_getvalue __P((sem_t *, int *));
__END_DECLS
#endif /* KERNEL */
#endif
#endif /* _SEMAPHORE_H_ */

View file

@ -34,6 +34,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#include <sys/_posix.h>
@ -45,7 +46,7 @@
typedef int sem_t;
#ifndef KERNEL
#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
@ -60,6 +61,6 @@ int sem_post __P((sem_t *));
int sem_getvalue __P((sem_t *, int *));
__END_DECLS
#endif /* KERNEL */
#endif
#endif /* _SEMAPHORE_H_ */

View file

@ -37,7 +37,7 @@
#include <sys/param.h>
#include <ufs/ffs/fs.h>
#ifndef KERNEL
#ifndef _KERNEL
#include <ufs/ufs/dinode.h>
#else
#include "opt_ddb.h"

View file

@ -130,7 +130,7 @@ struct inode {
#define IN_HASHED 0x0080 /* Inode is on hash list */
#define IN_LAZYMOD 0x0100 /* Modified, but don't write yet. */
#ifdef KERNEL
#ifdef _KERNEL
/*
* Structure used to pass around logical block paths generated by
* ufs_getlbns and used by truncate and bmap code.
@ -156,6 +156,6 @@ struct ufid {
ino_t ufid_ino; /* File number (ino). */
int32_t ufid_gen; /* Generation number. */
};
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_UFS_UFS_INODE_H_ */

View file

@ -108,7 +108,7 @@ struct dqblk {
time_t dqb_itime; /* time limit for excessive files */
};
#ifdef KERNEL
#ifdef _KERNEL
#include <sys/queue.h>
@ -191,7 +191,7 @@ int setquota __P((struct mount *, u_long, int, caddr_t));
int setuse __P((struct mount *, u_long, int, caddr_t));
int ufs_quotactl __P((struct mount *, int, uid_t, caddr_t, struct proc *));
#else /* !KERNEL */
#else /* !_KERNEL */
#include <sys/cdefs.h>
@ -199,6 +199,6 @@ __BEGIN_DECLS
int quotactl __P((const char *, int, int, void *));
__END_DECLS
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_UFS_UFS_QUOTA_H_ */

View file

@ -55,7 +55,7 @@ struct mfs_args {
u_long size; /* size of file system */
};
#ifdef KERNEL
#ifdef _KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_UFSMNT);
@ -125,6 +125,6 @@ struct ufsmount {
#define MNINDIR(ump) ((ump)->um_nindir)
#define blkptrtodb(ump, b) ((b) << (ump)->um_bptrtodb)
#define is_sequential(ump, a, b) ((b) == (a) + ump->um_seqinc)
#endif /* KERNEL */
#endif /* _KERNEL */
#endif

View file

@ -86,7 +86,7 @@ typedef struct pmap_statistics *pmap_statistics_t;
#include <machine/pmap.h>
#ifdef KERNEL
#ifdef _KERNEL
struct proc;
@ -142,6 +142,6 @@ void pmap_activate __P((struct proc *p));
vm_offset_t pmap_addr_hint __P((vm_object_t obj, vm_offset_t addr, vm_size_t size));
void pmap_init2 __P((void));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* _PMAP_VM_ */

View file

@ -83,7 +83,7 @@ struct swblock {
daddr_t swb_pages[SWAP_META_PAGES];
};
#ifdef KERNEL
#ifdef _KERNEL
extern struct pagerlst swap_pager_un_object_list;
extern int swap_pager_full;
extern struct blist *swapblist;

View file

@ -95,7 +95,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 *));
@ -97,6 +97,6 @@ void vm_object_print __P((/* db_expr_t */ long, boolean_t, /* db_expr_t */ long,
char *));
int vm_fault_quick __P((caddr_t v, int prot));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* !_VM_EXTERN_H_ */

View file

@ -341,7 +341,7 @@ vmspace_resident_count(struct vmspace *vmspace)
#define VM_FAULT_HOLD 4 /* Hold the page */
#define VM_FAULT_DIRTY 8 /* Dirty the page */
#ifdef KERNEL
#ifdef _KERNEL
boolean_t vm_map_check_protection __P((vm_map_t, vm_offset_t, vm_offset_t, vm_prot_t));
struct pmap;
vm_map_t vm_map_create __P((struct pmap *, vm_offset_t, vm_offset_t));

View file

@ -151,7 +151,7 @@ struct vm_object {
#define IDX_TO_OFF(idx) (((vm_ooffset_t)(idx)) << PAGE_SHIFT)
#define OFF_TO_IDX(off) ((vm_pindex_t)(((vm_ooffset_t)(off)) >> PAGE_SHIFT))
#ifdef KERNEL
#ifdef _KERNEL
#define OBJPC_SYNC 0x1 /* sync I/O */
#define OBJPC_INVAL 0x2 /* invalidate */
@ -166,9 +166,9 @@ extern struct object_q vm_object_list; /* list of allocated objects */
extern vm_object_t kernel_object; /* the single kernel object */
extern vm_object_t kmem_object;
#endif /* KERNEL */
#endif /* _KERNEL */
#ifdef KERNEL
#ifdef _KERNEL
static __inline void
vm_object_set_flag(vm_object_t object, u_int bits)
@ -252,6 +252,6 @@ void vm_object_reference __P((vm_object_t));
void vm_object_shadow __P((vm_object_t *, vm_ooffset_t *, vm_size_t));
void vm_object_madvise __P((vm_object_t, vm_pindex_t, int, int));
void vm_object_init2 __P((void));
#endif /* KERNEL */
#endif /* _KERNEL */
#endif /* _VM_OBJECT_ */

Some files were not shown because too many files have changed in this diff Show more