[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r9637 - in /fsf/trunk/libc: ./ conform/ conform/data/ conform/data/sys/ libio/ posix/ posix/sys/ signal/ string/ sysdeps/uni...
- To: commits@xxxxxxxxxx
- Subject: [commits] r9637 - in /fsf/trunk/libc: ./ conform/ conform/data/ conform/data/sys/ libio/ posix/ posix/sys/ signal/ string/ sysdeps/uni...
- From: eglibc@xxxxxxxxxx
- Date: Mon, 11 Jan 2010 08:03:07 -0000
Author: eglibc
Date: Mon Jan 11 00:03:07 2010
New Revision: 9637
Log:
Import glibc-mainline for 2010-01-11
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/conform/conformtest.pl
fsf/trunk/libc/conform/data/signal.h-data
fsf/trunk/libc/conform/data/stdio.h-data
fsf/trunk/libc/conform/data/strings.h-data
fsf/trunk/libc/conform/data/sys/types.h-data
fsf/trunk/libc/conform/data/sys/wait.h-data
fsf/trunk/libc/libio/stdio.h
fsf/trunk/libc/posix/glob.h
fsf/trunk/libc/posix/sys/types.h
fsf/trunk/libc/posix/sys/wait.h
fsf/trunk/libc/signal/signal.h
fsf/trunk/libc/string/strings.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/sigaction.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/sigaction.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Mon Jan 11 00:03:07 2010
@@ -1,4 +1,39 @@
+2010-01-10 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/bits/sigaction.h: SA_RESTART, SA_NODEFER,
+ and SA_RESETHAND now available in Base.
+ * sysdeps/unix/sysv/linux/ia64/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/bits/sigaction.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise.
+ * conform/data/signal.h-data: Update for XPG7.
+
+ * posix/sys/types.h: Define id_t, clock_t, blksize_t for XPG7.
+
+ * string/strings.h: Don't declare obsolete functions for XPG7.
+ Declare ffs only for XSI.
+ * conform/data/strings.h-data: Update for XPG7.
+
+2010-01-10 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ [BZ #11125]
+ * libio/stdio.h: Define va_list, off_t, and ssize_t.
+
+ * posix/glob.h: Define size_t.
+
+ * posix/sys/wait.h: Define idtype_t and declare waitid for XPG7.
+
+ * signal/signal.h: Define size_t, mcontext_t, and ucontext_t for XPG7.
+
+2010-01-10 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * conform/conformtest.pl: For XPG7 testing the headers are supposed to
+ be self-contained.
+
+ * conform/data/stdio.h-data: Expect off_t and ssize_t.
+
2010-01-09 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * libio/stdio.h: Define va_list also for XPG7.
* conform/conformtest.pl: Update for XPG7 and some bug fixes.
* conform/data/ctype.h-data: Likewise.
Modified: fsf/trunk/libc/conform/conformtest.pl
==============================================================================
--- fsf/trunk/libc/conform/conformtest.pl (original)
+++ fsf/trunk/libc/conform/conformtest.pl Mon Jan 11 00:03:07 2010
@@ -56,14 +56,17 @@
# These are symbols which are known to pollute the namespace.
@knownproblems = ('unix', 'linux', 'i386');
-# Some headers need a bit more attention.
-$mustprepend{'inttypes.h'} = "#include <stddef.h>\n";
-$mustprepend{'regex.h'} = "#include <sys/types.h>\n";
-$mustprepend{'sched.h'} = "#include <sys/types.h>\n";
-$mustprepend{'signal.h'} = "#include <pthread.h>\n";
-$mustprepend{'stdio.h'} = "#include <sys/types.h>\n";
-$mustprepend{'wchar.h'} = "#include <stdarg.h>\n";
-$mustprepend{'wordexp.h'} = "#include <stddef.h>\n";
+if ($dialect ne "XOPEN2K8" && $dialect ne "POSIX2008") {
+ # Some headers need a bit more attention. At least with XPG7
+ # all headers should be self-contained.
+ $mustprepend{'inttypes.h'} = "#include <stddef.h>\n";
+ $mustprepend{'regex.h'} = "#include <sys/types.h>\n";
+ $mustprepend{'sched.h'} = "#include <sys/types.h>\n";
+ $mustprepend{'signal.h'} = "#include <pthread.h>\n";
+ $mustprepend{'stdio.h'} = "#include <sys/types.h>\n";
+ $mustprepend{'wchar.h'} = "#include <stdarg.h>\n";
+ $mustprepend{'wordexp.h'} = "#include <stddef.h>\n";
+}
# Make a hash table from this information.
while ($#keywords >= 0) {
Modified: fsf/trunk/libc/conform/data/signal.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/signal.h-data (original)
+++ fsf/trunk/libc/conform/data/signal.h-data Mon Jan 11 00:03:07 2010
@@ -1,6 +1,8 @@
typed-constant SIG_DFL {void(*)(int)}
typed-constant SIG_ERR {void(*)(int)}
+#if !defined ISO && !defined POSIX && !defined POSIX2008
typed-constant SIG_HOLD {void(*)(int)}
+#endif
typed-constant SIG_IGN {void(*)(int)}
type sig_atomic_t
@@ -14,11 +16,14 @@
type mcontext_t
type ucontext_t
-
element ucontext_t {ucontext_t*} uc_link
element ucontext_t sigset_t uc_sigmask
element ucontext_t stack_t uc_stack
element ucontext_t mcontext_t uc_mcontext
+
+type {struct timespec}
+element {struct timespec} __time_t tv_sec
+element {struct timespec} long tv_nsec
#endif
element {union sigval} int sival_int
@@ -173,7 +178,9 @@
constant SI_ASYNCIO
constant SI_MESGQ
+#if !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
function int killpg (pid_t, int)
Modified: fsf/trunk/libc/conform/data/stdio.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/stdio.h-data (original)
+++ fsf/trunk/libc/conform/data/stdio.h-data Mon Jan 11 00:03:07 2010
@@ -36,11 +36,14 @@
type size_t
#if defined XOPEN2K8 || defined POSIX2008
type off_t
+type ssize_t
#endif
function void clearerr (FILE*)
function {char*} ctermid (char*)
+#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008
function {char*} cuserid (char*)
+#endif
#if defined XOPEN2K8 || defined POSIX2008
function int dprintf (int, const char*, ...)
#endif
Modified: fsf/trunk/libc/conform/data/strings.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/strings.h-data (original)
+++ fsf/trunk/libc/conform/data/strings.h-data Mon Jan 11 00:03:07 2010
@@ -1,11 +1,13 @@
+#if !defined XOPEN2K8 && !defined POSIX2008
function int bcmp (const void*, const void*, size_t)
function void bcopy (const void*, void*, size_t)
function void bzero (void*, size_t)
+function {char*} index (const char*, int)
+function {char*} rindex (const char*, int)
+#endif
#if !defined POSIX && !defined POSIX2008
function int ffs (int)
#endif
-function {char*} index (const char*, int)
-function {char*} rindex (const char*, int)
function int strcasecmp (const char*, const char*)
function int strncasecmp (const char*, const char*, size_t)
#if defined XOPEN2K8 || defined POSIX2008
Modified: fsf/trunk/libc/conform/data/sys/types.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/sys/types.h-data (original)
+++ fsf/trunk/libc/conform/data/sys/types.h-data Mon Jan 11 00:03:07 2010
@@ -39,7 +39,6 @@
type time_t
type timer_t
type uid_t
-type useconds_t
allow *_t
#endif
Modified: fsf/trunk/libc/conform/data/sys/wait.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/sys/wait.h-data (original)
+++ fsf/trunk/libc/conform/data/sys/wait.h-data Mon Jan 11 00:03:07 2010
@@ -48,7 +48,9 @@
type pid_t
function pid_t wait (int*)
+#if !defined XOPEN2K && !defined XOPEN2K8 && !defined POSIX2008
function pid_t wait3 (int*, int, struct rusage*)
+#endif
function int waitid (idtype_t, id_t, siginfo_t*, int)
function pid_t waitpid (pid_t, int*, int)
Modified: fsf/trunk/libc/libio/stdio.h
==============================================================================
--- fsf/trunk/libc/libio/stdio.h (original)
+++ fsf/trunk/libc/libio/stdio.h Mon Jan 11 00:03:07 2010
@@ -1,5 +1,5 @@
/* Define ISO C stdio on top of C++ iostreams.
- Copyright (C) 1991, 1994-2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1994-2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -74,7 +74,7 @@
#include <libio.h>
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN || defined __USE_XOPEN2K8
# ifdef __GNUC__
# ifndef _VA_LIST_DEFINED
typedef _G_va_list va_list;
@@ -82,6 +82,26 @@
# endif
# else
# include <stdarg.h>
+# endif
+#endif
+
+#ifdef __USE_XOPEN2K8
+# ifndef __off_t_defined
+# ifndef __USE_FILE_OFFSET64
+typedef __off_t off_t;
+# else
+typedef __off64_t off_t;
+# endif
+# define __off_t_defined
+# endif
+# if defined __USE_LARGEFILE64 && !defined __off64_t_defined
+typedef __off64_t off64_t;
+# define __off64_t_defined
+# endif
+
+# ifndef __ssize_t_defined
+typedef __ssize_t ssize_t;
+# define __ssize_t_defined
# endif
#endif
Modified: fsf/trunk/libc/posix/glob.h
==============================================================================
--- fsf/trunk/libc/posix/glob.h (original)
+++ fsf/trunk/libc/posix/glob.h Mon Jan 11 00:03:07 2010
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,92,95-98,2000,2001,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1995-1998,2000,2001,2004,2010
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,7 +28,7 @@
#ifndef __size_t
# if defined __GNUC__ && __GNUC__ >= 2
typedef __SIZE_TYPE__ __size_t;
-# ifdef __USE_XOPEN
+# if defined __USE_XOPEN || __USE_XOPEN2K8
typedef __SIZE_TYPE__ size_t;
# endif
# else
Modified: fsf/trunk/libc/posix/sys/types.h
==============================================================================
--- fsf/trunk/libc/posix/sys/types.h (original)
+++ fsf/trunk/libc/posix/sys/types.h Mon Jan 11 00:03:07 2010
@@ -1,5 +1,4 @@
-/* Copyright (C) 1991,1992,1994,1995,1996,1997,1998,1999,2000,2001,2002,2006
- Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1994-2002,2006,2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -101,7 +100,8 @@
# define __pid_t_defined
#endif
-#if (defined __USE_SVID || defined __USE_XOPEN) && !defined __id_t_defined
+#if (defined __USE_SVID || defined __USE_XOPEN || defined __USE_XOPEN2K8) \
+ && !defined __id_t_defined
typedef __id_t id_t;
# define __id_t_defined
#endif
@@ -124,7 +124,7 @@
# define __key_t_defined
#endif
-#ifdef __USE_XOPEN
+#if defined __USE_XOPEN || defined __USE_XOPEN2K8
# define __need_clock_t
#endif
#define __need_time_t
@@ -224,7 +224,8 @@
#endif /* Use BSD. */
-#if defined __USE_UNIX98 && !defined __blksize_t_defined
+#if (defined __USE_UNIX98 || defined __USE_XOPEN2K8) \
+ && !defined __blksize_t_defined
typedef __blksize_t blksize_t;
# define __blksize_t_defined
#endif
Modified: fsf/trunk/libc/posix/sys/wait.h
==============================================================================
--- fsf/trunk/libc/posix/sys/wait.h (original)
+++ fsf/trunk/libc/posix/sys/wait.h Mon Jan 11 00:03:07 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994,1996-2001,2003,2004,2005,2007,2009
+/* Copyright (C) 1991-1994,1996-2001,2003,2004,2005,2007,2009,2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -45,7 +45,7 @@
# if defined __GNUC__ && !defined __cplusplus
# define __WAIT_INT(status) \
(__extension__ (((union { __typeof(status) __in; int __i; }) \
- { .__in = (status) }).__i))
+ { .__in = (status) }).__i))
# else
# define __WAIT_INT(status) (*(__const int *) &(status))
# endif
@@ -98,7 +98,7 @@
#endif
/* The following values are used by the `waitid' function. */
-#if defined __USE_SVID || defined __USE_XOPEN
+#if defined __USE_SVID || defined __USE_XOPEN || defined __USE_XOPEN2K8
typedef enum
{
P_ALL, /* Wait for any child. */
@@ -138,7 +138,7 @@
__THROW. */
extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
-#if defined __USE_SVID || defined __USE_XOPEN
+#if defined __USE_SVID || defined __USE_XOPEN || defined __USE_XOPEN2K8
# define __need_siginfo_t
# include <bits/siginfo.h>
/* Wait for a childing matching IDTYPE and ID to change the status and
Modified: fsf/trunk/libc/signal/signal.h
==============================================================================
--- fsf/trunk/libc/signal/signal.h (original)
+++ fsf/trunk/libc/signal/signal.h Mon Jan 11 00:03:07 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2003, 2004, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2004, 2007, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -344,7 +344,7 @@
#endif /* use BSD. */
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8
# define __need_size_t
# include <stddef.h>
@@ -354,7 +354,7 @@
extern int siginterrupt (int __sig, int __interrupt) __THROW;
# include <bits/sigstack.h>
-# ifdef __USE_XOPEN
+# if defined __USE_XOPEN || defined __USE_XOPEN2K8
/* This will define `ucontext_t' and `mcontext_t'. */
# include <sys/ucontext.h>
# endif
Modified: fsf/trunk/libc/string/strings.h
==============================================================================
--- fsf/trunk/libc/string/strings.h (original)
+++ fsf/trunk/libc/string/strings.h Mon Jan 11 00:03:07 2010
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,92,96,97,99,2000,2001,2009 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1996,1997,1999,2000,2001,2009,2010
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,6 +36,7 @@
__BEGIN_DECLS
+# if !defined __USE_XOPEN2K8 || defined __USE_GNU
/* Compare N bytes of S1 and S2 (same as memcmp). */
extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
__THROW __attribute_pure__;
@@ -45,12 +47,8 @@
/* Set N bytes of S to 0. */
extern void bzero (void *__s, size_t __n) __THROW;
-/* Return the position of the first bit set in I, or 0 if none are set.
- The least-significant bit is position 1, the most-significant 32. */
-extern int ffs (int __i) __THROW __attribute__ ((const));
-
/* Find the first occurrence of C in S (same as strchr). */
-# ifdef __CORRECT_ISO_CPP_STRINGS_H_PROTO
+# ifdef __CORRECT_ISO_CPP_STRINGS_H_PROTO
extern "C++"
{
extern char *index (char *__s, int __c)
@@ -58,7 +56,7 @@
extern __const char *index (__const char *__s, int __c)
__THROW __asm ("index") __attribute_pure__ __nonnull ((1));
-# if defined __OPTIMIZE__ && !defined __CORRECT_ISO_CPP_STRING_H_PROTO
+# if defined __OPTIMIZE__ && !defined __CORRECT_ISO_CPP_STRING_H_PROTO
__extern_always_inline char *
index (char *__s, int __c) __THROW
{
@@ -70,15 +68,15 @@
{
return __builtin_index (__s, __c);
}
-# endif
+# endif
}
-# else
+# else
extern char *index (__const char *__s, int __c)
__THROW __attribute_pure__ __nonnull ((1));
-# endif
+# endif
/* Find the last occurrence of C in S (same as strrchr). */
-# ifdef __CORRECT_ISO_CPP_STRINGS_H_PROTO
+# ifdef __CORRECT_ISO_CPP_STRINGS_H_PROTO
extern "C++"
{
extern char *rindex (char *__s, int __c)
@@ -86,7 +84,7 @@
extern __const char *rindex (__const char *__s, int __c)
__THROW __asm ("rindex") __attribute_pure__ __nonnull ((1));
-# if defined __OPTIMIZE__ && !defined __CORRECT_ISO_CPP_STRING_H_PROTO
+# if defined __OPTIMIZE__ && !defined __CORRECT_ISO_CPP_STRING_H_PROTO
__extern_always_inline char *
rindex (char *__s, int __c) __THROW
{
@@ -98,12 +96,19 @@
{
return __builtin_rindex (__s, __c);
}
-#endif
+# endif
}
-# else
+# else
extern char *rindex (__const char *__s, int __c)
__THROW __attribute_pure__ __nonnull ((1));
+# endif
# endif
+
+#if !defined __USE_XOPEN2K8 || defined __USE_XOPEN2K8XSI
+/* Return the position of the first bit set in I, or 0 if none are set.
+ The least-significant bit is position 1, the most-significant 32. */
+extern int ffs (int __i) __THROW __attribute__ ((const));
+#endif
/* Compare S1 and S2, ignoring case. */
extern int strcasecmp (__const char *__s1, __const char *__s2)
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/sigaction.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/sigaction.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/sigaction.h Mon Jan 11 00:03:07 2010
@@ -1,5 +1,5 @@
/* The proper definitions for Linux's sigaction.
- Copyright (C) 1993-1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1993-1999, 2000, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -57,6 +57,8 @@
three arguments instead of one. */
#if defined __USE_UNIX98 || defined __USE_MISC
# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
+#endif
+#if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8
# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
its handler is being executed. */
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/sigaction.h Mon Jan 11 00:03:07 2010
@@ -1,5 +1,5 @@
/* Definitions for Linux/ia64 sigaction.
- Copyright (C) 1996, 1997, 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2003, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -53,6 +53,8 @@
#define SA_SIGINFO 0x00000004
#if defined __USE_UNIX98 || defined __USE_MISC
# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
+#endif
+#if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8
# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
# define SA_NODEFER 0x40000000 /* Don't automatically block the signal
when its handler is being executed. */
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/sigaction.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/sigaction.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/sigaction.h Mon Jan 11 00:03:07 2010
@@ -1,5 +1,5 @@
/* Definitions for 31 & 64 bit S/390 sigaction.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -90,6 +90,8 @@
three arguments instead of one. */
#if defined __USE_UNIX98 || defined __USE_MISC
# define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */
+#endif
+#if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8
# define SA_RESTART 0x10000000 /* Restart syscall on signal return. */
# define SA_NODEFER 0x40000000 /* Don't automatically block the signal when
its handler is being executed. */
Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/sigaction.h Mon Jan 11 00:03:07 2010
@@ -1,5 +1,5 @@
/* The proper definitions for Linux/SPARC sigaction.
- Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996-2000, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -58,6 +58,8 @@
three arguments instead of one. */
#if defined __USE_UNIX98 || defined __USE_MISC
# define SA_ONSTACK 0x00000001 /* Use signal stack by using `sa_restorer'. */
+#endif
+#if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8
# define SA_RESTART 0x00000002 /* Restart syscall on signal return. */
# define SA_INTERRUPT 0x00000010 /* Historical no-op. */
# define SA_NOMASK 0x00000020 /* Don't automatically block the signal when