Source-Changes-HG archive

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

[src/trunk]: src/sys/sys Use __BEGIN_DECLS / __END_DECLS consistently for _KE...



details:   https://anonhg.NetBSD.org/src/rev/1da578e4ab01
branches:  trunk
changeset: 338348:1da578e4ab01
user:      joerg <joerg%NetBSD.org@localhost>
date:      Tue May 19 12:17:53 2015 +0000

description:
Use __BEGIN_DECLS / __END_DECLS consistently for _KERNEL part too.
Don't pollute namespace by including sys/sysctl.h for !_KERNEL part.

diffstat:

 sys/sys/ipc.h |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (52 lines):

diff -r 99a086b6722a -r 1da578e4ab01 sys/sys/ipc.h
--- a/sys/sys/ipc.h     Tue May 19 09:20:19 2015 +0000
+++ b/sys/sys/ipc.h     Tue May 19 12:17:53 2015 +0000
@@ -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 @@
 #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 @@
  * Set-up the sysctl routine for COMPAT_50
  */
 
+__BEGIN_DECLS
 void sysvipc50_set_compat_sysctl(int (*)(SYSCTLFN_PROTO));
-
-#endif /* _KERNEL */
+__END_DECLS
 
-#ifndef _KERNEL
-#include <sys/cdefs.h>
-
+#else /* _KERNEL */
 __BEGIN_DECLS
 key_t  ftok(const char *, int);
 __END_DECLS



Home | Main Index | Thread Index | Old Index