summaryrefslogtreecommitdiffstats
path: root/include/grp.h
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2002-02-26 19:43:03 +0000
committermike <mike@FreeBSD.org>2002-02-26 19:43:03 +0000
commitd20627ce9b55094b48f14450a8fad468e11f3927 (patch)
tree66f2f4b240f161008805775c25f8c918cec6ee5a /include/grp.h
parentb1c3d8a6033a2b94ebf7fa936314b3458eba15ef (diff)
downloadFreeBSD-src-d20627ce9b55094b48f14450a8fad468e11f3927.zip
FreeBSD-src-d20627ce9b55094b48f14450a8fad468e11f3927.tar.gz
Rather than include namespace pollution in <grp.h> in order to declare
`gid_t', use the canonical protection scheme to define a type in two or more headers. This brings <grp.h> closer to POSIX.1-2001 conformance.
Diffstat (limited to 'include/grp.h')
-rw-r--r--include/grp.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/grp.h b/include/grp.h
index abd88ef..07a4e45 100644
--- a/include/grp.h
+++ b/include/grp.h
@@ -42,13 +42,17 @@
#ifndef _GRP_H_
#define _GRP_H_
-#include <sys/types.h>
#include <sys/cdefs.h>
#ifndef _POSIX_SOURCE
#define _PATH_GROUP "/etc/group"
#endif
+#ifndef _GID_T_DECLARED
+#define _GID_T_DECLARED
+typedef u_int32_t gid_t;
+#endif
+
struct group {
char *gr_name; /* group name */
char *gr_passwd; /* group password */
OpenPOWER on IntegriCloud