about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
Diffstat (limited to 'posix')
-rw-r--r--posix/bits/posix1_lim.h7
-rw-r--r--posix/regex.h2
-rw-r--r--posix/unistd.h25
3 files changed, 30 insertions, 4 deletions
diff --git a/posix/bits/posix1_lim.h b/posix/bits/posix1_lim.h
index 71a7cc45a3..ee84b94a70 100644
--- a/posix/bits/posix1_lim.h
+++ b/posix/bits/posix1_lim.h
@@ -118,13 +118,16 @@
 /* Maximum length of login name.  */
 #define	_POSIX_LOGIN_NAME_MAX	9
 
+/* Maximum clock resolution in nanoseconds.  */
+#define _POSIX_CLOCKRES_MIN	20000000
+
 
 /* Get the implementation-specific values for the above.  */
 #include <bits/local_lim.h>
 
 
 #ifndef	SSIZE_MAX
-#define	SSIZE_MAX	INT_MAX
+# define SSIZE_MAX	INT_MAX
 #endif
 
 
@@ -132,7 +135,7 @@
    The current maximum can be got from `sysconf'.  */
 
 #ifndef	NGROUPS_MAX
-#define	NGROUPS_MAX	_POSIX_NGROUPS_MAX
+# define NGROUPS_MAX	_POSIX_NGROUPS_MAX
 #endif
 
 #endif	/* bits/posix1_lim.h  */
diff --git a/posix/regex.h b/posix/regex.h
index cb26d54072..0efef36e66 100644
--- a/posix/regex.h
+++ b/posix/regex.h
@@ -283,7 +283,7 @@ extern reg_syntax_t re_syntax_options;
 typedef enum
 {
 #if (_XOPEN_SOURCE - 0) == 500
-  REG_NOSYS = -1,	/* This will never happen for this implementation.  */
+  REG_ENOSYS = -1,	/* This will never happen for this implementation.  */
 #endif
 
   REG_NOERROR = 0,	/* Success.  */
diff --git a/posix/unistd.h b/posix/unistd.h
index c824311d2a..fa28d94d1e 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -228,6 +228,11 @@ typedef __off64_t off64_t;
 typedef __pid_t pid_t;
 #  define pid_t pid_t
 # endif
+
+# ifndef intptr_t
+typedef __intptr_t intptr_t;
+#  define intptr_t intptr_t
+# endif
 #endif	/* Unix98 */
 
 /* Values for the second argument to access.
@@ -1054,8 +1059,26 @@ extern void swab __P ((__const __ptr_t __from, __ptr_t __to, ssize_t __n));
 /* Return the name of the controlling terminal.  */
 extern char *ctermid __P ((char *__s));
 
-/* Return the name of the current user.  */
+/* Return the name of the current user.  This function should not be
+   used and might go away some time.  */
 extern char *cuserid __P ((char *__s));
+
+
+/* This function is only available if the system has POSIX threads.  */
+
+/* Install handlers to be called when a new process is created with FORK.
+   The PREPARE handler is called in the parent process just before performing
+   FORK. The PARENT handler is called in the parent process just after FORK.
+   The CHILD handler is called in the child process.  Each of the three
+   handlers can be NULL, meaning that no handler needs to be called at that
+   point.
+   PTHREAD_ATFORK can be called several times, in which case the PREPARE
+   handlers are called in LIFO order (last added with PTHREAD_ATFORK,
+   first called before FORK), and the PARENT and CHILD handlers are called
+   in FIFO (first added, first called). */
+extern int pthread_atfork __P ((void (*__prepare) (void),
+				void (*__parent) (void),
+				void (*__child) (void)));
 #endif
 
 __END_DECLS