Loading...
include/grp.h Libc-320 Libc-498
--- Libc/Libc-320/include/grp.h
+++ Libc/Libc-498/include/grp.h
@@ -2,8 +2,6 @@
  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
- * 
- * Copyright (c) 1999-2003 Apple Computer, Inc.  All Rights Reserved.
  * 
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apple Public Source License
@@ -65,31 +63,52 @@
 #ifndef _GRP_H_
 #define	_GRP_H_
 
-#ifndef _POSIX_SOURCE
+#include <_types.h>
+
+#ifndef _GID_T
+typedef __darwin_gid_t	gid_t;		/* [XBD] */
+#define _GID_T
+#endif
+
+/*
+ * Although the definition of size_t is not mandated by [TSF], the function
+ * prototypes defined by [TSF] for the thread reentrant functions include
+ * it as a type for their 4th arguments, so we define it here.
+ */
+#ifndef _SIZE_T
+#define _SIZE_T
+typedef __darwin_size_t	size_t;		/* [???] */
+#endif
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
 #define	_PATH_GROUP		"/etc/group"
 #endif
 
 struct group {
-	char	*gr_name;		/* group name */
-	char	*gr_passwd;		/* group password */
-	gid_t	gr_gid;			/* group id */
-	char	**gr_mem;		/* group members */
+	char	*gr_name;		/* [XBD] group name */
+	char	*gr_passwd;		/* [???] group password */
+	gid_t	gr_gid;			/* [XBD] group id */
+	char	**gr_mem;		/* [XBD] group members */
 };
 
 #include <sys/cdefs.h>
 
 __BEGIN_DECLS
+/* [XBD] */
 struct group *getgrgid(gid_t);
 struct group *getgrnam(const char *);
+/* [TSF] */
 int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
 int getgrnam_r(const char *, struct group *, char *, size_t, struct group **);
-#ifndef _POSIX_SOURCE
+/* [XSI] */
 struct group *getgrent(void);
-#ifndef _XOPEN_SOURCE
+void setgrent(void);
+void endgrent(void);
+
+#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
+#if !defined(_XOPEN_SOURCE) || defined(_DARWIN_C_SOURCE)
 char *group_from_gid(gid_t, int);
 #endif
-int setgrent(void);
-void endgrent(void);
 void setgrfile(const char *);
 int setgroupent(int);
 #endif