summaryrefslogtreecommitdiff
path: root/conform/data
diff options
context:
space:
mode:
Diffstat (limited to 'conform/data')
-rw-r--r--conform/data/aio.h-data2
-rw-r--r--conform/data/arpa/inet.h-data2
-rw-r--r--conform/data/complex.h-data2
-rw-r--r--conform/data/ctype.h-data2
-rw-r--r--conform/data/dlfcn.h-data2
-rw-r--r--conform/data/fcntl.h-data18
-rw-r--r--conform/data/fenv.h-data2
-rw-r--r--conform/data/float.h-data2
-rw-r--r--conform/data/fmtmsg.h-data2
-rw-r--r--conform/data/ftw.h-data9
-rw-r--r--conform/data/grp.h-data2
-rw-r--r--conform/data/inttypes.h-data2
-rw-r--r--conform/data/iso646.h-data2
-rw-r--r--conform/data/langinfo.h-data5
-rw-r--r--conform/data/libgen.h-data2
-rw-r--r--conform/data/limits.h-data36
-rw-r--r--conform/data/locale.h-data2
-rw-r--r--conform/data/math.h-data30
-rw-r--r--conform/data/mqueue.h-data11
-rw-r--r--conform/data/ndbm.h-data2
-rw-r--r--conform/data/net/if.h-data2
-rw-r--r--conform/data/netdb.h-data11
-rw-r--r--conform/data/netinet/in.h-data4
-rw-r--r--conform/data/poll.h-data2
-rw-r--r--conform/data/pthread.h-data2
-rw-r--r--conform/data/pwd.h-data2
-rw-r--r--conform/data/sched.h-data2
-rw-r--r--conform/data/search.h-data4
-rw-r--r--conform/data/semaphore.h-data6
-rw-r--r--conform/data/signal.h-data87
-rw-r--r--conform/data/spawn.h-data2
-rw-r--r--conform/data/stdarg.h-data2
-rw-r--r--conform/data/stdbool.h-data2
-rw-r--r--conform/data/stdint.h-data2
-rw-r--r--conform/data/stdio.h-data36
-rw-r--r--conform/data/stdlib.h-data55
-rw-r--r--conform/data/string.h-data2
-rw-r--r--conform/data/strings.h-data2
-rw-r--r--conform/data/stropts.h-data2
-rw-r--r--conform/data/sys/ipc.h-data9
-rw-r--r--conform/data/sys/mman.h-data4
-rw-r--r--conform/data/sys/msg.h-data5
-rw-r--r--conform/data/sys/resource.h-data2
-rw-r--r--conform/data/sys/select.h-data7
-rw-r--r--conform/data/sys/shm.h-data5
-rw-r--r--conform/data/sys/socket.h-data5
-rw-r--r--conform/data/sys/stat.h-data36
-rw-r--r--conform/data/sys/statvfs.h-data5
-rw-r--r--conform/data/sys/time.h-data2
-rw-r--r--conform/data/sys/timeb.h-data2
-rw-r--r--conform/data/sys/types.h-data6
-rw-r--r--conform/data/sys/uio.h-data2
-rw-r--r--conform/data/sys/un.h-data4
-rw-r--r--conform/data/sys/wait.h-data28
-rw-r--r--conform/data/syslog.h-data2
-rw-r--r--conform/data/termios.h-data2
-rw-r--r--conform/data/tgmath.h-data2
-rw-r--r--conform/data/threads.h-data57
-rw-r--r--conform/data/time.h-data23
-rw-r--r--conform/data/ucontext.h-data8
-rw-r--r--conform/data/unistd.h-data74
-rw-r--r--conform/data/utmpx.h-data2
-rw-r--r--conform/data/varargs.h-data2
-rw-r--r--conform/data/wchar.h-data2
-rw-r--r--conform/data/wctype.h-data2
65 files changed, 397 insertions, 265 deletions
diff --git a/conform/data/aio.h-data b/conform/data/aio.h-data
index e87923ed70..adb291b6e1 100644
--- a/conform/data/aio.h-data
+++ b/conform/data/aio.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3 && !defined XPG4
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42
type {struct aiocb}
// Test elements of the AIO control struct.
diff --git a/conform/data/arpa/inet.h-data b/conform/data/arpa/inet.h-data
index 2bd3aeea0a..d4ab6bb72a 100644
--- a/conform/data/arpa/inet.h-data
+++ b/conform/data/arpa/inet.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4
// in_port_t should have exactly 16 bits
type in_port_t
// in_addr_t should have exactly 32 bits
diff --git a/conform/data/complex.h-data b/conform/data/complex.h-data
index 7de888f81b..4af7757bd7 100644
--- a/conform/data/complex.h-data
+++ b/conform/data/complex.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
macro complex
macro _Complex_I
optional-macro imaginary
diff --git a/conform/data/ctype.h-data b/conform/data/ctype.h-data
index 3ee21c9b7d..7e10794e46 100644
--- a/conform/data/ctype.h-data
+++ b/conform/data/ctype.h-data
@@ -12,7 +12,7 @@ function int isxdigit (int)
function int tolower (int)
function int toupper (int)
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function int isblank (int)
#endif
diff --git a/conform/data/dlfcn.h-data b/conform/data/dlfcn.h-data
index a954c9db46..b6658ae8ca 100644
--- a/conform/data/dlfcn.h-data
+++ b/conform/data/dlfcn.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined XPG4
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42
macro RTLD_LAZY
macro RTLD_NOW
macro RTLD_GLOBAL
diff --git a/conform/data/fcntl.h-data b/conform/data/fcntl.h-data
index 1971d4a742..2d5827f6ec 100644
--- a/conform/data/fcntl.h-data
+++ b/conform/data/fcntl.h-data
@@ -7,7 +7,7 @@ constant F_SETFL
constant F_GETLK
constant F_SETLK
constant F_SETLKW
-#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
constant F_GETOWN
constant F_SETOWN
#endif
@@ -36,7 +36,7 @@ constant O_TRUNC
constant O_APPEND
constant O_NONBLOCK
constant O_SYNC
-#if !defined XPG3 && !defined XPG4
+#if !defined XPG4 && !defined XPG42
constant O_DSYNC
constant O_RSYNC
#endif
@@ -48,15 +48,6 @@ constant O_RDWR
constant O_WRONLY
#if !defined POSIX
-constant S_IFMT
-constant S_IFBLK
-constant S_IFCHR
-constant S_IFIFO
-constant S_IFREG
-constant S_IFDIR
-constant S_IFLNK
-constant S_IFSOCK
-
constant S_IRWXU
constant S_IRUSR
constant S_IWUSR
@@ -87,8 +78,9 @@ constant POSIX_FADV_NOREUSE
type {struct flock}
-element {struct flock} short l_type
-element {struct flock} short l_whence
+// Bug 23081: l_type and l_whence members of flock structure have type int instead of short
+xfail[i386-gnu]-element {struct flock} short l_type
+xfail[i386-gnu]-element {struct flock} short l_whence
element {struct flock} off_t l_start
element {struct flock} off_t l_len
element {struct flock} pid_t l_pid
diff --git a/conform/data/fenv.h-data b/conform/data/fenv.h-data
index bb33d4b06e..280b72864c 100644
--- a/conform/data/fenv.h-data
+++ b/conform/data/fenv.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
type fenv_t
type fexcept_t
diff --git a/conform/data/float.h-data b/conform/data/float.h-data
index 350802ac29..7b98fc0344 100644
--- a/conform/data/float.h-data
+++ b/conform/data/float.h-data
@@ -38,7 +38,7 @@ macro-constant FLT_MIN <= 1.0E-37
macro-constant DBL_MIN <= 1.0E-37
macro-constant LDBL_MIN <= 1.0E-37
-#if !defined ISO && !defined XPG3 && !defined XPG4 && !defined POSIX && !defined UNIX98
+#if !defined ISO && !defined XPG4 && !defined XPG42 && !defined POSIX && !defined UNIX98
macro-int-constant DECIMAL_DIG >= 10
macro-int-constant FLT_EVAL_METHOD
#endif
diff --git a/conform/data/fmtmsg.h-data b/conform/data/fmtmsg.h-data
index e64d87ce40..c1b18ad4a4 100644
--- a/conform/data/fmtmsg.h-data
+++ b/conform/data/fmtmsg.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4
macro MM_HARD
constant MM_HARD
diff --git a/conform/data/ftw.h-data b/conform/data/ftw.h-data
index 0fa586a6fc..340334bfd4 100644
--- a/conform/data/ftw.h-data
+++ b/conform/data/ftw.h-data
@@ -1,13 +1,19 @@
#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
+# ifndef XPG4
type {struct FTW}
element {struct FTW} int base
element {struct FTW} int level
+# endif
macro FTW_F
macro FTW_D
macro FTW_DNR
+# if !defined XPG4 && !defined XPG42
macro FTW_DP
+# endif
macro FTW_NS
+
+# ifndef XPG4
macro FTW_SL
macro FTW_SLN
@@ -15,9 +21,12 @@ macro FTW_PHYS
macro FTW_MOUNT
macro FTW_DEPTH
macro FTW_CHDIR
+# endif
function int ftw (const char*, int (*) (const char *, const struct stat*, int), int)
+# ifndef XPG4
function int nftw (const char*, int (*) (const char *, const struct stat*, int, struct FTW *), int, int)
+# endif
allow-header sys/stat.h
diff --git a/conform/data/grp.h-data b/conform/data/grp.h-data
index 53e880d418..1688444586 100644
--- a/conform/data/grp.h-data
+++ b/conform/data/grp.h-data
@@ -19,7 +19,7 @@ function {struct group*} getgrgid (gid_t)
function {struct group*} getgrnam (const char*)
function int getgrgid_r (gid_t, struct group*, char *, size_t, struct group**)
function int getgrnam_r (const char *, struct group *, char *, size_t, struct group**)
-# if !defined XPG3 && !defined POSIX && !defined POSIX2008
+# if !defined XPG4 && !defined POSIX && !defined POSIX2008
function {struct group*} getgrent (void)
function void endgrent (void)
function void setgrent (void)
diff --git a/conform/data/inttypes.h-data b/conform/data/inttypes.h-data
index 8c076dff88..2ae5b951be 100644
--- a/conform/data/inttypes.h-data
+++ b/conform/data/inttypes.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
#include "stdint.h-data"
type imaxdiv_t
diff --git a/conform/data/iso646.h-data b/conform/data/iso646.h-data
index d4afaa5795..9e307f734d 100644
--- a/conform/data/iso646.h-data
+++ b/conform/data/iso646.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42
macro and
macro and_eq
macro bitand
diff --git a/conform/data/langinfo.h-data b/conform/data/langinfo.h-data
index 51dd925a8a..6bbb3872a0 100644
--- a/conform/data/langinfo.h-data
+++ b/conform/data/langinfo.h-data
@@ -55,6 +55,11 @@ constant YESEXPR
constant NOEXPR
constant CRNCYSTR
+# if defined XPG4 || defined XPG42 || defined UNIX98
+constant YESSTR
+constant NOSTR
+# endif
+
type nl_item
# if defined XOPEN2K8 || defined POSIX2008
type locale_t
diff --git a/conform/data/libgen.h-data b/conform/data/libgen.h-data
index 443cd0bd22..e9eb5fafc9 100644
--- a/conform/data/libgen.h-data
+++ b/conform/data/libgen.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4
function {char*} basename (char*)
function {char*} dirname (char*)
diff --git a/conform/data/limits.h-data b/conform/data/limits.h-data
index 726db1e632..23114a5fa0 100644
--- a/conform/data/limits.h-data
+++ b/conform/data/limits.h-data
@@ -32,12 +32,12 @@ allow AIO_LISTIO_MAX
allow AIO_MAX
allow AIO_PRIO_DELTA_MAX
allow ARG_MAX
-#if !defined POSIX && !defined XPG3
+#if !defined POSIX && !defined XPG4
allow ATEXIT_MAX
#endif
allow CHILD_MAX
allow DELAYTIMER_MAX
-#if !defined POSIX && !defined POSIX2008 && !defined XPG3
+#if !defined POSIX && !defined POSIX2008 && !defined XPG4
allow IOV_MAX
#endif
allow LOGIN_NAME_MAX
@@ -56,18 +56,18 @@ allow RTSIG_MAX
allow SEM_NSEMS_MAX
allow SEM_VALUE_MAX
allow SIGQUEUE_MAX
-#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
allow SS_REPL_MAX
#endif
allow STREAM_MAX
-#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
allow SYMLOOP_MAX
#endif
allow TIMER_MAX
allow TTY_NAME_MAX
allow TZNAME_MAX
-#if !defined POSIX && !defined XPG3 && !defined XPG4
+#if !defined POSIX && !defined XPG4 && !defined XPG42
allow FILESIZEBITS
#endif
allow LINK_MAX
@@ -76,7 +76,7 @@ allow MAX_INPUT
allow NAME_MAX
allow PATH_MAX
allow PIPE_BUF
-#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
allow POSIX_ALLOC_SIZE_MIN
allow POSIX_REC_INCR_XFER_SIZE
allow POSIX_REC_MAX_XFER_SIZE
@@ -88,7 +88,7 @@ macro-constant BC_BASE_MAX >= _POSIX2_BC_BASE_MAX
macro-constant BC_DIM_MAX >= _POSIX2_BC_DIM_MAX
macro-constant BC_SCALE_MAX >= _POSIX2_BC_SCALE_MAX
macro-constant BC_STRING_MAX >= _POSIX2_BC_STRING_MAX
-#if !defined POSIX && !defined XPG3 && !defined XPG4
+#if !defined POSIX && !defined XPG4 && !defined XPG42
macro CHARCLASS_NAME_MAX
#endif
macro-constant COLL_WEIGHTS_MAX >= _POSIX2_COLL_WEIGHTS_MAX
@@ -102,7 +102,7 @@ constant _POSIX_CLOCKRES_MIN == 20000000
constant _POSIX_AIO_LISTIO_MAX == 2
constant _POSIX_AIO_MAX == 1
constant _POSIX_ARG_MAX == 4096
-#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
constant _POSIX_CHILD_MAX == 25
#else
constant _POSIX_CHILD_MAX == 6
@@ -115,12 +115,12 @@ constant _POSIX_MAX_INPUT == 255
constant _POSIX_MQ_OPEN_MAX == 8
constant _POSIX_MQ_PRIO_MAX == 32
constant _POSIX_NAME_MAX == 14
-#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
constant _POSIX_NGROUPS_MAX == 8
#else
constant _POSIX_NGROUPS_MAX == 0
#endif
-#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
constant _POSIX_OPEN_MAX == 20
#else
constant _POSIX_OPEN_MAX == 16
@@ -134,7 +134,7 @@ constant _POSIX_SEM_VALUE_MAX == 32767
constant _POSIX_SIGQUEUE_MAX == 32
constant _POSIX_SSIZE_MAX == 32767
constant _POSIX_STREAM_MAX == 8
-#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
optional-constant _POSIX_SS_REPL_MAX == 4
optional-constant _POSIX_SYMLINK_MAX == 255
optional-constant _POSIX_SYMLOOP_MAX == 8
@@ -144,7 +144,7 @@ constant _POSIX_THREAD_KEYS_MAX == 128
constant _POSIX_THREAD_THREADS_MAX == 64
constant _POSIX_TIMER_MAX == 32
constant _POSIX_TTY_NAME_MAX == 9
-#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
constant _POSIX_TZNAME_MAX == 6
#else
constant _POSIX_TZNAME_MAX == 3
@@ -153,14 +153,14 @@ macro-constant _POSIX2_BC_BASE_MAX == 99
macro-constant _POSIX2_BC_DIM_MAX == 2048
macro-constant _POSIX2_BC_SCALE_MAX == 99
macro-constant _POSIX2_BC_STRING_MAX == 1000
-#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
constant _POSIX2_CHARCLASS_NAME_MAX == 14
#endif
macro-constant _POSIX2_COLL_WEIGHTS_MAX == 2
macro-constant _POSIX2_EXPR_NEST_MAX == 32
macro-constant _POSIX2_LINE_MAX == 2048
macro-constant _POSIX2_RE_DUP_MAX == 255
-#if !defined POSIX && !defined POSIX2008 && !defined XPG3
+#if !defined POSIX && !defined POSIX2008 && !defined XPG4
optional-constant _XOPEN_IOV_MAX == 16
#endif
@@ -170,10 +170,10 @@ constant LONG_BIT >= 32
#endif
constant SSIZE_MAX
-#if !defined POSIX && !defined XPG3 && !defined XPG4
+#if !defined POSIX
optional-constant CHARCLASS_NAME_MAX >= 14
#endif
-#if !defined POSIX && !defined XPG3
+#if !defined POSIX
optional-constant NL_ARGMAX >= 9
# if !defined POSIX2008
optional-constant NL_LANGMAX >= 14
@@ -188,12 +188,12 @@ optional-constant NL_TEXTMAX
optional-constant NZERO >= 20
# endif
#endif
-#if defined XPG4 || defined UNIX98
+#if defined XPG4 || defined XPG42 || defined UNIX98
optional-constant TMP_MAX >= 10000
#endif
allow *_MAX
-#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
allow *_MIN
#endif
allow *_t
diff --git a/conform/data/locale.h-data b/conform/data/locale.h-data
index adcd25f656..266264ac6d 100644
--- a/conform/data/locale.h-data
+++ b/conform/data/locale.h-data
@@ -17,7 +17,7 @@ element {struct lconv} char p_cs_precedes
element {struct lconv} char p_sep_by_space
element {struct lconv} char p_sign_posn
element {struct lconv} {char*} thousands_sep
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
element {struct lconv} char int_n_cs_precedes
element {struct lconv} char int_n_sep_by_space
element {struct lconv} char int_n_sign_posn
diff --git a/conform/data/math.h-data b/conform/data/math.h-data
index 71533339ce..0c50755792 100644
--- a/conform/data/math.h-data
+++ b/conform/data/math.h-data
@@ -1,7 +1,7 @@
macro-constant HUGE_VAL {double}
#if !defined ISO && !defined POSIX
-# if !defined XPG3 && !defined XPG4 && !defined UNIX98
+# if !defined XPG4 && !defined XPG42 && !defined UNIX98
macro fpclassify
macro isfinite
macro isinf
@@ -17,7 +17,7 @@ macro isunordered
type float_t
type double_t
# endif
-# if defined XPG3 || defined XPG4 || defined UNIX98
+# if defined XPG4 || defined XPG42 || defined UNIX98
function int isnan (double)
# endif
@@ -38,7 +38,7 @@ constant M_SQRT1_2
constant MAXFLOAT
# endif
-# if !defined XPG3 && !defined XPG4 && !defined UNIX98
+# if !defined XPG4 && !defined XPG42 && !defined UNIX98
macro-constant HUGE_VALF {float}
macro-constant HUGE_VALL {long double}
macro-constant INFINITY {float}
@@ -69,13 +69,13 @@ function double asin (double)
function double atan (double)
function double atan2 (double, double)
function double ceil (double)
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function double copysign (double, double)
#endif
function double cos (double)
function double cosh (double)
function double exp (double)
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function double exp2 (double)
#endif
function double fabs (double)
@@ -85,7 +85,7 @@ function double frexp (double, int*)
function double ldexp (double, int)
function double log (double)
function double log10 (double)
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function double log2 (double)
#endif
function double modf (double, double*)
@@ -99,7 +99,7 @@ function double tanh (double)
function double erf (double)
function double erfc (double)
#endif
-#if defined XPG3 || defined XPG4 || defined UNIX98
+#if defined XPG4 || defined XPG42 || defined UNIX98
function double gamma (double)
#endif
#if !defined ISO && !defined POSIX
@@ -110,7 +110,7 @@ function double j1 (double)
function double jn (int, double)
# endif
function double lgamma (double)
-# if !defined XPG3 && !defined XPG4 && !defined UNIX98
+# if !defined XPG4 && !defined XPG42 && !defined UNIX98
function double tgamma (double)
# endif
# if !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
@@ -118,7 +118,7 @@ function double y0 (double)
function double y1 (double)
function double yn (int, double)
# endif
-# if !defined XPG3
+# if !defined XPG4
function double acosh (double)
function double asinh (double)
function double atanh (double)
@@ -128,13 +128,13 @@ function int ilogb (double)
function double log1p (double)
function double logb (double)
function double nextafter (double, double)
-# if !defined XPG4 && !defined UNIX98
+# if !defined XPG42 && !defined UNIX98
function double nexttoward (double, long double)
function double nearbyint (double)
# endif
function double remainder (double, double)
function double rint (double)
-# if !defined XPG4 && !defined UNIX98
+# if !defined XPG42 && !defined UNIX98
function double round (double)
function double trunc (double)
function long lrint (double)
@@ -143,10 +143,10 @@ function long lround (double)
function {long long} llround (double)
function double remquo (double, double, int*)
# endif
-# if defined XPG4 || defined UNIX98 || defined XOPEN2K
+# if defined XPG42 || defined UNIX98 || defined XOPEN2K
function double scalb (double, double)
# endif
-# if !defined XPG4 && !defined UNIX98
+# if !defined XPG42 && !defined UNIX98
function double scalbn (double, int)
function double scalbln (double, long)
function double fdim (double, double)
@@ -163,7 +163,7 @@ allow signgam
# endif
#endif
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function float acosf (float)
function float asinf (float)
function float atanf (float)
@@ -330,6 +330,6 @@ allow tanhl
#if !defined ISO && !defined ISO99 && !defined ISO11
allow *_t
#endif
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
allow FP_[ABCDEFGHIJKLMNOPQRSTUVWXYZ]*
#endif
diff --git a/conform/data/mqueue.h-data b/conform/data/mqueue.h-data
index 76652ce661..42ccd8551e 100644
--- a/conform/data/mqueue.h-data
+++ b/conform/data/mqueue.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3 && !defined XPG4
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42
// should test for not an array type.
type mqd_t
@@ -10,10 +10,11 @@ element {struct sigevent} {void(*} sigev_notify_function )(union sigval)
element {struct sigevent} {pthread_attr_t*} sigev_notify_attributes
type {struct mq_attr}
-element {struct mq_attr} long mq_flags
-element {struct mq_attr} long mq_maxmsg
-element {struct mq_attr} long mq_msgsize
-element {struct mq_attr} long mq_curmsgs
+// Bug 21279: mq_attr elements have wrong type.
+xfail[x86_64-x32-linux]-element {struct mq_attr} long mq_flags
+xfail[x86_64-x32-linux]-element {struct mq_attr} long mq_maxmsg
+xfail[x86_64-x32-linux]-element {struct mq_attr} long mq_msgsize
+xfail[x86_64-x32-linux]-element {struct mq_attr} long mq_curmsgs
function int mq_close (mqd_t)
function int mq_getattr (mqd_t, struct mq_attr*)
diff --git a/conform/data/ndbm.h-data b/conform/data/ndbm.h-data
index 43c6a38d79..2ee7a59253 100644
--- a/conform/data/ndbm.h-data
+++ b/conform/data/ndbm.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4
type datum
element datum {void*} dptr
element datum size_t dsize
diff --git a/conform/data/net/if.h-data b/conform/data/net/if.h-data
index fd8509567f..8a4d89c067 100644
--- a/conform/data/net/if.h-data
+++ b/conform/data/net/if.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
type {struct if_nameindex}
element {struct if_nameindex} {unsigned int} if_index
diff --git a/conform/data/netdb.h-data b/conform/data/netdb.h-data
index 63a42ae179..c6d8b70a0d 100644
--- a/conform/data/netdb.h-data
+++ b/conform/data/netdb.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4
optional-type in_port_t
optional-type in_addr_t
@@ -15,7 +15,8 @@ type {struct netent}
element {struct netent} {char*} n_name
element {struct netent} {char**} n_aliases
element {struct netent} int n_addrtype
-element {struct netent} uint32_t n_net
+// Bug 21260: n_net has wrong type.
+xfail[alpha-linux]-element {struct netent} uint32_t n_net
type uint32_t
@@ -44,7 +45,7 @@ macro NO_RECOVERY
macro TRY_AGAIN
#endif
-#if !defined XPG4 && !defined UNIX98
+#if !defined XPG42 && !defined UNIX98
type {struct addrinfo}
element {struct addrinfo} int ai_flags
element {struct addrinfo} int ai_family
@@ -85,7 +86,7 @@ function void endhostent (void)
function void endnetent (void)
function void endprotoent (void)
function void endservent (void)
-#if !defined XPG4 && !defined UNIX98
+#if !defined XPG42 && !defined UNIX98
function void freeaddrinfo (struct addrinfo*)
function {const char*} gai_strerror (int)
function int getaddrinfo (const char*, const char*, const struct addrinfo*, struct addrinfo**)
@@ -93,7 +94,7 @@ function int getaddrinfo (const char*, const char*, const struct addrinfo*, stru
function {struct hostent*} gethostbyaddr (const void*, socklen_t, int)
function {struct hostent*} gethostbyname (const char*)
function {struct hostent*} gethostent (void)
-#if !defined XPG4 && !defined UNIX98
+#if !defined XPG42 && !defined UNIX98
function int getnameinfo (const struct sockaddr*, socklen_t, char*, socklen_t, char*, socklen_t, int)
#endif
function {struct netent*} getnetbyaddr (uint32_t, int)
diff --git a/conform/data/netinet/in.h-data b/conform/data/netinet/in.h-data
index 928432651b..ccc74db608 100644
--- a/conform/data/netinet/in.h-data
+++ b/conform/data/netinet/in.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4
type in_port_t
type in_addr_t
@@ -92,4 +92,6 @@ allow IPV6_*
allow IPPORT_*
allow IPPROTO_*
allow SOCK_*
+allow sin_*
+allow sin6_*
#endif
diff --git a/conform/data/poll.h-data b/conform/data/poll.h-data
index 84777dffa1..f7ebb91715 100644
--- a/conform/data/poll.h-data
+++ b/conform/data/poll.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4
type {struct pollfd}
element {struct pollfd} int fd
element {struct pollfd} {short int} events
diff --git a/conform/data/pthread.h-data b/conform/data/pthread.h-data
index c1e32c8d01..6b10499458 100644
--- a/conform/data/pthread.h-data
+++ b/conform/data/pthread.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3 && !defined XPG4
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42
constant PTHREAD_CANCEL_ASYNCHRONOUS
constant PTHREAD_CANCEL_ENABLE
constant PTHREAD_CANCEL_DEFERRED
diff --git a/conform/data/pwd.h-data b/conform/data/pwd.h-data
index 64d617fdcf..e86433d6a7 100644
--- a/conform/data/pwd.h-data
+++ b/conform/data/pwd.h-data
@@ -23,7 +23,7 @@ function {struct passwd*} getpwnam (const char*)
function {struct passwd*} getpwuid (uid_t)
function int getpwnam_r (const char*, struct passwd*, char*, size_t, struct passwd**)
function int getpwuid_r (uid_t, struct passwd*, char*, size_t, struct passwd**)
-# if !defined POSIX && !defined POSIX2008
+# if !defined XPG4 && !defined POSIX && !defined POSIX2008
function void endpwent (void)
function {struct passwd*} getpwent (void)
function void setpwent (void)
diff --git a/conform/data/sched.h-data b/conform/data/sched.h-data
index 610406d96b..63e5eb2567 100644
--- a/conform/data/sched.h-data
+++ b/conform/data/sched.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3 && !defined XPG4
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42
# if defined POSIX || defined UNIX98
# include "time.h-data"
# else
diff --git a/conform/data/search.h-data b/conform/data/search.h-data
index 3abbc6690f..e99f7e6c1d 100644
--- a/conform/data/search.h-data
+++ b/conform/data/search.h-data
@@ -17,10 +17,14 @@ constant leaf
function int hcreate (size_t)
function void hdestroy (void)
function {ENTRY*} hsearch (ENTRY, ACTION)
+#ifndef XPG4
function void insque (void*, void*)
+#endif
function {void*} lfind (const void*, const void*, size_t*, size_t, int (*)(const void*, const void*))
function {void*} lsearch (const void*, void*, size_t*, size_t, int (*)(const void*, const void*))
+#ifndef XPG4
function void remque (void*)
+#endif
function {void*} tdelete (const void*, void**, int(*)(const void*, const void*))
function {void*} tfind (const void*, void*const*, int(*)(const void*, const void*))
function {void*} tsearch (const void*, void**, int(*)(const void*, const void*))
diff --git a/conform/data/semaphore.h-data b/conform/data/semaphore.h-data
index 8c3497baa6..066c2f721b 100644
--- a/conform/data/semaphore.h-data
+++ b/conform/data/semaphore.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3 && !defined XPG4
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined XPG42
type sem_t
constant SEM_FAILED
@@ -20,7 +20,9 @@ allow-header fcntl.h
# if !defined POSIX2008 && !defined XOPEN2K8
allow-header sys/types.h
# endif
-# if !defined POSIX && !defined UNIX98 && !defined XOPEN2K
+// Consider addition of this permission in POSIX.1:2008 as a bug fix,
+// so allow for POSIX.1:2001 as well since that includes sem_timedwait.
+# if !defined POSIX && !defined UNIX98
allow-header time.h
# endif
diff --git a/conform/data/signal.h-data b/conform/data/signal.h-data
index 7584865f12..11e54adb04 100644
--- a/conform/data/signal.h-data
+++ b/conform/data/signal.h-data
@@ -24,16 +24,19 @@ type mcontext_t
type ucontext_t
element ucontext_t {ucontext_t*} uc_link
-element ucontext_t sigset_t uc_sigmask
+// Bug 21634: uc_sigmask has wrong type.
+xfail[ia64-linux]-element ucontext_t sigset_t uc_sigmask
element ucontext_t stack_t uc_stack
-element ucontext_t mcontext_t uc_mcontext
+// Bug 21635: uc_mcontext has wrong type.
+xfail[powerpc32-linux]-element ucontext_t mcontext_t uc_mcontext
type {struct timespec}
element {struct timespec} __time_t tv_sec
-element {struct timespec} long tv_nsec
+// Bug 16437: tv_nsec has wrong type.
+xfail[x86_64-x32-linux]-element {struct timespec} long tv_nsec
#endif
-#if defined POSIX || defined UNIX98 || defined XOPEN2K8 || defined POSIX2008
+#if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
element {union sigval} int sival_int
element {union sigval} {void*} sival_ptr
@@ -80,18 +83,18 @@ macro-int-constant SIGSTOP {int} > 0
macro-int-constant SIGTSTP {int} > 0
macro-int-constant SIGTTIN {int} > 0
macro-int-constant SIGTTOU {int} > 0
-# ifndef XPG3
+# ifndef XPG4
macro-int-constant SIGBUS {int} > 0
# endif
-# if !defined POSIX && !defined XPG3
+# if !defined POSIX && !defined XPG4
macro-int-constant SIGPOLL {int} > 0
macro-int-constant SIGPROF {int} > 0
macro-int-constant SIGSYS {int} > 0
# endif
-# if !defined POSIX && !defined XPG3 && !defined POSIX2008
+# if !defined POSIX && !defined XPG4 && !defined POSIX2008
macro-int-constant SIGTRAP {int} > 0
# endif
-# if !defined POSIX && !defined XPG3
+# if !defined POSIX && !defined XPG4
macro-int-constant SIGURG {int} > 0
macro-int-constant SIGVTALRM {int} > 0
macro-int-constant SIGXCPU {int} > 0
@@ -103,36 +106,44 @@ type {struct sigaction}
element {struct sigaction} {void(*} sa_handler )(int)
element {struct sigaction} sigset_t sa_mask
element {struct sigaction} int sa_flags
+# ifndef XPG4
element {struct sigaction} {void(*} sa_sigaction )(int, siginfo_t*, void*)
+# endif
constant SA_NOCLDSTOP
-constant SA_SIGINFO
+# ifndef XPG4
+// Bug 23089: hurd: missing siginfo support.
+xfail[i386-gnu]-constant SA_SIGINFO
+# endif
constant SIG_BLOCK
constant SIG_UNBLOCK
constant SIG_SETMASK
-# if !defined POSIX && !defined POSIX2008
+# if !defined XPG4 && !defined POSIX && !defined POSIX2008
constant SA_ONSTACK
# endif
-# if !defined POSIX
+# if !defined XPG4 && !defined POSIX
constant SA_RESETHAND
constant SA_RESTART
-constant SA_NOCLDWAIT
+// Bug 23090: hurd: missing SA_NOCLDWAIT support.
+xfail[i386-gnu]-constant SA_NOCLDWAIT
constant SA_NODEFER
# endif
-# if !defined POSIX && !defined POSIX2008
+# if !defined XPG4 && !defined POSIX && !defined POSIX2008
constant SS_ONSTACK
constant SS_DISABLE
constant MINSIGSTKSZ
constant SIGSTKSZ
# endif
-# if !defined POSIX
+# if !defined XPG4 && !defined POSIX
type ucontext_t
element ucontext_t {ucontext_t*} uc_link
-element ucontext_t sigset_t uc_sigmask
+// Bug 21634: uc_sigmask has wrong type.
+xfail[ia64-linux]-element ucontext_t sigset_t uc_sigmask
element ucontext_t stack_t uc_stack
-element ucontext_t mcontext_t uc_mcontext
+// Bug 21635: uc_mcontext has wrong type.
+xfail[powerpc32-linux]-element ucontext_t mcontext_t uc_mcontext
type stack_t
@@ -140,13 +151,15 @@ element stack_t {void*} ss_sp
element stack_t size_t ss_size
element stack_t int ss_flags
+# if !defined XOPEN2K8 && !defined POSIX2008
type {struct sigstack}
element {struct sigstack} int ss_onstack
element {struct sigstack} {void*} ss_sp
+# endif
# endif
-# ifndef XPG3
+# ifndef XPG4
type siginfo_t
element siginfo_t int si_signo
@@ -161,12 +174,12 @@ element siginfo_t {void*} si_addr
element siginfo_t int si_status
element siginfo_t long si_band
# endif
-# ifndef XPG4
+# ifndef XPG42
element siginfo_t {union sigval} si_value
# endif
# endif
-# if !defined POSIX && !defined XPG3
+# if !defined POSIX && !defined XPG4
constant ILL_ILLOPC
constant ILL_ILLOPN
constant ILL_ILLADR
@@ -201,62 +214,64 @@ constant POLL_ERR
constant POLL_PRI
constant POLL_HUP
# endif
-# if !defined POSIX && !defined XPG3 && !defined POSIX2008
+# if !defined POSIX && !defined XPG4 && !defined POSIX2008
constant TRAP_BRKPT
constant TRAP_TRACE
# endif
+# if !defined XPG4 && !defined XPG42
constant SI_USER
constant SI_QUEUE
constant SI_TIMER
constant SI_ASYNCIO
constant SI_MESGQ
+# endif
-# if !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008
+# if !defined XPG4 && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008
function void (*bsd_signal (int, void(*)(int)))(int)
# endif
function int kill (pid_t, int)
-# if !defined POSIX && !defined POSIX2008
+# if !defined XPG4 && !defined POSIX && !defined POSIX2008
function int killpg (pid_t, int)
# endif
-# if !defined XPG3 && !defined XPG4
+# if !defined XPG4 && !defined XPG42
function int pthread_kill (pthread_t, int)
function int pthread_sigmask (int, const sigset_t*, sigset_t*)
# endif
function int sigaction (int, const struct sigaction*, struct sigaction*)
function int sigaddset (sigset_t*, int)
-# if !defined POSIX && !defined POSIX2008
+# if !defined XPG4 && !defined POSIX && !defined POSIX2008
function int sigaltstack (const stack_t*, stack_t*)
# endif
function int sigdelset (sigset_t*, int)
function int sigemptyset (sigset_t*)
function int sigfillset (sigset_t*)
-# if !defined POSIX && !defined POSIX2008
+# if !defined XPG4 && !defined POSIX && !defined POSIX2008
function int sighold (int)
function int sigignore (int)
function int siginterrupt (int, int)
# endif
function int sigismember (const sigset_t*, int)
-#if !defined POSIX && !defined POSIX2008
+#if !defined XPG4 && !defined POSIX && !defined POSIX2008
function int sigpause (int)
# endif
function int sigpending (sigset_t*)
function int sigprocmask (int, const sigset_t*, sigset_t*)
-# if !defined XPG3 && !defined XPG4
+# if !defined XPG4 && !defined XPG42
function int sigqueue (pid_t, int, const union sigval)
# endif
-# if !defined POSIX && !defined POSIX2008
+# if !defined XPG4 && !defined POSIX && !defined POSIX2008
function int sigrelse (int)
function void (*sigset (int, void(*)(int)))(int)
# endif
-# if !defined POSIX
+# if defined XPG42 || defined UNIX98
function int sigstack (struct sigstack*, struct sigstack*)
# endif
function int sigsuspend (const sigset_t*)
-# if !defined XPG3 && !defined XPG4
+# if !defined XPG4 && !defined XPG42
function int sigtimedwait (const sigset_t*, siginfo_t*, const struct timespec*)
# endif
+# if !defined XPG4 && !defined XPG42
function int sigwait (const sigset_t*, int*)
-# if !defined XPG3 && !defined XPG4
function int sigwaitinfo (const sigset_t*, siginfo_t*)
# endif
# if defined XOPEN2K8 || defined POSIX2008
@@ -268,19 +283,19 @@ function void psignal (int, const char*)
// poorfnmatch implementation doesn't grok the right form.
allow sa_*
allow SA_*
-# ifndef XPG3
+# ifndef XPG4
allow si_*
allow SI_*
# endif
-# if !defined XPG3 && !defined XPG4
+# if !defined XPG4 && !defined XPG42
allow sigev_*
allow SIGEV_*
allow sival_*
# endif
-# if !defined POSIX && !defined XPG3 && !defined XPG4
+# if !defined POSIX && !defined XPG4 && !defined XPG42
allow uc_*
# endif
-# if !defined POSIX && !defined XPG3
+# if !defined POSIX && !defined XPG4
allow BUS_*
allow CLD_*
allow FPE_*
@@ -288,7 +303,7 @@ allow ILL_*
allow POLL_*
allow SEGV_*
# endif
-# if !defined POSIX && !defined XPG3 && !defined POSIX2008
+# if !defined POSIX && !defined XPG4 && !defined POSIX2008
allow SS_*
allow SV_*
allow TRAP_*
diff --git a/conform/data/spawn.h-data b/conform/data/spawn.h-data
index fb206f7ecf..de4aaa7fe2 100644
--- a/conform/data/spawn.h-data
+++ b/conform/data/spawn.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
type posix_spawnattr_t
type posix_spawn_file_actions_t
# if defined XOPEN2K8 || defined POSIX2008
diff --git a/conform/data/stdarg.h-data b/conform/data/stdarg.h-data
index 2c87a3b56d..53addb91fa 100644
--- a/conform/data/stdarg.h-data
+++ b/conform/data/stdarg.h-data
@@ -5,7 +5,7 @@ macro va_start
macro va_arg
macro va_end
-#if defined ISO99 || defined ISO11 || defined POSIX2008 || defined XOPEN2K8
+#if defined ISO99 || defined ISO11 || defined XOPEN2K || defined POSIX2008 || defined XOPEN2K8
macro va_copy
#endif
diff --git a/conform/data/stdbool.h-data b/conform/data/stdbool.h-data
index 9ef218c5e2..a030e9cffe 100644
--- a/conform/data/stdbool.h-data
+++ b/conform/data/stdbool.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
macro bool
macro-int-constant true {int} == 1
macro-int-constant false {int} == 0
diff --git a/conform/data/stdint.h-data b/conform/data/stdint.h-data
index f6689513cc..4e84e17fb8 100644
--- a/conform/data/stdint.h-data
+++ b/conform/data/stdint.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
// The requirements for some types and corresponding macros are from POSIX.
type int8_t
type int16_t
diff --git a/conform/data/stdio.h-data b/conform/data/stdio.h-data
index 9089180a10..3ef2460661 100644
--- a/conform/data/stdio.h-data
+++ b/conform/data/stdio.h-data
@@ -41,7 +41,7 @@ type fpos_t
#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX
type va_list
#else
-#define va_list _G_va_list
+#define va_list __gnuc_va_list
#endif
type size_t
#if defined XOPEN2K8 || defined POSIX2008
@@ -52,7 +52,7 @@ type ssize_t
function void clearerr (FILE*)
#if !defined ISO && !defined ISO99 && !defined ISO11
function {char*} ctermid (char*)
-# if defined XPG3 || defined XPG4 || defined UNIX98
+# if defined XPG4 || defined XPG42 || defined UNIX98
function {char*} cuserid (char*)
# endif
#endif
@@ -60,7 +60,7 @@ function {char*} cuserid (char*)
function int dprintf (int, const char*, ...)
#endif
function int fclose (FILE*)
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3 && !defined XPG4
+#if !defined ISO && !defined ISO99 && !defined ISO11
function {FILE*} fdopen (int, const char*)
#endif
function int feof (FILE*)
@@ -72,7 +72,7 @@ function {char*} fgets (char*, int, FILE*)
#if !defined ISO && !defined ISO99 && !defined ISO11
function int fileno (FILE*)
#endif
-#if defined POSIX || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
+#if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
function void flockfile (FILE*)
#endif
#if defined XOPEN2K8 || defined POSIX2008
@@ -86,22 +86,22 @@ function size_t fread (void*, size_t, size_t, FILE*)
function {FILE*} freopen (const char*, const char*, FILE*)
function int fscanf (FILE*, const char*, ...)
function int fseek (FILE*, long int, int)
-#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
+#if defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
function int fseeko (FILE*, off_t, int)
#endif
function int fsetpos (FILE*, const fpos_t*)
function {long int} ftell (FILE*)
-#if defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
+#if defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
function off_t ftello (FILE*)
#endif
-#if defined POSIX || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
+#if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
function int ftrylockfile (FILE*)
function void funlockfile (FILE*)
#endif
function size_t fwrite (const void*, size_t, size_t, FILE*)
function int getc (FILE*)
function int getchar (void)
-#if defined POSIX || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
+#if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
function int getc_unlocked (FILE*)
function int getchar_unlocked (void)
#endif
@@ -109,13 +109,13 @@ function int getchar_unlocked (void)
function ssize_t getdelim (char**, size_t*, int, FILE*)
function ssize_t getline (char**, size_t*, FILE*)
#endif
-#if defined XPG3 || defined XPG4 || defined UNIX98
+#if defined XPG4 || defined XPG42 || defined UNIX98
function int getopt (int, char *const[], const char *)
#endif
#if !defined ISO11
function {char*} gets (char*)
#endif
-#if defined XPG3 || defined XPG4 || defined UNIX98
+#if defined XPG4 || defined XPG42 || defined UNIX98
function int getw (FILE*)
#endif
#if defined XOPEN2K8 || defined POSIX2008
@@ -131,12 +131,12 @@ function {FILE*} popen (const char*, const char*)
function int printf (const char*, ...)
function int putc (int, FILE*)
function int putchar (int)
-#if defined POSIX || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
+#if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
function int putc_unlocked (int, FILE*)
function int putchar_unlocked (int)
#endif
function int puts (const char*)
-#if defined XPG3 || defined XPG4 || defined UNIX98
+#if defined XPG4 || defined XPG42 || defined UNIX98
function int putw (int, FILE*)
#endif
function int remove (const char*)
@@ -148,12 +148,12 @@ function void rewind (FILE*)
function int scanf (const char*, ...)
function void setbuf (FILE*, char*)
function int setvbuf (FILE*, char*, int, size_t)
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42
function int snprintf (char*, size_t, const char*, ...)
#endif
function int sprintf (char *, const char *, ...)
function int sscanf (const char*, const char*, ...)
-#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8
+#if defined XPG4 || defined XPG42 || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8
function {char*} tempnam (const char*, const char*)
#endif
function {FILE*} tmpfile (void)
@@ -163,18 +163,18 @@ function int ungetc (int, FILE*)
function int vdprintf (int, const char*, va_list)
#endif
function int vfprintf (FILE*, const char*, va_list)
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function int vfscanf (FILE*, const char*, va_list)
#endif
function int vprintf (const char*, va_list)
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function int vscanf (const char*, va_list)
#endif
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42
function int vsnprintf (char*, size_t, const char*, va_list)
#endif
function int vsprintf (char*, const char*, va_list)
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function int vsscanf (const char*, const char*, va_list)
#endif
diff --git a/conform/data/stdlib.h-data b/conform/data/stdlib.h-data
index abe296a2ab..6913828196 100644
--- a/conform/data/stdlib.h-data
+++ b/conform/data/stdlib.h-data
@@ -32,10 +32,10 @@ macro WSTOPSIG
macro WTERMSIG
#endif
-#if !defined ISO && !defined XPG3 && !defined XPG4 && !defined UNIX98 && !defined POSIX
+#if !defined ISO && !defined XPG4 && !defined XPG42 && !defined UNIX98 && !defined POSIX
function void _Exit (int)
#endif
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008
function long a64l (const char*)
#endif
function void abort (void)
@@ -50,7 +50,7 @@ function int at_quick_exit (void (*) (void))
function double atof (const char*)
function int atoi (const char*)
function {long int} atol (const char*)
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function {long long} atoll (const char*)
#endif
function {void*} bsearch (const void*, const void*, size_t, size_t, int(*)(const void*, const void*))
@@ -59,28 +59,32 @@ function div_t div (int, int)
#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
function double drand48 (void)
#endif
-#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K
+#if defined XPG42 || defined UNIX98 || defined XOPEN2K
function {char*} ecvt (double, int, int*, int*)
#endif
#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
function double erand48 (unsigned short int[3])
#endif
function void exit (int)
-#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K
+#if defined XPG42 || defined UNIX98 || defined XOPEN2K
function {char*} fcvt (double, int, int*, int*)
#endif
function void free (void*)
-#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K
+#if defined XPG42 || defined UNIX98 || defined XOPEN2K
function {char*} gcvt (double, int, char*)
#endif
function {char*} getenv (const char*)
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX
function int getsubopt (char**, char *const*, char**)
#endif
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008
function int grantpt (int)
function {char*} initstate (unsigned int, char*, size_t)
+#endif
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
function {long int} jrand48 (unsigned short int[3])
+#endif
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008
function {char*} l64a (long)
#endif
function {long int} labs (long int)
@@ -88,7 +92,7 @@ function {long int} labs (long int)
function void lcong48 (unsigned short int[7])
#endif
function ldiv_t ldiv (long int, long int)
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function {long long} llabs (long long)
function lldiv_t lldiv (long long, long long)
#endif
@@ -102,10 +106,10 @@ function int mbtowc (wchar_t*, const char*, size_t)
#if defined XOPEN2K8 || defined POSIX2008
function {char*} mkdtemp (char*)
#endif
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined XOPEN2K8 && !defined POSIX2008
function {char*} mktemp (char*)
#endif
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX
function int mkstemp (char*)
#endif
#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
@@ -118,8 +122,10 @@ function int posix_memalign (void**, size_t, size_t)
#if defined XOPEN2K || defined XOPEN2K8
function int posix_openpt (int)
#endif
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008
function {char*} ptsname (int)
+#endif
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
function int putenv (char*)
#endif
function void qsort (void*, size_t, size_t, int(*)(const void*, const void*))
@@ -130,48 +136,51 @@ function int rand (void)
#if defined POSIX || defined UNIX98 || defined XOPEN2K || defined XOPEN2K8 || defined POSIX2008
function int rand_r (unsigned int*)
#endif
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008
function long random (void)
#endif
function {void*} realloc (void*, size_t)
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008
function {char*} realpath (const char*, char*)
+#endif
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
function {unsigned short int*} seed48 (unsigned short int[3])
#endif
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function int setenv (const char*, const char*, int)
#endif
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
-function void setkey (const char*)
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008
function {char*} setstate (char*)
#endif
function void srand (unsigned int)
#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
function void srand48 (long int)
+#endif
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008
function void srandom (unsigned)
#endif
function double strtod (const char*, char**)
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function float strtof (const char*, char**)
function {long double} strtold (const char*, char**)
#endif
function {long int} strtol (const char*, char**, int)
function {unsigned long int} strtoul (const char*, char**, int)
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function {long long int} strtoll (const char*, char**, int)
function {unsigned long long int} strtoull (const char*, char**, int)
#endif
function int system (const char*)
-#if defined XPG3 || defined XPG4 || defined UNIX98
+#if defined XPG42 || defined UNIX98
function int ttyslot (void)
#endif
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008
function int unlockpt (int)
#endif
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function int unsetenv (const char*)
#endif
-#if defined XPG3 || defined XPG4 || defined UNIX98
+#if defined XPG42 || defined UNIX98
function {void*} valloc (size_t)
#endif
function size_t wcstombs (char*, const wchar_t*, size_t)
diff --git a/conform/data/string.h-data b/conform/data/string.h-data
index cc3b1c9732..e06f941498 100644
--- a/conform/data/string.h-data
+++ b/conform/data/string.h-data
@@ -27,7 +27,7 @@ function int strcoll_l (const char*, const char*, locale_t)
#endif
function {char*} strcpy (char*, const char*)
function size_t strcspn (const char*, const char*)
-#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined POSIX && !defined POSIX2008
+#if !defined ISO && !defined ISO99 & !defined ISO11 && !defined XPG4 && !defined POSIX && !defined POSIX2008
function {char*} strdup (const char*)
#endif
function {char*} strerror (int)
diff --git a/conform/data/strings.h-data b/conform/data/strings.h-data
index d22609a0f8..13827ebed9 100644
--- a/conform/data/strings.h-data
+++ b/conform/data/strings.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4
# if !defined XOPEN2K8 && !defined POSIX2008
function int bcmp (const void*, const void*, size_t)
function void bcopy (const void*, void*, size_t)
diff --git a/conform/data/stropts.h-data b/conform/data/stropts.h-data
index e43dac8c9e..c4b1343411 100644
--- a/conform/data/stropts.h-data
+++ b/conform/data/stropts.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4
type {struct bandinfo}
element {struct bandinfo} {unsigned char} bi_pri
diff --git a/conform/data/sys/ipc.h-data b/conform/data/sys/ipc.h-data
index 70dc3f6fe6..09e8f68f8e 100644
--- a/conform/data/sys/ipc.h-data
+++ b/conform/data/sys/ipc.h-data
@@ -1,10 +1,11 @@
#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008
type {struct ipc_perm}
-element {struct ipc_perm} uid_t uid
-element {struct ipc_perm} gid_t gid
-element {struct ipc_perm} uid_t cuid
-element {struct ipc_perm} gid_t cgid
+// Bug 23082: uid/gid/cuid/cgid/mode have type unsigned short instead of uid_t and mode_t.
+xfail[i386-gnu]-element {struct ipc_perm} uid_t uid
+xfail[i386-gnu]-element {struct ipc_perm} gid_t gid
+xfail[i386-gnu]-element {struct ipc_perm} uid_t cuid
+xfail[i386-gnu]-element {struct ipc_perm} gid_t cgid
// Bug 18231: wrong type for mode member.
xfail-element {struct ipc_perm} mode_t mode
diff --git a/conform/data/sys/mman.h-data b/conform/data/sys/mman.h-data
index 3a88684bc5..a74388338e 100644
--- a/conform/data/sys/mman.h-data
+++ b/conform/data/sys/mman.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined XPG4
constant PROT_READ
constant PROT_WRITE
constant PROT_EXEC
@@ -17,7 +17,7 @@ constant MCL_FUTURE
constant MAP_FAILED
-# if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+# if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
constant POSIX_MADV_NORMAL
constant POSIX_MADV_SEQUENTIAL
constant POSIX_MADV_RANDOM
diff --git a/conform/data/sys/msg.h-data b/conform/data/sys/msg.h-data
index a8290cab52..f5e9f1c82a 100644
--- a/conform/data/sys/msg.h-data
+++ b/conform/data/sys/msg.h-data
@@ -9,8 +9,9 @@ constant MSG_NOERROR
element {struct msqid_ds} {struct ipc_perm} msg_perm
element {struct msqid_ds} msgqnum_t msg_qnum
element {struct msqid_ds} msglen_t msg_qbytes
-element {struct msqid_ds} pid_t msg_lspid
-element {struct msqid_ds} pid_t msg_lrpid
+// Bug 23083: msg_lspid/msg_lrpid have type unsigned short instead of pid_t.
+xfail[i386-gnu]-element {struct msqid_ds} pid_t msg_lspid
+xfail[i386-gnu]-element {struct msqid_ds} pid_t msg_lrpid
element {struct msqid_ds} time_t msg_stime
element {struct msqid_ds} time_t msg_rtime
element {struct msqid_ds} time_t msg_ctime
diff --git a/conform/data/sys/resource.h-data b/conform/data/sys/resource.h-data
index 5c46dea301..cedbee1a40 100644
--- a/conform/data/sys/resource.h-data
+++ b/conform/data/sys/resource.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4
constant PRIO_PROCESS
constant PRIO_PGRP
constant PRIO_USER
diff --git a/conform/data/sys/select.h-data b/conform/data/sys/select.h-data
index d414ec4624..44d63ebd2d 100644
--- a/conform/data/sys/select.h-data
+++ b/conform/data/sys/select.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
type time_t
type suseconds_t
@@ -10,10 +10,11 @@ type sigset_t
type {struct timespec}
element {struct timespec} time_t tv_sec
-element {struct timespec} long tv_nsec
+// Bug 16437: tv_nsec has wrong type.
+xfail[x86_64-x32-linux]-element {struct timespec} long tv_nsec
type fd_set
-#if defined XPG3 || defined XPG4 || defined UNIX98
+#if defined XPG4 || defined XPG42 || defined UNIX98
element fd_set long fds_bits []
#endif
diff --git a/conform/data/sys/shm.h-data b/conform/data/sys/shm.h-data
index a006cdbb92..778b194f50 100644
--- a/conform/data/sys/shm.h-data
+++ b/conform/data/sys/shm.h-data
@@ -9,8 +9,9 @@ type {struct shmid_ds}
element {struct shmid_ds} {struct ipc_perm} shm_perm
element {struct shmid_ds} size_t shm_segsz
-element {struct shmid_ds} pid_t shm_lpid
-element {struct shmid_ds} pid_t shm_cpid
+// Bug 23085: shm_lpid/shm_cpid have type unsigned short instead of pid_t
+xfail[i386-gnu]-element {struct shmid_ds} pid_t shm_lpid
+xfail[i386-gnu]-element {struct shmid_ds} pid_t shm_cpid
element {struct shmid_ds} shmatt_t shm_nattch
element {struct shmid_ds} time_t shm_atime
element {struct shmid_ds} time_t shm_dtime
diff --git a/conform/data/sys/socket.h-data b/conform/data/sys/socket.h-data
index 442d4d288a..8796c57570 100644
--- a/conform/data/sys/socket.h-data
+++ b/conform/data/sys/socket.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4
type socklen_t
type sa_family_t
@@ -113,7 +113,7 @@ function int setsockopt (int, int, int, const void*, socklen_t)
function int shutdown (int, int)
function int socket (int, int, int)
function int socketpair (int, int, int, int[2])
-#if !defined XPG4 && !defined UNIX98
+#if !defined XPG42 && !defined UNIX98
function int sockatmark (int)
#endif
@@ -136,4 +136,5 @@ allow MSG_*
allow PF_*
allow SCM_*
allow SHUT_*
+allow *_t
#endif
diff --git a/conform/data/sys/stat.h-data b/conform/data/sys/stat.h-data
index f5b17a31ac..03be4814ec 100644
--- a/conform/data/sys/stat.h-data
+++ b/conform/data/sys/stat.h-data
@@ -1,6 +1,6 @@
#if !defined ISO && !defined ISO99 && !defined ISO11
-#if !defined POSIX && !defined POSIX2008 && !defined XPG3 && !defined XPG4
+#if !defined POSIX && !defined POSIX2008 && !defined XPG4 && !defined XPG42
type blkcnt_t
type blksize_t
#endif
@@ -26,14 +26,17 @@ type time_t
type {struct stat}
-element {struct stat} dev_t st_dev
+// Bug 17786: st_dev has wrong type.
+// Bug 23084: st_dev has type unsigned long long instead of dev_t (unsigned).
+xfail[mips-o32-linux|i386-gnu]-element {struct stat} dev_t st_dev
element {struct stat} ino_t st_ino
element {struct stat} mode_t st_mode
element {struct stat} nlink_t st_nlink
element {struct stat} uid_t st_uid
element {struct stat} gid_t st_gid
#if !defined POSIX && !defined POSIX2008
-element {struct stat} dev_t st_rdev
+// Bug 21278: st_rdev has wrong type.
+xfail[mips-o32-linux]-element {struct stat} dev_t st_rdev
#endif
element {struct stat} off_t st_size
element {struct stat} time_t st_atime
@@ -44,15 +47,24 @@ element {struct stat} {struct timespec} st_atim
element {struct stat} {struct timespec} st_mtim
element {struct stat} {struct timespec} st_ctim
#endif
-#if !defined POSIX && !defined POSIX2008
+#if !defined XPG4 && !defined POSIX && !defined POSIX2008
+# ifdef XPG42
+// The XPG42 use of "long" for these fields is not compatible with the
+// use of typedefs in future standards to support values outside the
+// range of "long".
+xfail-element {struct stat} long st_blksize
+xfail-element {struct stat} long st_blocks
+# else
element {struct stat} blksize_t st_blksize
element {struct stat} blkcnt_t st_blocks
+# endif
#endif
# if defined XOPEN2K8 || defined POSIX2008
type {struct timespec}
element {struct timespec} time_t tv_sec
-element {struct timespec} long tv_nsec
+// Bug 16437: tv_nsec has wrong type.
+xfail[x86_64-x32-linux]-element {struct timespec} long tv_nsec
# endif
#if !defined POSIX && !defined POSIX2008
@@ -62,8 +74,10 @@ constant S_IFCHR
constant S_IFIFO
constant S_IFREG
constant S_IFDIR
+# ifndef XPG4
constant S_IFLNK
constant S_IFSOCK
+# endif
#endif
constant S_IRWXU
@@ -80,7 +94,7 @@ constant S_IWOTH
constant S_IXOTH
constant S_ISUID
constant S_ISGID
-#if !defined POSIX && !defined POSIX2008
+#if !defined XPG4 && !defined POSIX && !defined POSIX2008
constant S_ISVTX
#endif
@@ -89,7 +103,7 @@ macro S_ISCHR
macro S_ISDIR
macro S_ISFIFO
macro S_ISREG
-#if !defined POSIX
+#if !defined XPG4 && !defined POSIX
macro S_ISLNK
macro S_ISSOCK
#endif
@@ -98,7 +112,7 @@ macro S_ISSOCK
optional-macro S_TYPEISMQ
optional-macro S_TYPEISSEM
optional-macro S_TYPEISSHM
-# if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+# if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
optional-macro S_TYPEISTMO
# endif
@@ -108,7 +122,9 @@ constant UTIME_OMIT
# endif
function int chmod (const char*, mode_t)
+# ifndef XPG4
function int fchmod (int, mode_t)
+# endif
# if defined XOPEN2K8 || defined POSIX2008
function int fchmodat (int, const char*, mode_t, int)
# endif
@@ -117,7 +133,7 @@ function int fstat (int, struct stat*)
function int fstatat (int, const char*, struct stat*, int)
function int futimens (int, const struct timespec[2])
# endif
-#if !defined POSIX
+#if !defined XPG4 && !defined POSIX
function int lstat (const char*, struct stat*)
#endif
function int mkdir (const char*, mode_t)
@@ -128,7 +144,7 @@ function int mkfifo (const char*, mode_t)
# if defined XOPEN2K8 || defined POSIX2008
function int mkfifoat (int, const char*, mode_t)
# endif
-# if !defined POSIX && !defined POSIX2008
+# if !defined XPG4 && !defined POSIX && !defined POSIX2008
function int mknod (const char*, mode_t, dev_t)
# endif
# ifdef XOPEN2K8
diff --git a/conform/data/sys/statvfs.h-data b/conform/data/sys/statvfs.h-data
index fa56fbeee1..2a74813e3d 100644
--- a/conform/data/sys/statvfs.h-data
+++ b/conform/data/sys/statvfs.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4
type {struct statvfs}
element {struct statvfs} {unsigned long} f_bsize
@@ -9,7 +9,8 @@ element {struct statvfs} fsblkcnt_t f_bavail
element {struct statvfs} fsfilcnt_t f_files
element {struct statvfs} fsfilcnt_t f_ffree
element {struct statvfs} fsfilcnt_t f_favail
-element {struct statvfs} {unsigned long} f_fsid
+// Bug 23086: f_fsid has type unsigned long long instead of unsigned long
+xfail[i386-gnu]-element {struct statvfs} {unsigned long} f_fsid
element {struct statvfs} {unsigned long} f_flag
element {struct statvfs} {unsigned long} f_namemax
diff --git a/conform/data/sys/time.h-data b/conform/data/sys/time.h-data
index 1d07bd6380..30523e1af4 100644
--- a/conform/data/sys/time.h-data
+++ b/conform/data/sys/time.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4
type {struct timeval}
element {struct timeval} time_t tv_sec
diff --git a/conform/data/sys/timeb.h-data b/conform/data/sys/timeb.h-data
index 08ae3c0932..9638f73c8f 100644
--- a/conform/data/sys/timeb.h-data
+++ b/conform/data/sys/timeb.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined POSIX2008 && !defined XOPEN2K8
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined POSIX2008 && !defined XOPEN2K8
type {struct timeb}
element {struct timeb} time_t time
diff --git a/conform/data/sys/types.h-data b/conform/data/sys/types.h-data
index 36c5efac63..cc28eb76d4 100644
--- a/conform/data/sys/types.h-data
+++ b/conform/data/sys/types.h-data
@@ -1,9 +1,13 @@
#if !defined ISO && !defined ISO99 && !defined ISO11
#if !defined POSIX
+# if !defined XPG4 && !defined XPG42
type blkcnt_t
type blksize_t
+# endif
type clock_t
+# if !defined XPG4 && !defined XPG42
type clockid_t
+# endif
#endif
type dev_t
# if !defined POSIX
@@ -22,7 +26,7 @@ type mode_t
type nlink_t
type off_t
type pid_t
-#if !defined XPG3 && !defined XPG4
+#if !defined XPG4 && !defined XPG42
type pthread_attr_t
#if !defined POSIX && !defined UNIX98
type pthread_barrier_t
diff --git a/conform/data/sys/uio.h-data b/conform/data/sys/uio.h-data
index 06cea074cd..b9fc66177c 100644
--- a/conform/data/sys/uio.h-data
+++ b/conform/data/sys/uio.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined POSIX2008
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined POSIX2008
type {struct iovec}
element {struct iovec} {void*} iov_base
diff --git a/conform/data/sys/un.h-data b/conform/data/sys/un.h-data
index 3bf7968683..08bf9bcfd7 100644
--- a/conform/data/sys/un.h-data
+++ b/conform/data/sys/un.h-data
@@ -1,8 +1,10 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4
type {struct sockaddr_un}
element {struct sockaddr_un} sa_family_t sun_family
element {struct sockaddr_un} char sun_path []
type sa_family_t
+
+allow sun_*
#endif
diff --git a/conform/data/sys/wait.h-data b/conform/data/sys/wait.h-data
index e0787e3b5d..ed3869b34f 100644
--- a/conform/data/sys/wait.h-data
+++ b/conform/data/sys/wait.h-data
@@ -7,8 +7,9 @@ constant WNOHANG
constant WUNTRACED
macro WEXITSTATUS
-# if !defined POSIX && !defined POSIX2008
-macro WIFCONTINUED
+# if !defined XPG4 && !defined POSIX && !defined POSIX2008
+// Bug 23091: hurd: missing waitid support.
+xfail[i386-gnu]-macro WIFCONTINUED
# endif
macro WIFEXITED
macro WIFSIGNALED
@@ -16,17 +17,18 @@ macro WIFSTOPPED
macro WSTOPSIG
macro WTERMSIG
-# ifndef POSIX
-constant WEXITED
-constant WSTOPPED
+// Bug 23091: hurd: missing waitid support.
+# if !defined XPG4 && !defined POSIX
+xfail[i386-gnu]-constant WEXITED
+xfail[i386-gnu]-constant WSTOPPED
# ifndef POSIX2008
-constant WCONTINUED
+xfail[i386-gnu]-constant WCONTINUED
# endif
constant WNOHANG
-constant WNOWAIT
+xfail[i386-gnu]-constant WNOWAIT
# endif
-#if !defined POSIX
+#if !defined XPG4 && !defined POSIX
type idtype_t
constant P_ALL
@@ -45,10 +47,12 @@ element siginfo_t uid_t si_uid
element siginfo_t {void*} si_addr
element siginfo_t int si_status
element siginfo_t long si_band
+# ifndef XPG42
element siginfo_t {union sigval} si_value
+# endif
#endif
-#if !defined POSIX && !defined XPG3 && !defined XOPEN2K8 && !defined POSIX2008
+#if !defined POSIX && !defined XPG4 && !defined XOPEN2K8 && !defined POSIX2008
type {struct rusage}
element {struct rusage} {struct timeval} ru_utime
@@ -60,15 +64,15 @@ type pid_t
#endif
function pid_t wait (int*)
-#if !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008
+#if !defined XPG4 && !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008
function pid_t wait3 (int*, int, struct rusage*)
#endif
-#if !defined POSIX
+#if !defined XPG4 && !defined POSIX
function int waitid (idtype_t, id_t, siginfo_t*, int)
#endif
function pid_t waitpid (pid_t, int*, int)
-#if !defined POSIX
+#if !defined XPG4 && !defined POSIX
allow-header signal.h
allow-header sys/resource.h
diff --git a/conform/data/syslog.h-data b/conform/data/syslog.h-data
index 05619cf489..6604d76d3e 100644
--- a/conform/data/syslog.h-data
+++ b/conform/data/syslog.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4
constant LOG_PID
constant LOG_CONS
constant LOG_NDELAY
diff --git a/conform/data/termios.h-data b/conform/data/termios.h-data
index de34bf5956..9aec2f5a17 100644
--- a/conform/data/termios.h-data
+++ b/conform/data/termios.h-data
@@ -144,7 +144,7 @@ function int tcdrain (int)
function int tcflow (int, int)
function int tcflush (int, int)
function int tcgetattr (int, struct termios*)
-#ifndef POSIX
+#if !defined POSIX && !defined XPG4
function pid_t tcgetsid (int)
#endif
function int tcsendbreak (int, int)
diff --git a/conform/data/tgmath.h-data b/conform/data/tgmath.h-data
index 5f72502191..d852adc3e4 100644
--- a/conform/data/tgmath.h-data
+++ b/conform/data/tgmath.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
#include "math.h-data"
#include "complex.h-data"
diff --git a/conform/data/threads.h-data b/conform/data/threads.h-data
new file mode 100644
index 0000000000..406e497726
--- /dev/null
+++ b/conform/data/threads.h-data
@@ -0,0 +1,57 @@
+#if defined ISO11
+
+macro ONCE_FLAG_INIT
+macro thread_local
+macro-int-constant TSS_DTOR_ITERATIONS
+
+constant thrd_success
+constant thrd_busy
+constant thrd_error
+constant thrd_nomem
+constant thrd_timedout
+
+constant mtx_plain
+constant mtx_recursive
+constant mtx_timed
+
+type thrd_t
+type thrd_start_t
+type mtx_t
+type once_flag
+type cnd_t
+type tss_t
+type tss_dtor_t
+
+function int thrd_create (thrd_t*, thrd_start_t, void*)
+function int thrd_equal (thrd_t, thrd_t)
+function thrd_t thrd_current (void)
+function int thrd_sleep (const struct timespec*, struct timespec*)
+function void thrd_exit (int)
+function int thrd_detach (thrd_t)
+function int thrd_join (thrd_t, int*)
+function void thrd_yield (void)
+
+function int mtx_init (mtx_t*, int)
+function int mtx_lock (mtx_t*)
+function int mtx_timedlock (mtx_t*, const struct timespec*)
+function int mtx_trylock (mtx_t*)
+function int mtx_unlock (mtx_t*)
+function void mtx_destroy (mtx_t*)
+
+function void call_once (once_flag*, void (*)(void))
+
+function int cnd_init (cnd_t*)
+function int cnd_signal (cnd_t*)
+function int cnd_broadcast (cnd_t*)
+function int cnd_wait (cnd_t*, mtx_t*)
+function int cnd_timedwait (cnd_t*, mtx_t*, const struct timespec*)
+function void cnd_destroy (cnd_t*)
+
+function int tss_create (tss_t*, tss_dtor_t)
+function {void*} tss_get (tss_t)
+function int tss_set (tss_t, void*)
+function void tss_delete (tss_t)
+
+#include "time.h-data"
+
+#endif
diff --git a/conform/data/time.h-data b/conform/data/time.h-data
index ddd9a074c8..9c1c19596e 100644
--- a/conform/data/time.h-data
+++ b/conform/data/time.h-data
@@ -5,11 +5,12 @@ macro CLOCKS_PER_SEC {clock_t}
macro-int-constant TIME_UTC > 0
#endif
-#if !defined ISO && !defined ISO99 && !defined XPG3 && !defined XPG4
+#if !defined ISO && !defined ISO99 && !defined XPG4 && !defined XPG42
type {struct timespec}
element {struct timespec} time_t tv_sec
-element {struct timespec} long tv_nsec
+// Bug 16437: tv_nsec has wrong type.
+xfail[x86_64-x32-linux]-element {struct timespec} long tv_nsec
#endif
type size_t
@@ -45,7 +46,7 @@ function int timespec_get (struct timespec *, int)
# if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008
symbol CLK_TCK
# endif
-# if !defined XPG3 && !defined XPG4
+# if !defined XPG4 && !defined XPG42
# if !defined POSIX && !defined UNIX98
constant CLOCK_PROCESS_CPUTIME_ID
constant CLOCK_THREAD_CPUTIME_ID
@@ -72,31 +73,31 @@ type locale_t
tag {struct sigevent}
# endif
-# if !defined POSIX && !defined POSIX2008
+# if !defined XPG4 && !defined POSIX && !defined POSIX2008
variable int getdate_err
# endif
function {char*} asctime_r (const struct tm*, char*)
-#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function int clock_getcpuclockid (pid_t, clockid_t*)
#endif
-#if !defined XPG3 && !defined XPG4
+#if !defined XPG4 && !defined XPG42
function int clock_getres (clockid_t, struct timespec*)
function int clock_gettime (clockid_t, struct timespec*)
#endif
-#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function int clock_nanosleep (clockid_t, int, const struct timespec*, struct timespec*)
#endif
-#if !defined XPG3 && !defined XPG4
+#if !defined XPG4 && !defined XPG42
function int clock_settime (clockid_t, const struct timespec*)
#endif
function {char*} ctime_r (const time_t*, char*)
-# if !defined POSIX && !defined POSIX2008
+# if !defined XPG4 && !defined POSIX && !defined POSIX2008
function {struct tm*} getdate (const char*)
# endif
function {struct tm*} gmtime_r (const time_t*, struct tm*)
function {struct tm*} localtime_r (const time_t*, struct tm*)
-# if !defined XPG3 && !defined XPG4
+# if !defined XPG4 && !defined XPG42
function int nanosleep (const struct timespec*, struct timespec*)
# endif
# if defined XOPEN2K8 || defined POSIX2008
@@ -105,7 +106,7 @@ function size_t strftime_l (char*, size_t, const char*, const struct tm*, locale
# if !defined POSIX && !defined POSIX2008
function {char*} strptime (const char*, const char*, struct tm*)
# endif
-# if !defined XPG3 && !defined XPG4
+# if !defined XPG4 && !defined XPG42
function int timer_create (clockid_t, struct sigevent*, timer_t*)
function int timer_delete (timer_t)
function int timer_gettime (timer_t, struct itimerspec*)
diff --git a/conform/data/ucontext.h-data b/conform/data/ucontext.h-data
index dc2f4cb0da..a840f464fc 100644
--- a/conform/data/ucontext.h-data
+++ b/conform/data/ucontext.h-data
@@ -1,12 +1,14 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG3 && !defined POSIX2008 && !defined XOPEN2K8
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined XPG4 && !defined POSIX2008 && !defined XOPEN2K8
type mcontext_t
type ucontext_t
element ucontext_t {ucontext_t*} uc_link
-element ucontext_t sigset_t uc_sigmask
+// Bug 21634: uc_sigmask has wrong type.
+xfail[ia64-linux]-element ucontext_t sigset_t uc_sigmask
element ucontext_t stack_t uc_stack
-element ucontext_t mcontext_t uc_mcontext
+// Bug 21635: uc_mcontext has wrong type.
+xfail[powerpc32-linux]-element ucontext_t mcontext_t uc_mcontext
type sigset_t
type stack_t
diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data
index 9c00d44551..aa070528e8 100644
--- a/conform/data/unistd.h-data
+++ b/conform/data/unistd.h-data
@@ -7,7 +7,7 @@
#endif
constant _POSIX_VERSION
-#if defined POSIX || defined XPG3 || defined XPG4 || defined UNIX98
+#if defined POSIX || defined XPG4 || defined XPG42 || defined UNIX98
constant _POSIX2_C_VERSION
#endif
#ifndef POSIX
@@ -375,7 +375,7 @@ constant _SC_THREAD_ROBUST_PRIO_INHERIT
constant _SC_THREAD_ROBUST_PRIO_PROTECT
#endif
-#if !defined POSIX && !defined POSIX2008
+#if !defined XPG4 && !defined POSIX && !defined POSIX2008
constant F_LOCK
constant F_ULOCK
constant F_TEST
@@ -417,28 +417,27 @@ type off_t
type pid_t
#endif
-#if !defined POSIX
+#if !defined POSIX && !defined XPG4
type useconds_t
+# ifndef XPG42
type intptr_t
+# endif
#endif
function int access (const char*, int)
function {unsigned int} alarm (unsigned int)
-#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008
+#if !defined XOPEN2K && !defined XOPEN2K8 && !defined XPG4 && !defined POSIX && !defined POSIX2008
function int brk (void*)
#endif
function int chdir (const char*)
-#if defined XPG3 || defined XPG4 || defined UNIX98
+#if defined XPG4 || defined XPG42 || defined UNIX98
function int chroot (const char*)
#endif
function int chown (const char*, uid_t, gid_t)
function int close (int)
function size_t confstr (int, char*, size_t)
-#if !defined POSIX && !defined POSIX2008
-function {char*} crypt (const char*, const char*)
-#endif
-#if defined XPG3 || defined XPG4 || defined UNIX98
+#if defined XPG4 || defined XPG42 || defined UNIX98
function {char*} ctermid (char*)
function {char*} cuserid (char*)
#endif
@@ -447,9 +446,6 @@ allow cuserid
#endif
function int dup (int)
function int dup2 (int, int)
-#if !defined POSIX && !defined POSIX2008
-function void encrypt (char[64], int)
-#endif
function int execl (const char*, const char*, ...)
function int execle (const char*, const char*, ...)
function int execlp (const char*, const char*, ...)
@@ -460,16 +456,16 @@ function void _exit (int)
# if defined XOPEN2K8 || defined POSIX2008
function int faccessat (int, const char*, int, int)
# endif
-#if !defined POSIX
+#if !defined XPG4 && !defined POSIX
function int fchown (int, uid_t, gid_t)
#endif
# if defined XOPEN2K8 || defined POSIX2008
function int fchownat (int, const char*, uid_t, gid_t, int)
# endif
-#ifndef POSIX
+#if !defined XPG4 && !defined POSIX
function int fchdir (int)
#endif
-#if !defined XPG3 && !defined XPG4
+#if !defined XPG4 && !defined XPG42
function int fdatasync (int)
#endif
# if defined XOPEN2K8 || defined POSIX2008
@@ -478,52 +474,56 @@ function int fexecve (int, char *const[], char *const[])
function pid_t fork (void)
function {long int} fpathconf (int, int)
function int fsync (int)
+#ifndef XPG4
function int ftruncate (int, off_t)
+#endif
function {char*} getcwd (char*, size_t)
-#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008
+#if !defined XOPEN2K && !defined XOPEN2K8 && !defined XPG4 && !defined POSIX && !defined POSIX2008
function int getdtablesize (void)
#endif
function gid_t getegid (void)
function uid_t geteuid (void)
function gid_t getgid (void)
function int getgroups (int, gid_t[])
-#if !defined POSIX && !defined POSIX2008
+#if !defined XPG4 && !defined POSIX && !defined POSIX2008
function long gethostid (void)
#endif
-#if !defined POSIX
+#if !defined POSIX && !defined XPG4
function int gethostname (char*, size_t)
#endif
function {char*} getlogin (void)
-#if !defined XPG3 && !defined XPG4
+#if !defined XPG4 && !defined XPG42
function int getlogin_r (char*, size_t)
#endif
function int getopt (int, char*const[], const char*)
-#if defined XPG3 || defined XPG4 || defined UNIX98
+#if defined XPG42 || defined UNIX98
function int getpagesize (void)
+#endif
+#if defined XPG4 || defined XPG42 || defined UNIX98
function {char*} getpass (const char*)
#endif
-#ifndef POSIX
+#if !defined XPG4 && !defined POSIX
function pid_t getpgid (pid_t)
#endif
function pid_t getpgrp (void)
function pid_t getpid (void)
function pid_t getppid (void)
-#ifndef POSIX
+#if !defined XPG4 && !defined POSIX
function pid_t getsid (pid_t)
#endif
function uid_t getuid (void)
-#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K
+#if defined XPG42 || defined UNIX98 || defined XOPEN2K
function {char*} getwd (char*)
#endif
function int isatty (int)
-#ifndef POSIX
+#if !defined XPG4 && !defined POSIX
function int lchown (const char*, uid_t, gid_t)
#endif
function int link (const char*, const char*)
# if defined XOPEN2K8 || defined POSIX2008
function int linkat (int, const char*, int, const char*, int)
# endif
-# if !defined POSIX && !defined POSIX2008
+# if !defined XPG4 && !defined POSIX && !defined POSIX2008
function int lockf (int, int, off_t)
# endif
function off_t lseek (int, off_t, int)
@@ -533,33 +533,33 @@ function int nice (int)
function {long int} pathconf (const char*, int)
function int pause (void)
function int pipe (int[2])
-#if !defined POSIX && !defined XPG3 && !defined XPG4
+#if !defined POSIX && !defined XPG4 && !defined XPG42
function ssize_t pread (int, void*, size_t, off_t)
#endif
-#if !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 && !defined XPG3 && !defined XPG4
+#if !defined POSIX && !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008 && !defined XPG4 && !defined XPG42
function int pthread_atfork (void(*)(void), void(*)(void), void(*)(void))
#endif
-#if !defined POSIX && !defined XPG3 && !defined XPG4
+#if !defined POSIX && !defined XPG4 && !defined XPG42
function ssize_t pwrite (int, const void*, size_t, off_t)
#endif
function ssize_t read (int, void*, size_t)
-#ifndef POSIX
+#if !defined XPG4 && !defined POSIX
function ssize_t readlink (const char*, char*, size_t)
#endif
# if defined XOPEN2K8 || defined POSIX2008
function ssize_t readlinkat (int, const char*, char*, size_t)
# endif
function int rmdir (const char*)
-#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX && !defined POSIX2008
+#if !defined XOPEN2K && !defined XOPEN2K8 && !defined XPG4 && !defined POSIX && !defined POSIX2008
function {void*} sbrk (intptr_t)
#endif
-#if !defined POSIX && !defined XPG3 && !defined XPG4 && !defined UNIX98
+#if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
function int setegid (gid_t)
function int seteuid (uid_t)
#endif
function int setgid (gid_t)
function int setpgid (pid_t, pid_t)
-# if !defined POSIX && !defined POSIX2008
+# if !defined XPG4 && !defined POSIX && !defined POSIX2008
function pid_t setpgrp (void)
function int setregid (gid_t, gid_t)
function int setreuid (uid_t, uid_t)
@@ -570,31 +570,31 @@ function {unsigned int} sleep (unsigned int)
# if !defined POSIX && !defined POSIX2008
function void swab (const void*, void*, ssize_t)
# endif
-#ifndef POSIX
+#if !defined XPG4 && !defined POSIX
function int symlink (const char*, const char*)
# endif
# if defined XOPEN2K8 || defined POSIX2008
function int symlinkat (const char*, int, const char*)
# endif
-# if !defined POSIX && !defined POSIX2008
+# if !defined XPG4 && !defined POSIX && !defined POSIX2008
function void sync (void)
# endif
function {long int} sysconf (int)
function pid_t tcgetpgrp (int)
function int tcsetpgrp (int, pid_t)
-#ifndef POSIX
+#if !defined XPG4 && !defined POSIX
function int truncate (const char*, off_t)
#endif
function {char*} ttyname (int)
function int ttyname_r (int, char*, size_t)
-#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K
+#if defined XPG42 || defined UNIX98 || defined XOPEN2K
function useconds_t ualarm (useconds_t, useconds_t)
#endif
function int unlink (const char*)
# if defined XOPEN2K8 || defined POSIX2008
function int unlinkat (int, const char*, int)
# endif
-#if defined XPG3 || defined XPG4 || defined UNIX98 || defined XOPEN2K
+#if defined XPG42 || defined UNIX98 || defined XOPEN2K
function int usleep (useconds_t)
function pid_t vfork (void)
#endif
diff --git a/conform/data/utmpx.h-data b/conform/data/utmpx.h-data
index 80641ff8f0..cfe2a08634 100644
--- a/conform/data/utmpx.h-data
+++ b/conform/data/utmpx.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG3
+#if !defined ISO && !defined ISO99 && !defined ISO11 && !defined POSIX && !defined POSIX2008 && !defined XPG4
type {struct utmpx}
element {struct utmpx} char ut_user []
diff --git a/conform/data/varargs.h-data b/conform/data/varargs.h-data
index 48435fe387..2366edb1fa 100644
--- a/conform/data/varargs.h-data
+++ b/conform/data/varargs.h-data
@@ -1,4 +1,4 @@
-#if defined XPG3 || defined XPG4 || defined UNIX98
+#if defined XPG4 || defined XPG42 || defined UNIX98
macro va_alist
macro va_dcl
type va_list
diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data
index c65ec404c8..0beae8957d 100644
--- a/conform/data/wchar.h-data
+++ b/conform/data/wchar.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42
type wchar_t
type wint_t
# if !defined ISO99 && !defined ISO11 && !defined POSIX2008
diff --git a/conform/data/wctype.h-data b/conform/data/wctype.h-data
index 91638e61dc..944fe6efab 100644
--- a/conform/data/wctype.h-data
+++ b/conform/data/wctype.h-data
@@ -1,4 +1,4 @@
-#if !defined ISO && !defined POSIX && !defined XPG3 && !defined XPG4
+#if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42
type wint_t
type wctrans_t
type wctype_t