Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jul 2015 18:59:02 +0000 (UTC)
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r286088 - in head: sys/sys usr.bin/ipcrm
Message-ID:  <201507301859.t6UIx2LO078493@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rodrigc
Date: Thu Jul 30 18:59:01 2015
New Revision: 286088
URL: https://svnweb.freebsd.org/changeset/base/286088

Log:
  Get function prototypes for msg, shm, sem functions
  from header files.
  
  Differential Revision: D2669

Modified:
  head/sys/sys/msg.h
  head/sys/sys/sem.h
  head/sys/sys/shm.h
  head/usr.bin/ipcrm/ipcrm.c

Modified: head/sys/sys/msg.h
==============================================================================
--- head/sys/sys/msg.h	Thu Jul 30 18:28:37 2015	(r286087)
+++ head/sys/sys/msg.h	Thu Jul 30 18:59:01 2015	(r286088)
@@ -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_ */

Modified: head/sys/sys/sem.h
==============================================================================
--- head/sys/sys/sem.h	Thu Jul 30 18:28:37 2015	(r286087)
+++ head/sys/sys/sem.h	Thu Jul 30 18:59:01 2015	(r286088)
@@ -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_ */

Modified: head/sys/sys/shm.h
==============================================================================
--- head/sys/sys/shm.h	Thu Jul 30 18:28:37 2015	(r286087)
+++ head/sys/sys/shm.h	Thu Jul 30 18:59:01 2015	(r286088)
@@ -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_ */

Modified: head/usr.bin/ipcrm/ipcrm.c
==============================================================================
--- head/usr.bin/ipcrm/ipcrm.c	Thu Jul 30 18:28:37 2015	(r286087)
+++ head/usr.bin/ipcrm/ipcrm.c	Thu Jul 30 18:59:01 2015	(r286088)
@@ -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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507301859.t6UIx2LO078493>