summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2015-07-30 18:59:01 +0000
committerrodrigc <rodrigc@FreeBSD.org>2015-07-30 18:59:01 +0000
commit419fdebf3d0e363f8486e1422197f9c0009f12cf (patch)
tree73c984b1da5629edf976997ecfdbe7debd9128c4
parentca7adff0b82acb3e94fa89704aade20774b85bd1 (diff)
downloadFreeBSD-src-419fdebf3d0e363f8486e1422197f9c0009f12cf.zip
FreeBSD-src-419fdebf3d0e363f8486e1422197f9c0009f12cf.tar.gz
Get function prototypes for msg, shm, sem functions
from header files. Differential Revision: D2669
-rw-r--r--sys/sys/msg.h5
-rw-r--r--sys/sys/sem.h5
-rw-r--r--sys/sys/shm.h5
-rw-r--r--usr.bin/ipcrm/ipcrm.c3
4 files changed, 12 insertions, 6 deletions
diff --git a/sys/sys/msg.h b/sys/sys/msg.h
index f4193c8..8f56c94 100644
--- a/sys/sys/msg.h
+++ b/sys/sys/msg.h
@@ -163,8 +163,9 @@ struct msqid_kernel {
struct ucred *cred; /* creator's credentials */
};
-#else /* !_KERNEL */
+#endif /* _KERNEL */
+#if !defined(_KERNEL) || defined(_WANT_MSG_PROTOTYPES)
__BEGIN_DECLS
int msgctl(int, int, struct msqid_ds *);
int msgget(key_t, int);
@@ -176,6 +177,6 @@ int msgsys(int, ...);
#endif
__END_DECLS
-#endif /* _KERNEL */
+#endif /* !_KERNEL || _WANT_MSG_PROTOTYPES */
#endif /* !_SYS_MSG_H_ */
diff --git a/sys/sys/sem.h b/sys/sys/sem.h
index 0ea259b..abfb7cd 100644
--- a/sys/sys/sem.h
+++ b/sys/sys/sem.h
@@ -137,8 +137,9 @@ struct semid_kernel {
*/
void semexit(struct proc *p);
-#else /* ! _KERNEL */
+#endif /* _KERNEL */
+#if !defined(_KERNEL) || defined(_WANT_SEM_PROTOTYPES)
__BEGIN_DECLS
#if __BSD_VISIBLE
int semsys(int, ...);
@@ -148,6 +149,6 @@ int semget(key_t, int, int);
int semop(int, struct sembuf *, size_t);
__END_DECLS
-#endif /* !_KERNEL */
+#endif /* !_KERNEL || _WANT_SEM_PROTOTYPES */
#endif /* !_SYS_SEM_H_ */
diff --git a/sys/sys/shm.h b/sys/sys/shm.h
index 799bbf5..f685df3 100644
--- a/sys/sys/shm.h
+++ b/sys/sys/shm.h
@@ -144,8 +144,9 @@ struct vmspace;
void shmexit(struct vmspace *);
void shmfork(struct proc *, struct proc *);
-#else /* !_KERNEL */
+#endif /* _KERNEL */
+#if !defined(_KERNEL) || defined(_WANT_SHM_PROTOTYPES)
#include <sys/cdefs.h>
#ifndef _SIZE_T_DECLARED
@@ -163,6 +164,6 @@ int shmctl(int, int, struct shmid_ds *);
int shmdt(const void *);
__END_DECLS
-#endif /* !_KERNEL */
+#endif /* _KERNEL || _WANT_SHM_PROTOTYPES */
#endif /* !_SYS_SHM_H_ */
diff --git a/usr.bin/ipcrm/ipcrm.c b/usr.bin/ipcrm/ipcrm.c
index c255ef8..de97696 100644
--- a/usr.bin/ipcrm/ipcrm.c
+++ b/usr.bin/ipcrm/ipcrm.c
@@ -34,6 +34,9 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
+#define _WANT_MSG_PROTOTYPES
+#define _WANT_SEM_PROTOTYPES
+#define _WANT_SHM_PROTOTYPES
#define _KERNEL
#include <sys/sem.h>
#include <sys/shm.h>
OpenPOWER on IntegriCloud