Age | Commit message (Collapse) | Author | Files | Lines |
|
sys/ucontext.h is effectively a bits header. Its contents are
extremely system-specific, and it’s strongly associated with a
specific public header (ucontext.h) that provides a superset of its
definitions, but there are other public headers that also require some
of its definitions. This patch therefore moves it into the bits/
namespace and adjusts all the headers that refer to it. In case there
are external users, a stub is added that includes ucontext.h.
Most of the fallout changes are trivial, but aarch64, ia64 and riscv
need a little more work. aarch64 sys/ucontext.h (now bits/ucontext.h)
was including sys/procfs.h for the definition of elf_greg_t etc;
the simplest fix is to have it include bits/procfs.h instead (and then
that needs to include sys/user.h for user_regs_struct). This is not
ideal but fixing it properly would require disentangling all of the
debugger interface headers which is more than I’m up for at the moment.
ia64 bits/ptrace.h and bits/procfs.h were both including
bits/sigcontext.h, which is only licensed to be included from
signal.h. (I’m not sure how this ever worked, or why it broke with
this patch and not some previous one.) This is fixed by creating
another single-type header, bits/types/__ia64_fpreg.h, which provides
the only thing they need from bits/sigcontext.h.
s/u/s/l/riscv/makecontext.c was defining makecontext with a function
head that didn’t agree with its official prototype (in ucontext.h);
formerly that file did not include ucontext.h, only sys/ucontext.h,
so we were getting away with it, but it’s still wrong. Making the
function head match the prototype actually simplifies the code.
* sysdeps/generic/sys/ucontext.h: Move to top level bits/ucontext.h.
Adjust multiple inclusion guard.
* sysdeps/arm/sys/ucontext.h: Move to sysdeps/arm/bits/ucontext.h.
Adjust multiple inclusion guard.
* sysdeps/i386/sys/ucontext.h: Similarly.
* sysdeps/m68k/sys/ucontext.h: Similarly.
* sysdeps/mips/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/alpha/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/csky/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/hppa/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/m68k/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/microblaze/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/nios2/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/riscv/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/sh/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/sparc/sys/ucontext.h: Similarly.
* sysdeps/unix/sysv/linux/x86/sys/ucontext.h: Similarly.
* stdlib/Makefile: Install bits/ucontext.h.
* stdlib/sys/ucontext.h: New backward compatibility stub header,
includes ucontext.h.
* include/sys/ucontext.h: New wrapper.
* sysdeps/unix/sysv/linux/aarch64/bits/procfs.h: Allow inclusion
by bits/ucontext.h as well as sys/procfs.h. Include sys/user.h.
* sysdeps/unix/sysv/linux/aarch64/bits/ucontext.h: Include
bits/procfs.h instead of sys/procfs.h.
* sysdeps/unix/sysv/linux/ia64/bits/types/__ia64_fpreg.h:
New file, contents factored out of ia64/bits/sigcontext.h and
ia64/bits/ucontext.h.
* sysdeps/unix/sysv/linux/ia64/Makefile:
Install bits/types/__ia64_fpreg.h. Merge subdir=misc blocks.
* sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
* sysdeps/unix/sysv/linux/ia64/bits/ucontext.h:
Include bits/types/__ia64_fpreg.h for struct ia64_fpreg.
* sysdeps/unix/sysv/linux/ia64/bits/procfs.h:
Include bits/types/__ia64_fpreg.h for struct ia64_fpreg.
Don’t include bits/sigcontext.h or bits/ucontext.h.
* sysdeps/unix/sysv/linux/ia64/sys/ptrace.h:
Don’t include bits/sigcontext.h.
* sysdeps/unix/sysv/linux/riscv/makecontext.c: Include
ucontext.h, not sys/ucontext.h. Correct function head to match
prototype in ucontext.h. Use va_arg to retrieve all arguments
past argc.
* sysdeps/unix/sysv/linux/s390/tst-ptrace-singleblock.c:
Sort list of includes.
* signal/signal.h, stdlib/ucontext.h
* sysdeps/unix/sysv/linux/alpha/bits/procfs-prregset.h
* sysdeps/unix/sysv/linux/ia64/sys/ptrace.h
* sysdeps/unix/sysv/linux/riscv/bits/procfs.h
* sysdeps/unix/sysv/linux/s390/bits/procfs.h:
Include bits/ucontext.h, not sys/ucontext.h.
* sysdeps/unix/sysv/linux/aarch64/sigcontextinfo.h
* sysdeps/unix/sysv/linux/arm/sigcontextinfo.h
* sysdeps/unix/sysv/linux/nios2/sigcontextinfo.h
* sysdeps/unix/sysv/linux/riscv/sigcontextinfo.h:
Include signal.h, not sys/ucontext.h.
* sysdeps/unix/sysv/linux/arm/register-dump.h
* sysdeps/unix/sysv/linux/csky/register-dump.h:
Include ucontext.h, not sys/ucontext.h.
* sysdeps/unix/sysv/linux/aarch64/ucontext_i.sym
* sysdeps/unix/sysv/linux/alpha/ucontext-offsets.sym
* sysdeps/unix/sysv/linux/arm/ucontext_i.sym
* sysdeps/unix/sysv/linux/csky/abiv2/ucontext_i.sym
* sysdeps/unix/sysv/linux/hppa/ucontext_i.sym
* sysdeps/unix/sysv/linux/i386/ucontext_i.sym
* sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym
* sysdeps/unix/sysv/linux/m68k/m680x0/ucontext_i.sym
* sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.sym
* sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym
* sysdeps/unix/sysv/linux/mips/ucontext_i.sym
* sysdeps/unix/sysv/linux/nios2/ucontext_i.sym
* sysdeps/unix/sysv/linux/riscv/ucontext_i.sym
* sysdeps/unix/sysv/linux/s390/ucontext_i.sym
* sysdeps/unix/sysv/linux/sh/sh3/ucontext_i.sym
* sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.sym
* sysdeps/unix/sysv/linux/sparc/sparc32/ucontext_i.sym
* sysdeps/unix/sysv/linux/x86_64/ucontext_i.sym:
Include stddef.h and signal.h; don’t include any other headers.
* scripts/check-obsolete-constructs.py (HEADER_ALLOWED_INCLUDES)
(SYSDEP_ALLOWED_INCLUDES): Update.
|
|
We rely on the compiler's stddef.h and stdarg.h to define size_t,
ptrdiff_t, wchar_t, NULL, and __gnuc_va_list, and to implement a
convention that allows us to request the definition of a specific one:
for instance
#define __need_size_t
#include <stddef.h>
is expected to define size_t but not any of the other things stddef.h
defines.
This patch hides that convention behind a set of bits/types/ headers,
which allows check-obsolete-constructs.py to verify that none of our
headers include these headers unconditionally. (Both of them define
at least one item in the user namespace that no other header is
supposed to expose.) It will also facilitate coping with compilers
that don’t implement the __need convention. (That scenario is not
hypothetical, see the next patch.)
Only public headers use the new bits headers. Non-public headers and
.c files in our codebase, that were formerly defining __need macros,
now just include stddef.h and/or stdarg.h without any __need macros.
A few files didn’t need to be including stddef.h / stdarg.h at all.
Uses of NULL in public headers that aren’t expected to define NULL
are changed to a bare 0. bits/NULL.h is only used by headers that
are expected to define NULL.
malloc.h and printf.h were, in fact, including stddef.h and/or
stdarg.h unconditionally; they no longer do that. This broke a few of
our test cases, which are fixed by adding appropriate inclusions to
the relevant .c files.
* stdlib/bits/NULL.h
* stdlib/bits/types/__va_list.h
* stdlib/bits/types/ptrdiff_t.h
* stdlib/bits/types/size_t.h
* stdlib/bits/types/va_list.h
* stdlib/bits/types/wchar_t.h:
New headers defining a single type or macro each.
* stdlib/Makefile: Install new headers.
* include/bits/NULL.h
* include/bits/types/__va_list.h
* include/bits/types/ptrdiff_t.h
* include/bits/types/size_t.h
* include/bits/types/va_list.h
* include/bits/types/wchar_t.h:
New wrapper headers.
* malloc/malloc.h: Don’t include stdio.h or stddef.h.
Include bits/NULL.h, bits/types/size_t.h, bits/types/ptrdiff_t.h,
and bits/types/FILE.h.
* stdio-common/printf.h: Don’t include stddef.h or stdarg.h.
Include bits/types/size_t.h, bits/types/wchar_t.h, and
bits/types/__va_list.h. Use __gnuc_va_list instead of va_list
in prototypes.
* libio/bits/types/struct_FILE.h: Include bits/types/size_t.h.
* misc/sys/param.h: Include features.h.
* sysvipc/sys/msg.h: Include bits/msq.h after all bits/types/ headers.
* sysvipc/sys/sem.h: Include bits/sem.h after all bits/types/ headers.
* sysvipc/sys/shm.h: Include bits/shm.h after all bits/types/ headers.
* hurd/hurd/signal.h: Don’t use NULL.
* hurd/hurd/ioctl.h: Don’t include stdarg.h.
* hurd/hurd/userlink.h: Don’t include stddef.h. Don’t use NULL.
* intl/libintl.h: Don’t include stddef.h. Don’t use NULL.
* intl/gettext.c, intl/ngettext.c: Include stddef.h
unconditionally. Don’t define any __need macros first.
Don’t include stdlib.h.
* sysdeps/posix/sigignore.c:, sysdeps/posix/sigset.c:
Don’t include errno.h or string.h.
* malloc/tst-malloc-thread-fail.c: Include stddef.h.
* malloc/tst-malloc_info.c: Include stdio.h.
* stdio-common/tst-vfprintf-user-type.c: Include stdarg.h.
* string/tst-cmp.c: Include stdio.h.
* debug/wcpcpy_chk.c, iconv/loop.c, iconv/skeleton.c
* signal/sighold.c, signal/sigrelse.c, stdio-common/tempname.c
* sysdeps/generic/ldsodefs.h, sysdeps/nptl/libc-lock.h
* sysdeps/nptl/libc-lockP.h, sysdeps/posix/waitid.c
* wcsmbs/wcstol_l.c, wcsmbs/wcstoll_l.c, wcsmbs/wcstoul_l.c
* wcsmbs/wcstoull_l.c, sysdeps/posix/sigignore.c
* sysdeps/posix/sigset.c: Don’t define __need macros before
including stddef.h.
* bits/socket.h, bits/types/stack_t.h, dirent/dirent.h
* dlfcn/dlfcn.h, gmon/sys/profil.h, grp/grp.h, gshadow/gshadow.h
* hurd/hurd/signal.h, hurd/hurd/sigpreempt.h, iconv/gconv.h
* include/set-hooks.h, include/stdio.h, inet/aliases.h
* io/sys/sendfile.h, libio/stdio.h, misc/bits/types/struct_iovec.h
* misc/search.h, misc/sys/mman.h, misc/syslog.h, posix/glob.h
* posix/sched.h, posix/sys/types.h, posix/unistd.h
* posix/wordexp.h, pwd/pwd.h, shadow/shadow.h, signal/signal.h
* socket/sys/socket.h, stdlib/alloca.h, stdlib/monetary.h
* stdlib/stdlib.h, stdlib/sys/random.h, string/string.h
* string/strings.h, sunrpc/rpc/netdb.h
* sysdeps/htl/bits/types/struct___pthread_attr.h
* sysdeps/mach/hurd/bits/socket.h
* sysdeps/unix/sysv/linux/bits/socket.h
* sysdeps/unix/sysv/linux/bits/types/stack_t.h
* sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
* sysdeps/unix/sysv/linux/mips/bits/types/stack_t.h
* sysdeps/unix/sysv/linux/scsi/sg.h
* sysdeps/unix/sysv/linux/sys/sysctl.h
* sysvipc/sys/msg.h, sysvipc/sys/sem.h, sysvipc/sys/shm.h
* time/time.h, wcsmbs/uchar.h, wcsmbs/wchar.h:
Use bits/types/size_t.h instead of __need_size_t.
* iconv/gconv.h, iconv/iconv.h, libio/libio.h
* stdlib/inttypes.h, stdlib/stdlib.h, wcsmbs/wchar.h:
Use bits/types/wchar_t.h instead of __need_wchar_t.
* libio/stdio.h, locale/locale.h, misc/sys/param.h
* posix/sched.h, posix/unistd.h, stdlib/stdlib.h
* string/string.h, sysdeps/unix/sysv/linux/bits/sigcontext.h
* time/time.h, wcsmbs/wchar.h: Use bits/NULL.h instead of __need_NULL.
* libio/stdio.h, misc/err.h: Use bits/types/__va_list.h instead
of __need___va_list.
* libio/stdio.h: Use bits/types/va_list.h instead of manually
defining va_list.
* hurd/hurd/userlink.h, misc/sys/mman.h, posix/sched.h
* sysdeps/mach/hurd/bits/socket.h
* sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
* wcsmbs/wchar.h: Reorganize includes; no semantic effect.
* stdlib/stdlib.h: Normalize format of multiple include guard.
* sysdeps/unix/sysv/linux/bits/sigcontext.h: Annotate workarounds
for kernel header bugs.
* sysdeps/unix/sysv/linux/aarch64/sys/user.h
* sysdeps/unix/sysv/linux/arm/sys/user.h
* sysdeps/unix/sysv/linux/m68k/sys/user.h
* sysdeps/unix/sysv/linux/microblaze/sys/user.h
* sysdeps/unix/sysv/linux/nios2/sys/user.h
* sysdeps/unix/sysv/linux/s390/sys/user.h
* sysdeps/unix/sysv/linux/x86/sys/user.h
Include features.h.
* sysdeps/unix/sysv/linux/alpha/sys/user.h
* sysdeps/unix/sysv/linux/ia64/sys/user.h
* sysdeps/unix/sysv/linux/mips/sys/user.h
* sysdeps/unix/sysv/linux/powerpc/sys/user.h
* sysdeps/unix/sysv/linux/sh/sys/user.h
* sysdeps/unix/sysv/linux/sparc/sys/user.h
Include features.h and bits/types/size_t.h, in that order.
Include kernel headers, if any, after those two.
Don’t include stddef.h or sys/types.h.
* scripts/check-obsolete-constructs.py
(UNIVERSAL_ALLOWED_INCLUDES): Remove stddef.h and stdarg.h.
(HEADER_ALLOWED_INCLUDES): Update.
|
|
This doesn't exactly fit the theme but as long as I'm tinkering with
sys/types.h it makes sense to go through and create single-declaration
bits/types/ headers for all of the remaining cases where we have
two or more headers declaring a public type.
The remaining uses of the original __T_defined idiom are:
__error_t_defined in files shared with gnulib, which probably has to
remain as is; ____gwchar_t_defined in inttypes.h, which may not be
necessary anymore and should be addressed separately, and
__ldiv_t_defined and __lldiv_t_defined in stdlib.h, ditto.
Our handling of LFS types is a little inconsistent: some headers
declare both off_t and off64_t (for instance) when
_LARGEFILE64_SOURCE, others will only declare off_t regardless of
_LARGEFILE64_SOURCE. I don't know if this was intentional or not.
I am tempted to centralize responsibility for _LARGEFILE64_SOURCE as
well as _FILE_OFFSET_BITS=64 in bits/types/off_t.h (etc) so that any
header that declares off_t will automatically also declare off64_t
when _LARGEFILE64_SOURCE.
sunrpc/rpc/types.h is special, because it is included in files
compiled by the *build* compiler (cross-rpcgen-objs), and therefore it
cannot unconditionally assume bits/types headers are available. What
I did was have it include the appropriate bits/types headers only if
including sys/types.h did not cause __BIT_TYPES_DEFINED__ to be
defined. This will do the right thing when an installed rpc/types.h
is included by application code compiled without __USE_MISC in effect.
During the build, we rely on the fact that we compile all of our own
code with __USE_MISC in effect. This is fragile, but should be
acceptable for code that's no longer built by default anyway.
scripts/check-obsolete-constructs.py ensures that only sys/types.h and
rpc/types.h include the bits/types/ headers that define obsolete types.
* posix/bits/types/blkcnt64_t.h
* posix/bits/types/blkcnt_t.h
* posix/bits/types/blksize_t.h
* posix/bits/types/dev_t.h
* posix/bits/types/fsblkcnt64_t.h
* posix/bits/types/fsblkcnt_t.h
* posix/bits/types/fsfilcnt64_t.h
* posix/bits/types/fsfilcnt_t.h
* posix/bits/types/fsid_t.h
* posix/bits/types/gid_t.h
* posix/bits/types/id_t.h
* posix/bits/types/ino64_t.h
* posix/bits/types/ino_t.h
* posix/bits/types/intptr_t.h
* posix/bits/types/key_t.h
* posix/bits/types/loff_t.h
* posix/bits/types/mode_t.h
* posix/bits/types/nlink_t.h
* posix/bits/types/off64_t.h
* posix/bits/types/off_t.h
* posix/bits/types/pid_t.h
* posix/bits/types/socklen_t.h
* posix/bits/types/ssize_t.h
* posix/bits/types/suseconds_t.h
* posix/bits/types/uid_t.h
* posix/bits/types/useconds_t.h:
New single-declaration headers for standard types canonically
defined by sys/types.h, sys/socket.h, or inttypes.h but also
exposed by other headers under some circumstances. Code moved
from posix/sys/types.h, socket/sys/socket.h, stdlib/inttypes.h
as appropriate.
* posix/bits/types/uint.h
* posix/bits/types/u_int.h
* posix/bits/types/u_intN_t.h
* posix/bits/types/caddr_t.h
* posix/bits/types/daddr_t.h
* posix/bits/types/loff_t.h
* posix/bits/types/register_t.h:
Similarly, but for obsolete BSD-derived types whose canonical
home is sys/types.h. Some of these headers define more than
one type.
* posix/Makefile (headers): Install the above new headers.
Rewrap the list.
* posix/sys/types.h: All definitions of public types now
accomplished using the above new headers. Consolidate
groups of definitions controlled by the same feature
selection macros.
* inet/arpa/inet.h, bits/socket.h
* sysdeps/mach/hurd/bits/socket.h
* sysdeps/unix/sysv/linux/bits/socket.h:
Use bits/types/socklen_t.h.
* dirent/dirent.h: Use bits/types/ino_t.h and bits/types/ino64_t.h.
* grp/grp.h: Use bits/types/gid_t.h.
* io/fcntl.h: Use bits/types/mode_t.h, bits/types/off_t.h,
bits/types/pid_t.h, and bits/types/off64_t.h.
* io/sys/stat.h: Use bits/types/dev_t.h, bits/types/gid_t.h,
bits/types/ino_t.h, bits/types/mode_t.h, bits/types/nlink_t.h,
bits/types/off_t.h, bits/types/uid_t.h, and bits/types/blkcnt_t.h.
* libio/stdio.h: Use bits/types/off_t.h, bits/types/off64_t.h,
and bits/types/ssize_t.h.
* misc/sys/mman.h: Use bits/types/off_t.h and bits/types/mode_t.h.
* misc/sys/select.h: Use bits/types/suseconds_t.h.
* posix/sched.h: Use bits/types/pid_t.h.
* posix/sys/wait.h: Use bits/types/pid_t.h and bits/types/id_t.h.
* posix/unistd.h: Use bits/types/gid_t.h, bits/types/uid_t.h,
bits/types/off_t.h, bits/types/off64_t.h, bits/types/useconds_t.h,
bits/types/intptr_t.h, and bits/types/socklen_t.h.
* pwd/pwd.h: Use bits/types/gid_t.h and bits/types/uid_t.h.
* resource/sys/resource.h: Use bits/types/id_t.h.
* signal/signal.h: Use bits/types/pid_t.h and bits/types/uid_t.h.
* stdlib/monetary.h: Use bits/types/ssize_t.h.
* sysdeps/gnu/utmpx.h: Use bits/types/pid_t.h.
* sysvipc/sys/ipc.h: Use bits/types/uid_t.h, bits/types/gid_t.h,
bits/types/mode_t.h, and bits/types/key_t.h.
* sysvipc/sys/msg.h: Use bits/types/pid_t.h and bits/types/ssize_t.h.
* sysvipc/sys/shm.h: Use bits/types/pid_t.h.
* termios/termios.h: Use bits/types/pid_t.h.
* time/sys/time.h: Use bits/types/suseconds_t.h.
* time/time.h: Use bits/types/pid_t.h.
* sunrpc/rpc/types.h: Consolidate all #includes at the top of
the file. If __BIT_TYPES_DEFINED__ is not defined after
including sys/types.h, also include bits/types/caddr_t.h,
bits/types/daddr_t.h, bits/types/fsid_t.h, and bits/types/u_int.h.
* scripts/check-obsolete-constructs.py (OBSOLETE_TYPE_HDR_RE_): New.
(ObsoleteIndirectDefinitionsAllowed): New; allows inclusion of
bits/types/ headers that define obsolete typedefs, but not
direct definitions of those types.
(ObsoleteNotAllowed, ObsoletePrivateDefinitionsAllowed)
(ObsoletePublicDefinitionsAllowed): Do not allow inclusion of
bits/types/ headers that define obsolete typedefs.
* include/bits/types/blkcnt64_t.h
* include/bits/types/blkcnt_t.h
* include/bits/types/blksize_t.h
* include/bits/types/caddr_t.h
* include/bits/types/daddr_t.h
* include/bits/types/dev_t.h
* include/bits/types/fsblkcnt64_t.h
* include/bits/types/fsblkcnt_t.h
* include/bits/types/fsfilcnt64_t.h
* include/bits/types/fsfilcnt_t.h
* include/bits/types/fsid_t.h
* include/bits/types/gid_t.h
* include/bits/types/id_t.h
* include/bits/types/ino64_t.h
* include/bits/types/ino_t.h
* include/bits/types/intptr_t.h
* include/bits/types/key_t.h
* include/bits/types/loff_t.h
* include/bits/types/mode_t.h
* include/bits/types/nlink_t.h
* include/bits/types/off64_t.h
* include/bits/types/off_t.h
* include/bits/types/pid_t.h
* include/bits/types/register_t.h
* include/bits/types/socklen_t.h
* include/bits/types/ssize_t.h
* include/bits/types/suseconds_t.h
* include/bits/types/u_char.h
* include/bits/types/u_intN_t.h
* include/bits/types/uchar.h
* include/bits/types/uid_t.h
* include/bits/types/useconds_t.h: New wrappers.
|
|
|
|
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
|
|
The tgkill function is sometimes used in crash handlers.
<bits/signal_ext.h> follows the same approach as <bits/unistd_ext.h>
(which was added for the gettid system call wrapper).
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
* All files with FSF copyright notices: Update copyright dates
using scripts/update-copyrights.
* locale/programs/charmap-kw.h: Regenerated.
* locale/programs/locfile-kw.h: Likewise.
|
|
* All files with FSF copyright notices: Update copyright dates
using scripts/update-copyrights.
* locale/programs/charmap-kw.h: Regenerated.
* locale/programs/locfile-kw.h: Likewise.
|
|
XPG4.2 defines the siginfo_t type, but not union sigval or its
contents (which were added in the 1993 edition of POSIX.1), resulting
in namespace violations for sigval, sival_int and sival_ptr for
signal.h and sys/wait.h for that standard because those headers
incorrectly expose those names in that case.
This patch fixes this problem. The public type in this case is union
sigval, but various places in the headers use the sigval_t name for
it; direct uses of union sigval are already properly guarded or in
headers not in XPG4.2. Now, sigval_t, although not a standard name,
does seem to be widely used outside glibc. The approach taken by this
patch is to make installed headers use the name __sigval_t instead.
__sigval_t is then defined to either union sigval or union __sigval
(where union __sigval has __-prefixed member names as well), depending
on whether there are any namespace issues with the union sigval name
and its members. In the case where union __sigval is used, sigval_t
is not defined at all, to avoid the problem of sigval_t having a C++
mangled name that depends on feature test macros. sigval_t is still
defined by signal.h if __USE_MISC (reflecting the nonstandard nature
of that name).
Tested for x86_64.
[BZ #21944]
* signal/bits/types/__sigval_t.h: New file.
* signal/Makefile (headers): Add bits/types/__sigval_t.h.
* signal/bits/types/sigval_t.h: Include <bits/types/__sigval_t.h>
and define sigval_t using __sigval_t.
* include/bits/types/__sigval_t.h: New file.
* bits/types/sigevent_t.h: Include <bits/types/__sigval_t.h>
instead of <bits/types/__sigval_t.h>.
(struct sigevent): Use __sigval_t instead of sigval_t.
* bits/types/siginfo_t.h: Include <bits/types/__sigval_t.h>
instead of <bits/types/__sigval_t.h>.
(siginfo_t): Use __sigval_t instead of sigval_t.
* sysdeps/unix/sysv/linux/bits/types/sigevent_t.h: Include
<bits/types/__sigval_t.h> instead of <bits/types/__sigval_t.h>.
(struct sigevent): Use __sigval_t instead of sigval_t.
* sysdeps/unix/sysv/linux/bits/types/siginfo_t.h: Include
<bits/types/__sigval_t.h> instead of <bits/types/__sigval_t.h>.
(siginfo_t): Use __sigval_t instead of sigval_t.
* signal/signal.h [__USE_MISC]: Include <bits/types/sigval_t.h>.
|
|
Many of the things defined by bits/signum.h are invariant across all
supported operating systems. This patch factors out all of them to a
new header bits/signum-generic.h, which each bits/signum.h will include
and then override whichever things need adjustment. Normally that will
mean, at most, adding or changing a few signal numbers.
A user-visible side effect is that the obsolete signal constant SIGUNUSED
(which is an alias for SIGSYS on all platforms that define it) is no
longer exposed by any version of bits/signum.h.
A side effect only relevant to glibc hackers is that _NSIG is now defined
in terms of __SIGRTMAX, instead of the other way around. This is because
__SIGRTMAX varies from platform to platform, but _NSIG==__SIGRTMAX+1 is
true universally. If your platform doesn't support realtime signals,
leave __SIGRTMAX equal to __SIGRTMIN.
I also added a Linux-specific test to make sure that our signal constants
match the ones in <asm/signal.h>, since we can't use that header (it's
not even vaguely namespace-clean).
* bits/signum-generic.h: Renamed from bits/signum.h.
Add proper multiple include guard and misuse check.
Define __SIGRTMIN = __SIGRTMAX = 32, and define _NSIG = __SIGRTMAX+1.
Move definition of SIGIO to "archaic names for compatibility" section.
* bits/signum.h: New file which just includes bits/signum-generic.h.
* sysdeps/unix/bsd/bits/signum.h
* sysdeps/unix/sysv/linux/bits/signum.h
* sysdeps/unix/sysv/linux/alpha/bits/signum.h
* sysdeps/unix/sysv/linux/hppa/bits/signum.h
* sysdeps/unix/sysv/linux/mips/bits/signum.h
* sysdeps/unix/sysv/linux/sparc/bits/signum.h
Just include <bits/signum-generic.h> and then add or adjust
signal constants. Do not define SIGUNUSED, SIGRTMIN, or SIGRTMAX.
* signal/Makefile: Install bits/signum-generic.h.
* signal/signal.h: Define SIGRTMIN and SIGRTMAX here.
* sysdeps/generic/siglist.h: SIGSYS and SIGWINCH are
universal. Prefer SIGPOLL to SIGIO. Simplify #ifdeffage.
* sysdeps/unix/sysv/linux/tst-signal-numbers.sh: New test.
* sysdeps/unix/sysv/linux/Makefile: Run it.
|
|
The siginterrupt function is XSI-shaded in POSIX. glibc wrongly
declares it in <signal.h> for non-XSI POSIX.1:2008. This patch fixes
the conditionals (moving it into the __USE_XOPEN_EXTENDED ||
__USE_MISC block as the minimum conservative change, although it's not
clear this obsolescent function should be declared by default).
Tested for x86_64.
[BZ #21597]
* signal/signal.h (siginterrupt): Make declaration conditional on
[__USE_XOPEN_EXTENDED || __USE_MISC].
|
|
In POSIX.1:2008, various signal stack symbols - sigaltstack, SS_*,
SIGSTKSZ, MINSIGSTKSZ - are all XSI-shaded. glibc wrongly makes them
visible for non-XSI POSIX. This patch fixes the conditionals, leaving
the symbols available for __USE_MISC as it seems likely some of them
are widely used and should be visible by default. (Note that stack_t
is *not* XSI-shaded and so the conditionals on that are correctly
unchanged.)
Tested for x86_64.
[BZ #21584]
* signal/signal.h: Make includes of <bits/sigstack.h> and
<bits/ss_flags.h> conditional on [__USE_XOPEN_EXTENDED ||
__USE_MISC].
(sigaltstack): Make declaration conditional on
[__USE_XOPEN_EXTENDED || __USE_MISC].
|
|
bsd_signal was added in XPG4.2, so should be declared for
__USE_XOPEN_EXTENDED, instead of the present __USE_XOPEN condition.
This patch fixes the condition accordingly.
Tested for x86_64.
[BZ #21552]
* signal/signal.h (bsd_signal): Declare if [__USE_XOPEN_EXTENDED],
not [__USE_XOPEN].
* conform/Makefile (test-xfail-XPG4/signal.h/conform): Remove.
|
|
sigwait was added to POSIX in 1995; it is not in older POSIX versions
or XPG4 / XPG4.2. Thus it should be declared only if
__USE_POSIX199506; signal.h wrongly declares it for __USE_POSIX.
(sigwaitinfo is correctly conditioned on __USE_POSIX199309.) This
patch fixes the condition on the declaration of sigwait.
Tested for x86_64. Because of other namespace problems this does not
allow any conform/ XFAILs to be removed.
[BZ #21550]
* signal/signal.h (sigwait): Only declare if [__USE_POSIX199506].
|
|
The sigpause function is declared for __USE_XOPEN. As it's new in
XPG4.2 it should be declared only for __USE_XOPEN_EXTENDED. This
patch fixes the declaration accordingly.
Tested for x86_64.
[BZ #21554]
* signal/signal.h (sigpause):: Declare if [__USE_XOPEN_EXTENDED],
not [__USE_XOPEN].
|
|
glibc defines the stack_t type with the tag struct sigaltstack. This
is not permitted by POSIX; sigaltstack is only reserved with file
scope in the namespace of ordinary identifiers, not the tag namespace,
and in the case where stack_t is obtained from ucontext.h rather than
signal.h, it's not reserved with file scope at all.
This patch removes the tag accordingly and updates uses in glibc of
struct sigaltstack. This is similar to the removal of the "struct
siginfo" tag a few years ago: C++ name mangling changes are an
unavoidable consequence. A NEWS item is added to note the changed
mangling. There is inevitably some risk of breaking builds of
anything that relies on the struct sigaltstack name (though the first
few hits I looked at from codesearch.debian.net generally seemed to
involve code that could use the stack_t name conditionally, so
depending on how they determine the conditionals they may work with
glibc not defining the struct tag anyway).
Tested for x86_64 and x86, and with build-many-glibcs.py.
[BZ #21517]
* bits/types/stack_t.h (stack_t): Remove struct tag.
* sysdeps/unix/sysv/linux/bits/types/stack_t.h (stack_t):
Likewise.
* sysdeps/unix/sysv/linux/mips/bits/types/stack_t.h (stack_t):
Likewise.
* debug/segfault.c (install_handler): Use stack_t instead of
struct sigaltstack.
* hurd/hurd/signal.h (struct hurd_sigstate): Likewise.
* hurd/trampoline.c (_hurd_setup_sighandler): Likewise.
* include/signal.h (__sigaltstack): Likwise.
* signal/sigaltstack.c (__sigaltstack): Likewise.
* signal/signal.h (sigaltstack): Likewise.
* sysdeps/mach/hurd/i386/signal-defines.sym
(SIGALTSTACK__SS_SP__OFFSET): Likewise.
(SIGALTSTACK__SS_SIZE__OFFSET): Likewise.
(SIGALTSTACK__SS_FLAGS__OFFSET): Likewise.
* sysdeps/mach/hurd/sigaltstack.c (__sigaltstack): Likewise.
* sysdeps/mach/hurd/sigstack.c (sigstack): Likewise.
* sysdeps/unix/sysv/linux/alpha/sys/procfs.h (struct
elf_prstatus): Likewise.
* sysdeps/unix/sysv/linux/hppa/____longjmp_chk.c (CHECK_SP):
Likewise.
* sysdeps/unix/sysv/linux/ia64/sys/procfs.h (struct elf_prstatus):
Likewise.
* sysdeps/unix/sysv/linux/m68k/____longjmp_chk.c (CHECK_SP):
Likewise.
* sysdeps/unix/sysv/linux/powerpc/sys/procfs.h (struct
elf_prstatus): Likewise.
* sysdeps/unix/sysv/linux/sh/sys/procfs.h (struct elf_prstatus):
Likewise.
* sysdeps/unix/sysv/linux/sys/procfs.h (struct elf_prstatus):
Likewise.
|
|
signal.h defines the sigevent structure and constants if defined
__USE_POSIX199309 || defined __USE_XOPEN_EXTENDED. The
__USE_XOPEN_EXTENDED condition is incorrect; this structure does not
appear in XSI standards before Unix98 (which implies
__USE_POSIX199309). This patch fixes the conditionals accordingly
(the existing conditional is correct for siginfo_t, just not for
sigevent).
Tested for x86_64. This does not allow any conform/ XFAILs to be
removed because of other signal.h namespace bugs.
[BZ #21543]
* signal/signal.h: Only include <bits/types/sigevent_t.h> and
<bits/sigevent-consts.h> if [__USE_POSIX199309], not if
[__USE_XOPEN_EXTENDED].
|
|
The sigstack function was removed in the 2001 edition of POSIX, and
the sigstack structure in the 2008 edition. signal.h wrongly includes
those declarations even for newer POSIX versions. This patch fixes
the conditions, and conform/ expectations, accordingly.
This patch makes the minimum change to when these declarations are
present, leaving them visible for __USE_MISC as they would previously
have been visible by default. Arguably these legacy declarations
should only be visible when an old standard is specifically requested,
but implementing that would require arranging for the various sigstack
implementations to be able to see the struct sigstack type despite it
not being in _GNU_SOURCE in that case.
Tested for x86_64.
[BZ #21511]
* signal/signal.h: Include <bits/types/struct_sigstack.h> only if
[(__USE_XOPEN_EXTENDED && !__USE_XOPEN2K8) || __USE_MISC].
(sigstack): Declare only if [(__USE_XOPEN_EXTENDED &&
!__USE_XOPEN2K) || __USE_MISC].
* conform/data/signal.h-data (struct sigstack): Expect type only
if [!XOPEN2K8 && !POSIX2008].
(sigstack): Expect function only if [XPG42 || UNIX98].
|
|
The types affected are __sig_atomic_t, sig_atomic_t, __sigset_t,
sigset_t, sigval_t, sigevent_t, and siginfo_t. __sig_atomic_t is a
scalar, so it's now directly available from bits/types.h. The others
get bits/types/ headers.
Side effects include: There have been small changes to which
non-signal headers expose which subset of the signal-related types.
A couple of architectures' nested siginfo_t fields had to be renamed
to prevent undesired macro expansion. Internal code that wants to
manipulate signal masks must now include <sigsetops.h> (which is not
installed) and should be aware that __sigaddset, __sigandset,
__sigdelset, __sigemptyset, and __sigorset no longer return a value
(unlike the public API). Relatedly, the public signal.h no longer
declares any of those functions. The obsolete sigmask() macro no
longer has a system-specific definition -- in the cases where it
matters, it didn't work anyway.
New Linux architectures should create bits/siginfo-arch.h and/or
bits/siginfo-consts-arch.h to customize their siginfo_t, rather than
duplicating everything in bits/siginfo.h (which no longer exists).
Add new __SI_* macros if necessary. Ports to other operating systems
are strongly encouraged to generalize this scheme further.
* bits/sigevent-consts.h
* bits/siginfo-consts.h
* bits/types/__sigset_t.h
* bits/types/sigevent_t.h
* bits/types/siginfo_t.h
* sysdeps/unix/sysv/linux/bits/sigevent-consts.h
* sysdeps/unix/sysv/linux/bits/siginfo-consts.h
* sysdeps/unix/sysv/linux/bits/types/__sigset_t.h
* sysdeps/unix/sysv/linux/bits/types/sigevent_t.h
* sysdeps/unix/sysv/linux/bits/types/siginfo_t.h:
New system-dependent bits headers.
* sysdeps/unix/sysv/linux/bits/siginfo-arch.h
* sysdeps/unix/sysv/linux/bits/siginfo-consts-arch.h
* sysdeps/unix/sysv/linux/ia64/bits/siginfo-arch.h
* sysdeps/unix/sysv/linux/ia64/bits/siginfo-consts-arch.h
* sysdeps/unix/sysv/linux/mips/bits/siginfo-arch.h
* sysdeps/unix/sysv/linux/sparc/bits/siginfo-arch.h
* sysdeps/unix/sysv/linux/tile/bits/siginfo-arch.h
* sysdeps/unix/sysv/linux/tile/bits/siginfo-consts-arch.h
* sysdeps/unix/sysv/linux/x86/bits/siginfo-arch.h:
New Linux-only system-dependent bits headers.
* signal/bits/types/sig_atomic_t.h
* signal/bits/types/sigset_t.h
* signal/bits/types/sigval_t.h:
New non-system-dependent bits headers.
* sysdeps/generic/sigsetops.h
* sysdeps/unix/sysv/linux/sigsetops.h:
New internal headers.
* include/bits/types/sig_atomic_t.h
* include/bits/types/sigset_t.h
* include/bits/types/sigval_t.h:
New wrappers.
* signal/sigsetops.h
* bits/siginfo.h
* bits/sigset.h
* sysdeps/unix/sysv/linux/bits/siginfo.h
* sysdeps/unix/sysv/linux/bits/sigset.h
* sysdeps/unix/sysv/linux/ia64/bits/siginfo.h
* sysdeps/unix/sysv/linux/mips/bits/siginfo.h
* sysdeps/unix/sysv/linux/s390/bits/siginfo.h
* sysdeps/unix/sysv/linux/sparc/bits/siginfo.h
* sysdeps/unix/sysv/linux/tile/bits/siginfo.h
* sysdeps/unix/sysv/linux/x86/bits/siginfo.h:
Deleted.
* signal/Makefile, sysdeps/unix/sysv/linux/Makefile:
Update lists of installed headers.
* posix/bits/types.h: Define __sig_atomic_t here.
* signal/signal.h: Use the new bits headers; no need to handle
__need_sig_atomic_t nor __need_sigset_t. Don't use __sigmask
to define sigmask.
* include/signal.h: No need to handle __need_sig_atomic_t
nor __need_sigset_t. Don't define __sigemptyset.
* io/sys/poll.h, setjmp/setjmp.h
* sysdeps/arm/sys/ucontext.h, sysdeps/generic/sys/ucontext.h
* sysdeps/i386/sys/ucontext.h, sysdeps/m68k/sys/ucontext.h
* sysdeps/mach/hurd/i386/bits/sigcontext.h
* sysdeps/mips/sys/ucontext.h, sysdeps/powerpc/novmxsetjmp.h
* sysdeps/pthread/bits/sigthread.h
* sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
* sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
* sysdeps/unix/sysv/linux/mips/sys/ucontext.h
* sysdeps/unix/sysv/linux/nios2/sys/ucontext.h
* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
* sysdeps/unix/sysv/linux/s390/sys/ucontext.h
* sysdeps/unix/sysv/linux/sh/sys/ucontext.h
* sysdeps/unix/sysv/linux/sparc/sys/ucontext.h
* sysdeps/unix/sysv/linux/tile/sys/ucontext.h
* sysdeps/unix/sysv/linux/x86/sys/ucontext.h:
Use bits/types/__sigset_t.h.
* misc/sys/select.h, posix/spawn.h
* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
* sysdeps/unix/sysv/linux/sys/epoll.h
* sysdeps/unix/sysv/linux/sys/signalfd.h:
Use bits/types/sigset_t.h.
* resolv/netdb.h, rt/mqueue.h: Use bits/types/sigevent_t.h.
* rt/aio.h: Use bits/types/sigevent_t.h and bits/sigevent-consts.h.
* socket/sys/socket.h: Don't include bits/sigset.h.
* login/utmp_file.c, shadow/lckpwdf.c, signal/sigandset.c
* signal/sigisempty.c, stdlib/abort.c, sysdeps/posix/profil.c
* sysdeps/posix/sigignore.c, sysdeps/posix/sigintr.c
* sysdeps/posix/signal.c, sysdeps/posix/sigset.c
* sysdeps/posix/sprofil.c, sysdeps/posix/sysv_signal.c
* sysdeps/unix/sysv/linux/nptl-signals.h:
Include sigsetops.h.
* signal/sigaddset.c, signal/sigandset.c, signal/sigdelset.c
* signal/sigorset.c, stdlib/abort.c, sysdeps/posix/sigignore.c
* sysdeps/posix/signal.c, sysdeps/posix/sigset.c:
__sigaddset, __sigandset, __sigdelset, __sigemptyset, __sigorset
now return no value.
* signal/sigaddset.c, signal/sigdelset.c, signal/sigismem.c
Include <errno.h>, <signal.h>, and <sigsetops.h> instead of
"sigsetops.h".
* signal/sigsetops.c: Explicitly define __sigismember,
__sigaddset, and __sigdelset as compatibility symbols.
* signal/Versions: Correct commentary on __sigpause,
__sigaddset, __sigdelset, __sigismember.
* inet/rcmd.c: Include sigsetops.h. Convert old code using
__sigblock/__sigsetmask to use __sigprocmask and friends.
|
|
bits/sigstack.h contains four things: the legacy struct sigstack type,
the preferred stack_t type, the SS_* enum values and macros for signal
stack sizes.
These vary in different ways between glibc configurations; in
particular, the stack sizes vary much more than any of the other
pieces. Furthermore, these pieces have different standard namespace
rules for when they should be visible (not currently visible in
conform/ results both because the relevant tests are XFAILed for
sys/ucontext.h namespace issues, and because some of the expectations
are incorrect in the same way as the headers, e.g. neither
expectations nor headers reflect that current POSIX no longer has
either the sigstack function or the sigstack structure).
To reduce duplication of identical definitions, and facilitate
namespace fixes without requiring the same feature test macro
conditions to be repeated in many versions of the same header, this
patch splits bits/sigstack.h up into four headers. It keeps the stack
size macros, while new bits/types/struct_sigstack.h,
bits/types/stack_t.h and bits/ss_flags.h are added for the other
pieces. bits/types/struct_sigstack.h is the same everywhere,
bits/types/stack_t.h has three variants different in the order of the
structure elements (generic = MIPS Linux, and other Linux), and
bits/ss_flags.h has generic and Linux variants.
This patch includes the new headers everywhere that included
<bits/sigstack.h>, so should cause no difference to what any public
header defines. Subsequent namespace fixes would then remove or
condition some of those includes.
There should be no conflicts with Zack's changes to signal.h types,
beyond the trivial conflict of both making additions to
signal/Makefile's headers list; the two patches affect disjoint sets
of types and other definitions.
Tested for x86_64 and x86, and with build-many-glibcs.py.
* bits/ss_flags.h: New file.
* bits/types/stack_t.h: Likewise.
* include/bits/types/struct_sigstack.h: Likewise.
* signal/bits/types/struct_sigstack.h: Likewise.
* sysdeps/unix/sysv/linux/bits/ss_flags.h: Likewise.
* sysdeps/unix/sysv/linux/bits/types/stack_t.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/types/stack_t.h: Likewise.
* signal/Makefile (headers): Add bits/types/struct_sigstack.h,
bits/types/stack_t.h and bits/ss_flags.h.
* signal/signal.h [__USE_XOPEN_EXTENDED || __USE_XOPEN2K8]:
Include <bits/types/struct_sigstack.h>, <bits/types/stack_t.h> and
<bits/ss_flags.h>.
* bits/sigstack.h (struct sigstack): Remove.
(stack_t): Likewise.
(SS_ONSTACK): Likewise.
(SS_DISABLE): Likewise.
* sysdeps/unix/sysv/linux/aarch64/bits/sigstack.h
(struct sigstack): Likewise.
(stack_t): Likewise.
(SS_ONSTACK): Likewise.
(SS_DISABLE): Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/sigstack.h (struct sigstack):
Likewise.
(stack_t): Likewise.
(SS_ONSTACK): Likewise.
(SS_DISABLE): Likewise.
* sysdeps/unix/sysv/linux/bits/sigstack.h (struct sigstack):
Likewise.
(stack_t): Likewise.
(SS_ONSTACK): Likewise.
(SS_DISABLE): Likewise.
* sysdeps/unix/sysv/linux/mips/bits/sigstack.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/sigstack.h (struct sigstack):
Likewise.
(stack_t): Likewise.
(SS_ONSTACK): Likewise.
(SS_DISABLE): Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
(struct sigstack): Likewise.
(stack_t): Likewise.
(SS_ONSTACK): Likewise.
(SS_DISABLE): Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/sigstack.h (struct sigstack):
Likewise.
(stack_t): Likewise.
(SS_ONSTACK): Likewise.
(SS_DISABLE): Likewise.
* sysdeps/arm/sys/ucontext.h: Include
<bits/types/struct_sigstack.h>, <bits/types/stack_t.h> and
<bits/ss_flags.h>.
* sysdeps/generic/sys/ucontext.h: Likewise.
* sysdeps/i386/sys/ucontext.h: Likewise.
* sysdeps/m68k/sys/ucontext.h: Likewise.
* sysdeps/mips/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/alpha/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/arm/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/hppa/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/m68k/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/nios2/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/sh/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/tile/sys/ucontext.h: Likewise.
* sysdeps/unix/sysv/linux/x86/sys/ucontext.h: Likewise.
|
|
signal.h declares bsd_signal for __USE_XOPEN. But this function was
obsoleted in the 2001 edition of POSIX and removed in the 2008
edition, so it should not be declared when the 2008 edition is in use.
This patch fixes the conditionals accordingly. (This does not fix any
conform/ test failures because of other namespace issues in signal.h.)
Tested for x86_64.
[BZ #21445]
* signal/signal.h [__USE_XOPEN2K8] (bsd_signal): Do not declare.
|
|
glibc headers include some code (not particularly consistent or
systematic) to put various declarations in C++ namespaces std and
__c99, if _GLIBCPP_USE_NAMESPACES is defined.
As noted in <https://gcc.gnu.org/ml/libstdc++/2017-03/msg00025.html>,
this macro was removed from libstdc++ in 2000. I don't expect
compilation with such old versions of libstdc++ to work with current
glibc headers anyway (whereas old *binaries* are expected to stay
working with current glibc); this patch (which should be a no-op with
any libstdc++ version postdating that removal) removes all this code
from the glibc headers.
The begin-end-check.pl test, whose comments say it is about checking
these namespace macro calls, is also removed. The code in that test
would have covered __BEGIN_DECLS / __END_DECLS as well, but if those
weren't properly matched it would show up with the
check-installed-headers-cxx tests, so I don't think there is an actual
use for keeping begin-end-check.pl with the namespace code removed.
Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).
* misc/sys/cdefs.h (__BEGIN_NAMESPACE_STD): Remove macro.
(__END_NAMESPACE_STD): Likewise.
(__USING_NAMESPACE_STD): Likewise.
(__BEGIN_NAMESPACE_C99): Likewise.
(__END_NAMESPACE_C99): Likewise.
(__USING_NAMESPACE_C99): Likewise.
* math/math.h (_Mdouble_BEGIN_NAMESPACE): Do not define and
undefine macro.
(_Mdouble_END_NAMESPACE): Likewise.
* ctype/ctype.h: Do not handle C++ namespaces.
* libio/bits/stdio-ldbl.h: Likewise.
* libio/stdio.h: Likewise.
* locale/locale.h: Likewise.
* math/bits/mathcalls.h: Likewise.
* setjmp/setjmp.h: Likewise.
* signal/signal.h: Likewise.
* stdlib/bits/stdlib-float.h: Likewise.
* stdlib/bits/stdlib-ldbl.h: Likewise.
* stdlib/stdlib.h: Likewise.
* string/string.h: Likewise.
* sysdeps/x86/fpu/bits/mathinline.h: Likewise.
* time/bits/types/clock_t.h: Likewise.
* time/bits/types/struct_tm.h: Likewise.
* time/bits/types/time_t.h: Likewise.
* time/time.h: Likewise.
* wcsmbs/bits/wchar-ldbl.h: Likewise.
* wcsmbs/uchar.h: Likewise.
* wcsmbs/wchar.h: Likewise.
[_GLIBCPP_USE_NAMESPACES] (wint_t): Remove conditional definition.
* wctype/wctype.h: Do not handle C++ namespaces.
* scripts/begin-end-check.pl: Remove.
* Makefile (installed-headers): Likewise.
(tests-special): Do not add $(objpfx)begin-end-check.out.
($(objpfx)begin-end-check.out): Remove.
|
|
|
|
Many headers are expected to expose a subset of the type definitions
in time.h. time.h has a whole bunch of messy logic for conditionally
defining some its types and structs, but, as best I can tell, this
has never worked 100%. In particular, __need_timespec is ineffective
if _TIME_H has already been defined, which means that if you compile
#include <time.h>
#include <sched.h>
with e.g. -fsyntax-only -std=c89 -Wall -Wsystem-headers, you will get
In file included from test.c:2:0:
/usr/include/sched.h:74:57: warning: "struct timespec" declared inside
parameter list will not be visible outside of this definition or declaration
extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
^~~~~~~~
And if you want to _use_ sched_rr_get_interval in a TU compiled that
way, you're hosed.
This patch replaces all of that with small bits/types/TYPE.h headers
as introduced earlier. time.h and bits/time.h are now *much* simpler,
and a lot of other headers are slightly simpler.
* time/time.h, bits/time.h, sysdeps/unix/sysv/linux/bits/time.h:
Remove all logic conditional on __need macros. Move all the
conditionally defined types to their own headers...
* time/bits/types/clock_t.h: Define clock_t here.
* time/bits/types/clockid_t.h: Define clockid_t here.
* time/bits/types/struct_itimerspec.h: Define struct itimerspec here.
* time/bits/types/struct_timespec.h: Define struct timespec here.
* time/bits/types/struct_timeval.h: Define struct timeval here.
* time/bits/types/struct_tm.h: Define struct tm here.
* time/bits/types/time_t.h: Define time_t here.
* time/bits/types/timer_t.h: Define timer_t here.
* time/Makefile: Install the new headers.
* bits/resource.h, io/fcntl.h, io/sys/poll.h, io/sys/stat.h
* io/utime.h, misc/sys/select.h, posix/sched.h, posix/sys/times.h
* posix/sys/types.h, resolv/netdb.h, rt/aio.h, rt/mqueue.h
* signal/signal.h, pthread/semaphore.h, sysdeps/nptl/pthread.h
* sysdeps/unix/sysv/linux/alpha/bits/resource.h
* sysdeps/unix/sysv/linux/alpha/sys/acct.h
* sysdeps/unix/sysv/linux/bits/resource.h
* sysdeps/unix/sysv/linux/bits/timex.h
* sysdeps/unix/sysv/linux/mips/bits/resource.h
* sysdeps/unix/sysv/linux/net/ppp_defs.h
* sysdeps/unix/sysv/linux/sparc/bits/resource.h
* sysdeps/unix/sysv/linux/sys/acct.h
* sysdeps/unix/sysv/linux/sys/timerfd.h
* sysvipc/sys/msg.h, sysvipc/sys/sem.h, sysvipc/sys/shm.h
* time/sys/time.h, time/sys/timeb.h
Use the new bits/types headers.
* include/time.h: Remove __need logic.
* include/bits/time.h
* include/bits/types/clock_t.h, include/bits/types/clockid_t.h
* include/bits/types/time_t.h, include/bits/types/timer_t.h
* include/bits/types/struct_itimerspec.h
* include/bits/types/struct_timespec.h
* include/bits/types/struct_timeval.h
* include/bits/types/struct_tm.h:
New wrapper headers.
|
|
|
|
signal.h declares psignal and psiginfo if __USE_XOPEN2K - that is, for
the 2001 edition of POSIX. These functions were actually added in the
2008 edition (as indicated in the header comments). This patch fixes
the header conditionals. This fixes some linknamespace test failures
because psiginfo uses fmemopen, which is also new in the 2008 edition,
so before the header fix this appeared to the linknamespace tests as a
2001 function bringing in references to a 2008 function. The problem
also appeared in conformtest header namespace test results (the
conformtest data has correct conditionals for when these functions
should be visible), but the affected headers still have other
namespace problems so this doesn't fix any of those XFAILs.
Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).
[BZ #18483]
* signal/signal.h [__USE_XOPEN2K] (psignal): Change condition to
[__USE_XOPEN2K8]. Remove redundant #endif.
[__USE_XOPEN2K] (psiginfo): Change condition to [__USE_XOPEN2K8].
Remove redundant #if.
* conform/Makefile (test-xfail-XOPEN2K/signal.h/linknamespace):
Remove variable.
(test-xfail-XOPEN2K/sys/wait.h/linknamespace): Likewise.
(test-xfail-XOPEN2K/ucontext.h/linknamespace): Likewise.
|
|
|
|
|
|
This patch makes the installed signal.h declare __sigpause only when
necessary (when a macro definition of sigpause makes use of
__sigpause), rather than unconditionally. This fixes false positives
in the linknamespace tests by making it visible to those tests that no
use of ISO C functionality will actually bring in the definition of
__sigpause and so bring in the other symbols defined in the same
object. There is no bug filed in Bugzilla because this is fixing
false positives rather than any user-visible bug.
Tested for x86_64 (testsuite, and that installed stripped shared
libraries are unchanged by this patch).
* signal/signal.h (__sigpause): Only declare if [__USE_XOPEN &&
!__GNUC__].
* include/signal.h (__sigpause): Move declaration above call to
libc_hidden_proto.
* conform/Makefile (test-xfail-ISO/signal.h/linknamespace): Remove
variable.
(test-xfail-ISO99/signal.h/linknamespace): Likewise.
(test-xfail-ISO11/signal.h/linknamespace): Likewise.
|
|
This patch completes the headers cleanup consequent on removal of
_BSD_SOURCE and _SVID_SOURCE (apart from any subsequent deprecations):
* #endif conditionals that referred to BSD or SVID are updated.
* Redundant __USE_* tests in cases involving __USE_MISC are removed.
This includes cases such as __USE_MISC || __USE_ISOC99, where
__USE_MISC is redundant (because __USE_MISC is only ever defined in
the default / _DEFAULT_SOURCE / _GNU_SOURCE case, when __USE_ISOC99
is also defined; the same applies to the non-XSI-extended POSIX
versions), and cases involving __USE_GNU, where __USE_GNU is
redundant (because if __USE_GNU is defined, so are the other __USE_*
macros). There may well be other cases of __USE_FOO || __USE_BAR
tests that could be simplified because one macro implies the other;
this patch only addresses cases involving __USE_MISC.
Tested x86_64.
* bits/fcntl.h [__USE_MISC]: Remove redundant conditionals.
* bits/sigaction.h [__USE_MISC]: Likewise.
* bits/waitstatus.h: Update #endif comments.
* ctype/ctype.h: Likewise.
* dirent/dirent.h: Likewise.
[__USE_MISC]: Remove redundant conditionals.
* grp/grp.h: Update #endif comments.
[__USE_GNU]: Remove redundant conditionals.
[__USE_MISC]: Likewise.
* inet/netinet/in.h [__USE_GNU]: Likewise.
* io/sys/stat.h [__USE_MISC]: Likewise.
* libio/bits/stdio-ldbl.h [__USE_MISC]: Likewise.
* libio/bits/stdio.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* libio/bits/stdio2.h [__USE_MISC]: Likewise.
* libio/stdio.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* math/bits/math-finite.h [__USE_MISC]: Likewise.
* math/bits/mathcalls.h [__USE_MISC]: Likewise.
* math/math.h: Update #else and #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* misc/sys/uio.h: Update #endif comments.
* posix/bits/unistd.h [__USE_MISC]: Remove redundant conditionals.
* posix/glob.h [__USE_MISC]: Likewise.
* posix/sys/types.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* posix/sys/wait.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* posix/unistd.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* pwd/pwd.h [__USE_GNU]: Likewise.
[__USE_MISC]: Likewise.
* resolv/netdb.h [__USE_GNU]: Likewise.
* signal/signal.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* stdlib/stdlib.h: Update #else and #endif comments.
[__USE_MISC]: Remove redundant conditionals.
[__USE_GNU]: Likewise.
* string/bits/string2.h [__USE_MISC]: Likewise.
* string/string.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h [__USE_MISC]:
Likewise.
* sysdeps/mach/hurd/bits/fcntl.h [__USE_MISC]: Likewise.
* sysdeps/mach/hurd/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/sigaction.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/stat.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/bits/fcntl-linux.h: Update #endif
comments.
[__USE_MISC]: Remove redundant conditionals.
* sysdeps/unix/sysv/linux/bits/in.h [__USE_GNU]: Likewise.
* sysdeps/unix/sysv/linux/bits/sigaction.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/bits/socket.h [__USE_GNU]: Likewise.
* sysdeps/unix/sysv/linux/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/sigaction.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/m68k/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/sigaction.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/mips/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/stat.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/s390/bits/sigaction.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/s390/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/stat.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/x86/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/x86/bits/string.h: Update #endif comments.
* sysdeps/x86/fpu/bits/mathinline.h [__USE_MISC]: Remove redundant
conditionals.
* time/sys/time.h: Update #endif comments.
* time/time.h: Likewise.
[__USE_MISC]: Remove redundant conditionals.
|
|
This patch cleans up following the obsoletion of _BSD_SOURCE and
_SVID_SOURCE by combining __USE_BSD and __USE_SVID into __USE_MISC.
The only non-mechanical part of this patch is the changes to
features.h; everything else is simple substitution of __USE_MISC for
the old macros. Thus, this patch leaves obviously redundant
conditionals such as "defined __USE_MISC || defined __USE_MISC", and
does not update #endif comments where they referred to BSD or SVID in
words instead of the literal macro name. This is intended to
facilitate patch review by separating the less mechanical changes from
these purely mechanical changes into a separate patch. (I do intend
to integrate all the changes from
<https://sourceware.org/ml/libc-alpha/2013-12/msg00226.html>, which I
believe includes all the trailing comment updates, in subsequent
patches.)
Tested x86_64.
* include/features.h (__USE_BSD): Remove macro definitions.
(__USE_SVID): Likewise.
(_BSD_SOURCE): Likewise.
(_SVID_SOURCE): Likewise.
[!defined _BSD_SOURCE && !defined _SVID_SOURCE]: Remove condition
from definition of _DEFAULT_SOURCE.
[_BSD_SOURCE || _SVID_SOURCE]: Change condition to
[_DEFAULT_SOURCE].
* bits/fcntl.h [__USE_BSD]: Change condition to [__USE_MISC].
* bits/mman.h [__USE_BSD]: Likewise.
* bits/termios.h [__USE_BSD]: Likewise.
* bits/waitstatus.h [__USE_BSD]: Likewise.
* ctype/ctype.h [__USE_SVID]: Likewise.
* dirent/dirent.h [__USE_BSD]: Likewise.
* grp/grp.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* inet/netinet/igmp.h [__USE_BSD]: Likewise.
* io/fcntl.h [__USE_BSD]: Likewise.
* io/ftw.h [__USE_BSD]: Likewise.
* io/sys/stat.h [__USE_BSD]: Likewise.
* libio/bits/stdio-ldbl.h [__USE_BSD]: Likewise.
* libio/bits/stdio2.h [__USE_BSD]: Likewise.
* libio/stdio.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* math/math.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* misc/bits/syslog-ldbl.h [__USE_BSD]: Likewise.
* misc/bits/syslog.h [__USE_BSD]: Likewise.
* misc/search.h [__USE_SVID]: Likewise.
* misc/sys/mman.h [__USE_BSD]: Likewise.
* misc/sys/syslog.h [__USE_BSD]: Likewise.
* misc/sys/uio.h [__USE_BSD]: Likewise.
* posix/bits/unistd.h [__USE_BSD]: Likewise.
* posix/glob.h [__USE_BSD]: Likewise.
* posix/regex.h [__USE_BSD]: Likewise.
* posix/sys/types.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* posix/sys/utsname.h [__USE_SVID]: Likewise.
* posix/sys/wait.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* posix/unistd.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* pwd/pwd.h [__USE_SVID]: Likewise.
* resolv/netdb.h [__USE_BSD]: Likewise.
* setjmp/setjmp.h [__USE_BSD]: Likewise.
* signal/signal.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* socket/sys/socket.h [__USE_BSD]: Likewise.
* stdlib/fmtmsg.h [__USE_SVID]: Likewise.
* stdlib/stdlib.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* string/bits/string2.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* string/bits/string3.h [__USE_BSD]: Likewise.
* string/endian.h [__USE_BSD]: Likewise.
* string/string.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* string/strings.h [__USE_BSD]: Likewise.
* sysdeps/generic/netinet/ip.h [__USE_BSD]: Likewise.
* sysdeps/gnu/netinet/ip_icmp.h [__USE_BSD]: Likewise.
* sysdeps/mach/hurd/bits/fcntl.h [__USE_BSD]: Likewise.
* sysdeps/mach/hurd/bits/stat.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/mman.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/bits/mman-linux.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/bits/sys_errlist.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/bits/termios.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/netinet/if_ether.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/netinet/if_fddi.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/netinet/if_tr.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/x86/bits/string.h [__USE_BSD]: Likewise.
* sysvipc/sys/ipc.h [__USE_SVID]: Likewise.
* termios/termios.h [__USE_BSD]: Likewise.
* time/sys/time.h [__USE_BSD]: Likewise.
* time/time.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_BSD]: Change
condition to [__USE_MISC].
|
|
|
|
|
|
|
|
|
|
|
|
No more __const.
|
|
|
|
open_memstream, and vdprintf are in POSIX 2008.
|
|
* locale/xlocale.h: Define locale_t type.
* locale/locale.h: duplocale, freelocale, newlocale, uselocale are
in POSIX 2008. Don't define locale_t here.
* stdlib/monetary.h: strfmon_l is in POSIX 2008.
* signal/signal.h: Declare psignal and psiginfo for POSIX 2008.
* stdio-common/psiginfo.c: New file.
* stdio-common/psiginfo-data.h: New file.
* stdio-common/psiginfo-define.h: New file.
* stdio-common/Makefile (routines): Add psiginfo.
* stdio-common/Versions: Export psiginfo for GLIBC_2.10.
|
|
* signal/signal.h <__USE_BSD || __USE_XOPEN_EXTENDED>: Define
__need_size_t and include stddef.h.
* sysvipc/sys/msg.h: Likewise.
* posix/sched.h: Likewise.
* hurd/hurd/signal.h (__need_size_t): Define.
* CONFORMANCE: ctype.h and wctype.h no longer define size_t,
neither does signal.h in pedantic ISO C namespaces. stdio.h
no longer defines wint_t or wchar_t.
|
|
2004-11-20 Jakub Jelinek <jakub@redhat.com>
* signal/signal.h (__sysv_signal, sysv_signal, signal, bsd_signal,
ssignal): Remove __nonnull attribute.
2004-11-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* sysdeps/unix/sysv/linux/sh/sys/procfs.h: New file.
|
|
* signal/signal.h: Add nonnull attributes.
|
|
2004-11-20 Ulrich Drepper <drepper@redhat.com>
* signal/signal.h: Add deprecated attributes to sigstack,
sigpause, sigblock, sigsetmask, siggetmask.
|
|
* include/atomic.h: Define atomic_increment_val, atomic_decrement_val,
and atomic_dealy is not already defined.
* sysdeps/i386/i486/bits/atomic.h: Define atomic_delay.
* sysdeps/x86_64/bits/atomic.h: Likewise.
* miscd/sys/cdefs.h (__NTH): New macro.
(__THROW): Define using nothrow attribute for C code and gcc >= 3.2.
(__REDIRECT_NTH): New macro.
* argp/argp.h: Use __NTH and __REDIRECT_NTH where necessary.
* ctype/ctype.h: Likewise.
* dirent/dirent.h: Likewise.
* io/fcntl.h: Likewise.
* io/sys/sendfile.h: Likewise.
* io/sys/stat.h: Likewise.
* io/sys/statfs.h: Likewise.
* io/sys/statvfs.h: Likewise.
* libio/bits/stdio.h: Likewise.
* misc/sys/mman.h: Likewise.
* posix/unistd.h: Likewise.
* resource/sys/resource.h: Likewise.
* rt/aio.h: Likewise.
* signal/signal.h: Likewise.
* stdlib/stdlib.h: Likewise.
* string/argz.h: Likewise.
* string/string.h: Likewise.
* sysdeps/generic/inttypes.h: Likewise.
* sysdeps/i386/fpu/bits/mathinline.h: Likewise.
* sysdeps/powerpc/fpu/bits/mathinline.h: Likewise.
* sysdeps/s390/fpu/bits/mathinline.h: Likewise.
* sysdeps/x86_64/fpu/bits/mathinline.h: Likewise.
* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
* sysdeps/unix/sysv/linux/bits/sys/sysmacros.h: Likewise.
* wcsmbs/wchar.h: Likewise.
* sysdeps/generic/glob.c: Use __PMT isntead of __P where appropriate.
* resolv/gethnamaddr.c (getanswer): Remove __P use in variable
definition.
* io/sys/poll.h: Remove __THROW from poll prototype, it's a
cancellation point.
|
|
2004-07-23 Ulrich Drepper <drepper@redhat.com>
* posix/bits/posix1_lim.h: Fix values for _POSIX_CHILD_MAX and
_POSIX_OPEN_MAX. Add _POSIX_HOST_NAME_MAX, _POSIX_SYMLINK_MAX,
_POSIX_SYMLOOP_MAX, and _POSIX_RE_DUP_MAX.
Reported by Andrew Josey.
* include/features.h: Document _POSIX_C_SOURCE == 200112L.
* grp/grp.h: Define gid_t if __USE_XOPEN2K is defined.
* pwd/pwd.h: Define uid_t and gid_t if __USE_XOPEN2K is defined.
* io/sys/stat.h: Define dev_t, gid_t, ino_t, mode_t, nlink_t,
off_t, time_t, and uid_t if __USE_XOPEN2K is defined.
* signal/signal.h: Define pid_t if __USE_XOPEN2K is defined.
* posix/unistd.h: Define gid_t, off_t, pid_t, uid_t, and
useconds_t if __USE_XOPEN2K is defined.
* io/utime.h: Define time_t if __USE_XOPEN2K is defined.
* libio/stdio.h: Declare fseeko and ftello if __USE_XOPEN2K is defined.
|
|
2004-05-09 Ulrich Drepper <drepper@redhat.com>
* sysdeps/generic/sigpause.c: Prevent sigpause prototype.
* sysdeps/posix/sigpause.c: Likewise.
* signal/signal.h: Don't define sigpause macro unless needed.
|
|
2004-05-08 Ulrich Drepper <drepper@redhat.com>
* signal/signal.h: Use BSD sigpause only if BSD behavior is preferred.
|
|
* misc/Makefile (CFLAGS-getpass.c): Add -fexceptions.
* misc/getpass.c (getpass): Add cleanup handler to ensure the
stream is closed even if the thread is canceled.
(call_fclose): New function.
* posix/unistd.h: Remove __THROW from getpass prorotype.
* posix/Makefile (CFLAGS-getopt.c): Add -fexceptions.
* signal/signal.h (psignal): Remove __THROW.
* stdio-common/Makefile (CFLAGS-psignal.c): Add -fexceptions.
|
|
|