Use __BEGIN_DECLS / __END_DECLS consistently for _KERNEL part too.

Don't pollute namespace by including sys/sysctl.h for !_KERNEL part.
This commit is contained in:
joerg 2015-05-19 12:17:53 +00:00
parent 6d8eadc7be
commit 7d8086b58f
1 changed files with 7 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipc.h,v 1.35 2015/05/13 01:23:10 pgoyette Exp $ */
/* $NetBSD: ipc.h,v 1.36 2015/05/19 12:17:53 joerg Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -50,7 +50,6 @@
#include <sys/featuretest.h>
#include <sys/types.h>
#include <sys/sysctl.h>
struct ipc_perm {
uid_t uid; /* user id */
@ -108,14 +107,17 @@ struct ipc_perm_sysctl {
#endif
#ifdef _KERNEL
#include <sys/sysctl.h>
#define IPCID_TO_IX(id) ((id) & 0xffff)
#define IPCID_TO_SEQ(id) (((id) >> 16) & 0xffff)
struct kauth_cred;
__BEGIN_DECLS
int ipcperm(struct kauth_cred *, struct ipc_perm *, int);
void sysvipcinit(void);
void sysvipcfini(void);
__END_DECLS
/*
* sysctl helper routine for kern.ipc.sysvipc_info subtree.
@ -135,13 +137,11 @@ void sysvipcfini(void);
* Set-up the sysctl routine for COMPAT_50
*/
__BEGIN_DECLS
void sysvipc50_set_compat_sysctl(int (*)(SYSCTLFN_PROTO));
__END_DECLS
#endif /* _KERNEL */
#ifndef _KERNEL
#include <sys/cdefs.h>
#else /* _KERNEL */
__BEGIN_DECLS
key_t ftok(const char *, int);
__END_DECLS