summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2002-12-29 03:38:48 +0000
committermike <mike@FreeBSD.org>2002-12-29 03:38:48 +0000
commit18e06684dbf1b093725c7a7a805ebfad43a4b834 (patch)
treee4f854d8d6e5a90c8612e8091b0f8643c3d94f36
parentecf11a03ad8453e3b4933d68a139b3b12d91f756 (diff)
downloadFreeBSD-src-18e06684dbf1b093725c7a7a805ebfad43a4b834.zip
FreeBSD-src-18e06684dbf1b093725c7a7a805ebfad43a4b834.tar.gz
o Fix ordering of typedefs.
o Improve comment about namespace pollution. o Improve CPP style. Submitted by: bde
-rw-r--r--sys/sys/msg.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/sys/sys/msg.h b/sys/sys/msg.h
index d34a6d7..508e9be 100644
--- a/sys/sys/msg.h
+++ b/sys/sys/msg.h
@@ -42,11 +42,6 @@ typedef __pid_t pid_t;
#define _PID_T_DECLARED
#endif
-#ifndef _TIME_T_DECLARED
-typedef __time_t time_t;
-#define _TIME_T_DECLARED
-#endif
-
#ifndef _SIZE_T_DECLARED
typedef __size_t size_t;
#define _SIZE_T_DECLARED
@@ -57,8 +52,16 @@ typedef __ssize_t ssize_t;
#define _SSIZE_T_DECLARED
#endif
-/* XXX namespace pollution. */
-struct msg;
+#ifndef _TIME_T_DECLARED
+typedef __time_t time_t;
+#define _TIME_T_DECLARED
+#endif
+
+/*
+ * XXX there seems to be no prefix reserved for this header, so the name
+ * "msg" in "struct msg" and the names of all of the nonstandard members
+ * (mainly "msg_pad*) are namespace pollution.
+ */
struct msqid_ds {
struct ipc_perm msg_perm; /* msg queue permission bits */
@@ -116,9 +119,8 @@ struct msginfo {
msgseg; /* number of message segments */
};
extern struct msginfo msginfo;
-#endif
-#ifndef _KERNEL
+#else /* !_KERNEL */
__BEGIN_DECLS
int msgctl(int, int, struct msqid_ds *);
@@ -132,6 +134,6 @@ int msgsys(int, ...);
#endif
__END_DECLS
-#endif
+#endif /* _KERNEL */
#endif /* !_SYS_MSG_H_ */
OpenPOWER on IntegriCloud