]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
Get function prototypes for msg, shm, sem functions
authorrodrigc <rodrigc@FreeBSD.org>
Thu, 30 Jul 2015 18:59:01 +0000 (18:59 +0000)
committerrodrigc <rodrigc@FreeBSD.org>
Thu, 30 Jul 2015 18:59:01 +0000 (18:59 +0000)
from header files.

Differential Revision: D2669

sys/sys/msg.h
sys/sys/sem.h
sys/sys/shm.h
usr.bin/ipcrm/ipcrm.c

index f4193c8257df2af80334de7d388e8a406b672f3e..8f56c948225700d6008c3949c6b0a62450abef3b 100644 (file)
@@ -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_ */
index 0ea259bd9ab8d10ccd0f9c7f976cb05a59590b1e..abfb7cdcd4d83a8839c7b43d3acaf34c7f595655 100644 (file)
@@ -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_ */
index 799bbf5fd8ebe8af5bcd5b80cf114f6592670dd4..f685df3fbe76c2c705a27f3fdd58b90e66fb59f4 100644 (file)
@@ -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_ */
index c255ef81e5d0ebd374de59679444a88d04e7a45c..de97696bce9c32ff63b206a9cbf11f7558ef5eb3 100644 (file)
@@ -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>