This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[glibc/zack/more-obsolete-typedefs] (9 commits) Don’t conditionalize declarations of ldiv_t, lldiv_t, __g


The branch 'zack/more-obsolete-typedefs' was updated to point to:

 69411ab... Donâ??t conditionalize declarations of ldiv_t, lldiv_t, __g

It previously pointed to:

 e7c0fed... Donâ??t conditionalize declarations of ldiv_t, lldiv_t, __g

Diff:

!!! WARNING: THE FOLLOWING COMMITS ARE NO LONGER ACCESSIBLE (LOST):
-------------------------------------------------------------------

  e7c0fed... Donâ??t conditionalize declarations of ldiv_t, lldiv_t, __g
  98915ac... Create bits/types headers for most remaining __T_defined ma
  cc1092e... Clean up bits/types.h.
  e5d3ab6... Simplify definition of __time64_t.
  b4d8c8a... Add caddr_t, daddr_t, and loff_t to the set of obsolete typ
  9a6af55... sys/types.h: Donâ??t define u_intN_t or register_t unless _
  50a443c... Define register_t using bits/typesizes.h macros.
  629dea5... Move most headers installed by top-level Makefile to misc/.

commit e7c0fede8c24783a6bf58c4668a85fce1fa12efb
Author: Zack Weinberg <zackw@panix.com>
Date:   Sat Mar 9 21:18:56 2019 -0500

    Donâ??t conditionalize declarations of ldiv_t, lldiv_t, __gwchar_t.
    
    The declarations of ldiv_t, lldiv_t, and __gwchar_t are all wrapped in
    __foo_t_defined conditionals, despite there being only one header in
    glibc that declares them.  I checked codesearch.debian.net and only
    found one other program that refers to the __foo_t_defined
    conditionals: u-boot provides its own definition of ldiv_t if
    __ldiv_t_defined is not defined by stdlib.h.  I conclude that the
    conditionals are not necessary, but the definitions of
    __ldiv_t_defined and __lldiv_t_defined should be preserved.
    
    	* stdlib/inttypes.h: Unconditionally define __gwchar_t.
            Donâ??t define ____gwchar_t_defined.
            * stdlib/stdlib.h: Unconditionally define ldiv_t.
            Condition lldiv_t only on __USE_ISOC99.

commit 98915ac3c3da47f529bf1f39bfa4e541dc447a45
Author: Zack Weinberg <zackw@panix.com>
Date:   Sat Mar 9 20:54:02 2019 -0500

    Create bits/types headers for most remaining __T_defined macros.
    
    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.

commit cc1092eda9c4b41a7845f228d92c29a2519727e9
Author: Zack Weinberg <zackw@panix.com>
Date:   Sat Mar 9 18:01:48 2019 -0500

    Clean up bits/types.h.
    
    This makes four linked changes to bits/types.h.  First, we use
    __(u)?int(16|32|64)_t to define __[SU](16|32|64)_TYPE.  In addition
    to reducing the amount of ifdeffage, this means __STD_TYPE is no longer
    necessary, since gcc -std=c89 will complain about â??typedef long long foo_tâ??
    but not â??typedef __int64_t foo_tâ??, even if the underlying type
    of __int64_t is long long.
    
    Second, we eliminate __UQUAD_TYPE and __SQUAD_TYPE from the set of
    macros bits/typesizes.h should use to define __FOO_T_TYPE macros,
    since they are always the same as __U64_TYPE and __S64_TYPE
    respectively.
    
    Third, we remove __u_char, __u_short, __u_int, __u_long, __u_quad_t,
    and __quad_t, we add __uintptr_t, and we define __intmax_t and
    __uintmax_t as __int64_t and __uint64_t.
    
    Fourth, we reorganize the list of typedefs into groups by the
    standard (if any) that defines them, and sort them alphabetically within
    each group.
    
    	* posix/bits/types.h: Move #error for __WORDSIZE neither 32 nor 64
    	to first group of conditionals on __WORDSIZE, and make it more
    	explicit.  Update commentary.  Define all __foo_t types with
    	regular â??typedefâ??.  Reorganize all __foo_t types into the same
    	groups that sys/types.h uses.
    	(__u_char, __u_short, __u_int, __u_long, __quad_t, __u_quad_t)
    	(__UQUAD_TYPE, __SQUAD_TYPE, __STD_TYPE): Donâ??t define.
    	(__S16_TYPE): Define unconditionally as __int16_t.
    	(__U16_TYPE): Define unconditionally as __uint16_t.
    	(__S32_TYPE): Define unconditionally as __int32_t.
    	(__U32_TYPE): Define unconditionally as __uint32_t.
    	(__S64_TYPE): Define unconditionally as __int64_t.
    	(__U64_TYPE): Define unconditionally as __uint64_t.
    	(__intmax_t): Define unconditionally as __int64_t.
    	(__uintmax_t): Define unconditionally as __uint64_t.
            (__uintptr_t): New typedef.
    
    	* bits/time64.h
    	* bits/typesizes.h
    	* sysdeps/mach/hurd/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/generic/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/mips/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/s390/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/x86/bits/typesizes.h:
    	Replace all uses of __UQUAD_TYPE with __U64_TYPE, and all
    	uses of __SQUAD_TYPE with __S64_TYPE.
    
            * posix/sys/types.h, rpc/sys/types.h
            (u_char): Define as unsigned char.
            (u_short): Define as unsigned short.
            (u_int): Define as unsigned int.
            (u_long): Define as unsigned long.
            (quad_t): Define as __int64_t.
            (u_quad_t): Define as __uint64_t.
    
            * stdlib/stdint.h (intptr_t): Define as __intptr_t.
            (uintptr_t): Define as __uintptr_t.
    
            * scripts/check-obsolete-constructs.py: Update allowed
            definitions for the obsolete types.  No longer allow
            __STD_TYPE as an alias for typedef.

commit e5d3ab632516463b7430aa9173bc4a84c7996b78
Author: Zack Weinberg <zackw@panix.com>
Date:   Sat Mar 9 16:01:38 2019 -0500

    Simplify definition of __time64_t.
    
    bits/time64.h always sets __TIME64_T_TYPE to be __time_t when
    __TIMESIZE == 64, so we can unconditionally use __TIME64_T_TYPE to
    define __time64_t; we donâ??t need another conditional in bits/types.h.
    
    Also move the definition of __time64_t next to the definition of
    __time_t.
    
    	* posix/bits/types.h (__time64_t): Unconditionally define
            as __TIME64_T_TYPE.  Move definition next to __time_t.

commit b4d8c8aa5755788388208ec1f50fa94fc52f9542
Author: Zack Weinberg <zackw@panix.com>
Date:   Sat Mar 9 11:59:02 2019 -0500

    Add caddr_t, daddr_t, and loff_t to the set of obsolete typedefs.
    
    caddr_t is a BSD-derived alias for â??char *â??, obsoleted by the
    introduction of â??void *â?? in C89 (!)  daddr_t is a â??disk address,â??
    but itâ??s always defined as â??intâ??, making it too small for modern
    disks and tapes.  loff_t is another name for off64_t, from early
    drafts of LFS.  All three are already only exposed by sys/types.h
    under __USE_MISC.
    
    This patch adds them to the set of types that shall not be used in
    installed headers (enforced by check-obsolete-constructs.py) and
    expunges all remaining uses, internally as well as in installed
    headers.  Since __DADDR_T_TYPE is always defined as __S32_TYPE, and
    daddr_t is obsolete so thereâ??s no need to worry about future
    variation, the patch also removes __DADDR_T_TYPE from the set of
    macros that bits/typesizes.h is required to define.  Instead
    bits/types.h always defines __daddr_t as __S32_TYPE, and the
    definition is moved to a more logical location within the file, next
    to __caddr_t.
    
    Itâ??s always safe to change (__)loff_t to the matching (__)off64_t;
    in a few internal files, I removed an unnecessary __ prefix.
    
    daddr_t is only used for struct ustat, which is obsoleted by struct
    statvfs and we already donâ??t declare it in public headers, and for an
    ioctl parameter block in sys/mtio.h (which may or may not be obsolete,
    I canâ??t tell).  In sys/mtio.h I replaced both uses with â??intâ?? to match
    the use of bare â??long intâ?? for most of the other fields of that
    structure.  In misc/ustat.c, the definition of struct ustat is not
    actually necessary so I removed it entirely.  In
    sysdeps/unix/sysv/linux/ustat.c a definition is necessary but only
    because INLINE_SYSCALL_CALL doesnâ??t work (on at least x86) when an
    argument is a pointer to an incomplete type, so I substituted a dummy
    definition.
    
    Most of the internal uses of caddr_t are in the sunrpc and nis
    directories, and since most of that code is obsolete, I mechanically
    replaced them with char * rather than consider whether void * might
    make more sense.  Because â??const caddr_t fooâ?? is semantically
    different from â??const char *fooâ?? (in the first case â??fooâ?? itself is
    const but the memory pointed to isnâ??t, in the second case the memory
    pointed to is const but â??fooâ?? isnâ??t) this change exposed some
    const-correctness errors in sunrpc, which I fixed minimally.  Outside
    of sunrpc and nis, I put a little more thought into whether uses of
    caddr_t should be void * instead.
    
    	* scripts/check-obsolete-constructs.py: Add caddr_t, daddr_t,
            and loff_t to the set of obsolete types forbidden in public
            headers.
    
    	* posix/bits/types.h: Unconditionally define __daddr_t as
            __S32_TYPE.  Move definition of __daddr_t next to definition
            of __caddr_t.
    	* bits/typesizes.h
    	* sysdeps/mach/hurd/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/generic/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/mips/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/s390/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/x86/bits/typesizes.h:
            Donâ??t define __DADDR_T_TYPE.
    
            * sysdeps/gnu/sys/mtio.h (struct mtget): Change all uses of
    	__daddr_t to int.
    	* misc/ustat.c: Remove definition of struct ustat; only
            forward-declare it.
    	* sysdeps/unix/sysv/linux/ustat.c: Replace fields of
            struct ustat with a size-preserving dummy field.
    
    	* hurd/Makefile (migheaderpipe): Rewrite loff_t as __off64_t.
            * hurd/fd-read.c (_hurd_fd_read): Use off64_t instead of loff_t.
            * hurd/fd-write.c (hurd_fd_write): Use off64_t instead of loff_t.
            * hurd/hurd/fd.h (_hurd_fd_read, _hurd_fd_write): Declare
            using __off64_t instead of __loff_t.
            * support/xunistd.h (xcopy_file_range): Declare using off64_t
            instead of loff_t.
    	* sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h
    	* sysdeps/unix/sysv/linux/lseek.c
    	* sysdeps/unix/sysv/linux/lseek64.c
    	* sysdeps/unix/sysv/linux/splice.c
            Throughout, use off64_t instead of loff_t.
    
    	* sysdeps/unix/sysv/linux/sys/quota.h
            (dqoff): Use __off64_t instead of __loff_t.
            (quotactl): Declare using char * instead of caddr_t.
    	* sysdeps/unix/sysv/linux/test-errno-linux.c
            (do_test): Cast to char * instead of caddr_t when calling quotactl.
    
    	* elf/dl-map-segments.h (_dl_map_segments): Cast to void *
            instead of caddr_t when calling __mprotect and __mmap.
            * elf/dl-minimal.c (malloc): Declare page as char *, not caddr_t.
            * elf/dl-reloc.c (_dl_relocate_object): Declare textrels.start
            as char *, not caddr_t.  Cast to char *, not caddr_t, in
            pointer arithmetic.
    
    	* intl/loadmsgcat.c: Remove two unnecessary casts to caddr_t
            when calling munmap. Change a third cast to target void *
            instead and add a comment explaining why this one is necessary.
    
    	* locale/loadlocale.c (_nl_load_locale): Use NULL instead of
            `(caddr_t)0`, and remove an unnecessary cast to caddr_t when
            calling munmap.
            (_nl_unload_locale): Change casts when calling free and munmap
            to target char *, and add a comment explaining why they are
            necessary.
    
    	* sysdeps/gnu/net/if.h
            (struct ifreq): Declare ifru_data as char *, not __caddr_t.
            (struct ifconf): Declare ifcu_buf as char *, not __caddr_t.
    
    	* nis/nis_add.c
    	* nis/nis_call.c
    	* nis/nis_callback.c
    	* nis/nis_checkpoint.c
    	* nis/nis_findserv.c
    	* nis/nis_intern.h
    	* nis/nis_lookup.c
    	* nis/nis_mkdir.c
    	* nis/nis_modify.c
    	* nis/nis_ping.c
    	* nis/nis_remove.c
    	* nis/nis_rmdir.c
    	* nis/nis_server.c
    	* nis/nis_table.c
    	* nis/nis_util.c
    	* nis/nss_nisplus/nisplus-grp.c
    	* nis/nss_nisplus/nisplus-pwd.c
    	* nis/rpcsvc/nis_callback.h
    	* nis/rpcsvc/yp.h
    	* nis/ypclnt.c
    	* sunrpc/auth_des.c
    	* sunrpc/auth_unix.c
    	* sunrpc/authdes_prot.c
    	* sunrpc/authuxprot.c
    	* sunrpc/clnt_raw.c
    	* sunrpc/clnt_tcp.c
    	* sunrpc/clnt_udp.c
    	* sunrpc/clnt_unix.c
    	* sunrpc/key_call.c
    	* sunrpc/pm_getmaps.c
    	* sunrpc/pm_getport.c
    	* sunrpc/pmap_clnt.c
    	* sunrpc/pmap_prot2.c
    	* sunrpc/pmap_rmt.c
    	* sunrpc/proto.h
    	* sunrpc/rpc/auth.h
    	* sunrpc/rpc/clnt.h
    	* sunrpc/rpc/pmap_clnt.h
    	* sunrpc/rpc/pmap_rmt.h
    	* sunrpc/rpc/rpc_msg.h
    	* sunrpc/rpc/svc.h
    	* sunrpc/rpc/xdr.h
    	* sunrpc/rpc_clntout.c
    	* sunrpc/rpc_cmsg.c
    	* sunrpc/rpc_hout.c
    	* sunrpc/rpc_prot.c
    	* sunrpc/rpc_sample.c
    	* sunrpc/rpc_svcout.c
    	* sunrpc/svc.c
    	* sunrpc/svc_authux.c
    	* sunrpc/svc_raw.c
    	* sunrpc/svc_tcp.c
    	* sunrpc/svc_udp.c
    	* sunrpc/svc_unix.c
    	* sunrpc/xdr.c
    	* sunrpc/xdr_array.c
    	* sunrpc/xdr_mem.c
    	* sunrpc/xdr_rec.c
    	* sunrpc/xdr_ref.c
    	* sunrpc/xdr_sizeof.c
    	* sunrpc/xdr_stdio.c:
            Mechanically replace all uses of caddr_t with char *.
    
            * sunrpc/xdr_mem.c (xdrmem_create): Cast away const when
            setting xdrs->x_private and xdrs->x_base.
            * sunrpc/xdr_stdio.c (xdrstdio_getbytes): Correct argument
            types in definition to match prototype.

commit 9a6af559051530693d6cd543499abecc9f88e65d
Author: Zack Weinberg <zackw@panix.com>
Date:   Mon Feb 18 21:00:34 2019 -0500

    sys/types.h: Donâ??t define u_intN_t or register_t unless __USE_MISC.
    
    sys/types.h unconditionally defines u_int8_t, u_int16_t, u_int32_t,
    u_int64_t, and register_t.  These are not part of any standard.  The
    u_intXX_t types are superseded by C99â??s uintXX_t types (defined in
    stdint.h).  Iâ??m not aware of a standardized exact equivalent of
    register_t, but also Iâ??ve never seen anyone use it for anything.
    I could be persuaded to leave that one alone.
    
    sys/types.h also unconditionally defines int8_t, int16_t, int32_t, and
    int64_t, which are the same as the C99 exact-width signed types in
    stdint.h.  POSIX doesnâ??t require these to appear in sys/types.h, so in
    principle they ought to be brought under __USE_MISC also.  But, when I
    tried that it broke about two dozen files just in our own source tree,
    and POSIX doesnâ??t *forbid* sys/types.h to define these types, so I
    think we should leave them alone.
    
    	* posix/sys/types.h (u_int8_t, u_int16_t, u_int32_t, u_int64_t)
            (register_t): Move under #ifdef __USE_MISC.
            Consolidate adjacent #ifdef __USE_MISC blocks.
            * scripts/check_obsolete_constructs.py: Add register_t to the
            set of obsolete typedefs that our headers should not use
            (but sys/types.h may still define).

commit 50a443cd9b35a4723003726323927bea2c776eea
Author: Zack Weinberg <zackw@panix.com>
Date:   Tue Feb 19 08:45:22 2019 -0500

    Define register_t using bits/typesizes.h macros.
    
    Currently register_t is, unlike all other types in sys/types.h,
    defined using a GCC extension (__attribute__((mode(word)))), falling
    back to â??intâ?? if the extension is unavailable.  This is a potential
    ABI compatibility hazard for people using non-GNU compilers with
    glibc.  Itâ??s also unnecessary; the bits/typesizes.h mechanism can
    handle all of the existing variation in the definition.  In most
    cases, defining __REGISTER_T_TYPE as __SWORD_TYPE is sufficient.
    Special handling is necessary for MIPS n32 and x86-64 x32, where
    __SWORD_TYPE is â??intâ?? and the appropriate type for register_t is
    â??long longâ??.  Unfortunately, this means we need to create a new
    bits/typesizes.h variant for linux/mips.  This variant is based
    on the top-level bits/typesizes.h, not linux/generic/bits/typesizes.h,
    to match the existing MIPS ABIs.
    
    Tested using build-many-glibcs.  The c++-types test confirms that the
    physical type of register_t does not change on any supported platform.
    
    	* posix/sys/types.h: Typedef register_t as __register_t.
            * posix/bits/types.h: Typedef __register_t using __REGISTER_T_TYPE.
    
    	* bits/typesizes.h
            * sysdeps/mach/hurd/bits/typesizes.h
            * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
            * sysdeps/unix/sysv/linux/generic/bits/typesizes.h
            * sysdeps/unix/sysv/linux/s390/bits/typesizes.h
            * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h:
            Define __REGISTER_T_TYPE as __SWORD_TYPE.
    
            * sysdeps/unix/sysv/linux/mips/bits/typesizes.h:
            New file (copied from bits/typesizes.h).
            Define __REGISTER_T_TYPE as __SWORD_TYPE for o32 and n64 ABIs.
            Define __REGISTER_T_TYPE as __SQUAD_TYPE for n32.
            * sysdeps/unix/sysv/linux/x86/bits/typesizes.h:
            Define __REGISTER_T_TYPE as __SWORD_TYPE for o32 and 64-bit ABIs.
            Define __REGISTER_T_TYPE as __SQUAD_TYPE for x32.

commit 629dea5c3a0573b3656d536f49fb812e861a7a9b
Author: Zack Weinberg <zackw@panix.com>
Date:   Sat Feb 23 19:08:54 2019 -0500

    Move most headers installed by top-level Makefile to misc/.
    
    The Makefile glue to run tests on installed headers is currently
    duplicated between the top-level Makefile and Rules, because the
    top-level Makefile doesn't read Rules but does install some headers.
    
    This patch moves most of the headers installed by the top-level Makefile
    to misc/ (chosen arbitrarily; I'm open to putting them somewhere else
    if reviewers feel it would be better) and removes the duplicated logic
    from the top-level Makefile.  I believe this also means that none of
    the headers in include/ are installed headers anymore.
    
    gnu/lib-names*.h are still generated by code in Makerules and installed
    by the top-level Makefile.  I tried to move them to misc/ as well, but
    that broke the generation process in a manner that didn't make any sense
    so I gave up.  The tests performed on installed headers are not
    especially useful for gnu/lib-names*.h so I think we can live with this
    for now.
    
    	* include/bits/xopen_lim.h
    	* include/features.h
    	* include/gnu-versions.h
    	* include/gnu/libc-version.h
    	* include/limits.h
    	* include/stdc-predef.h
    	* include/values.h:
    	Move to misc/ and replace with a trivial wrapper.
    	* Makefile (headers): Remove all headers moved to misc/.
    	Don't set a vpath for %.h.
    	(check-installed-headers-c.out, check-installed-headers-cxx.out)
    	(check-wrapper-headers.out): Remove rules.
    	* misc/Makefile (headers): Add all of the above headers and
    	sort the list.
    	* sysdeps/mach/hurd/bits/errno.h: Regenerate.


Summary of changes (added commits):
-----------------------------------

  69411ab... Donâ??t conditionalize declarations of ldiv_t, lldiv_t, __g
  c0a0bc0... Create bits/types headers for most remaining __T_defined ma
  2601711... Clean up bits/types.h.
  f85c66a... Simplify definition of __time64_t.
  3b8d660... Add caddr_t, daddr_t, and loff_t to the set of obsolete typ
  ad4d473... sys/types.h: Donâ??t define u_intN_t or register_t unless _
  86ec3f7... Define register_t using bits/typesizes.h macros.
  11945db... Move most headers installed by top-level Makefile to misc/.
  cb755ee... Add ChangeLog entry for previous commit.

commit 69411ab1f82999d0f99ea02312b1ed40ff1005de
Author: Zack Weinberg <zackw@panix.com>
Date:   Sat Mar 9 21:18:56 2019 -0500

    Donâ??t conditionalize declarations of ldiv_t, lldiv_t, __gwchar_t.
    
    The declarations of ldiv_t, lldiv_t, and __gwchar_t are all wrapped in
    __foo_t_defined conditionals, despite there being only one header in
    glibc that declares them.  I checked codesearch.debian.net and only
    found one other program that refers to the __foo_t_defined
    conditionals: u-boot provides its own definition of ldiv_t if
    __ldiv_t_defined is not defined by stdlib.h.  I conclude that the
    conditionals are not necessary, but the definitions of
    __ldiv_t_defined and __lldiv_t_defined should be preserved.
    
    	* stdlib/inttypes.h: Unconditionally define __gwchar_t.
            Donâ??t define ____gwchar_t_defined.
            * stdlib/stdlib.h: Unconditionally define ldiv_t.
            Condition lldiv_t only on __USE_ISOC99.

commit c0a0bc0fc0ea68e9b3710257a4cbe401e2b6917e
Author: Zack Weinberg <zackw@panix.com>
Date:   Sat Mar 9 20:54:02 2019 -0500

    Create bits/types headers for most remaining __T_defined macros.
    
    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.

commit 260171192a1acc7c23e31259e10aaab892649a74
Author: Zack Weinberg <zackw@panix.com>
Date:   Sat Mar 9 18:01:48 2019 -0500

    Clean up bits/types.h.
    
    This makes four linked changes to bits/types.h.  First, we use
    __(u)?int(16|32|64)_t to define __[SU](16|32|64)_TYPE.  In addition
    to reducing the amount of ifdeffage, this means __STD_TYPE is no longer
    necessary, since gcc -std=c89 will complain about â??typedef long long foo_tâ??
    but not â??typedef __int64_t foo_tâ??, even if the underlying type
    of __int64_t is long long.
    
    Second, we eliminate __UQUAD_TYPE and __SQUAD_TYPE from the set of
    macros bits/typesizes.h should use to define __FOO_T_TYPE macros,
    since they are always the same as __U64_TYPE and __S64_TYPE
    respectively.
    
    Third, we remove __u_char, __u_short, __u_int, __u_long, __u_quad_t,
    and __quad_t, we add __uintptr_t, and we define __intmax_t and
    __uintmax_t as __int64_t and __uint64_t.
    
    Fourth, we reorganize the list of typedefs into groups by the
    standard (if any) that defines them, and sort them alphabetically within
    each group.
    
    	* posix/bits/types.h: Move #error for __WORDSIZE neither 32 nor 64
    	to first group of conditionals on __WORDSIZE, and make it more
    	explicit.  Update commentary.  Define all __foo_t types with
    	regular â??typedefâ??.  Reorganize all __foo_t types into the same
    	groups that sys/types.h uses.
    	(__u_char, __u_short, __u_int, __u_long, __quad_t, __u_quad_t)
    	(__UQUAD_TYPE, __SQUAD_TYPE, __STD_TYPE): Donâ??t define.
    	(__S16_TYPE): Define unconditionally as __int16_t.
    	(__U16_TYPE): Define unconditionally as __uint16_t.
    	(__S32_TYPE): Define unconditionally as __int32_t.
    	(__U32_TYPE): Define unconditionally as __uint32_t.
    	(__S64_TYPE): Define unconditionally as __int64_t.
    	(__U64_TYPE): Define unconditionally as __uint64_t.
    	(__intmax_t): Define unconditionally as __int64_t.
    	(__uintmax_t): Define unconditionally as __uint64_t.
            (__uintptr_t): New typedef.
    
    	* bits/time64.h
    	* bits/typesizes.h
    	* sysdeps/mach/hurd/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/generic/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/mips/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/s390/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/x86/bits/typesizes.h:
    	Replace all uses of __UQUAD_TYPE with __U64_TYPE, and all
    	uses of __SQUAD_TYPE with __S64_TYPE.
    
            * posix/sys/types.h, rpc/sys/types.h
            (u_char): Define as unsigned char.
            (u_short): Define as unsigned short.
            (u_int): Define as unsigned int.
            (u_long): Define as unsigned long.
            (quad_t): Define as __int64_t.
            (u_quad_t): Define as __uint64_t.
    
            * stdlib/stdint.h (intptr_t): Define as __intptr_t.
            (uintptr_t): Define as __uintptr_t.
    
            * scripts/check-obsolete-constructs.py: Update allowed
            definitions for the obsolete types.  No longer allow
            __STD_TYPE as an alias for typedef.

commit f85c66a2e067ff92f71d8b67ed5ce736d3f5b3b2
Author: Zack Weinberg <zackw@panix.com>
Date:   Sat Mar 9 16:01:38 2019 -0500

    Simplify definition of __time64_t.
    
    bits/time64.h always sets __TIME64_T_TYPE to be __time_t when
    __TIMESIZE == 64, so we can unconditionally use __TIME64_T_TYPE to
    define __time64_t; we donâ??t need another conditional in bits/types.h.
    
    Also move the definition of __time64_t next to the definition of
    __time_t.
    
    	* posix/bits/types.h (__time64_t): Unconditionally define
            as __TIME64_T_TYPE.  Move definition next to __time_t.

commit 3b8d6607e30754f2b0679acc782f9c67d85902f5
Author: Zack Weinberg <zackw@panix.com>
Date:   Sat Mar 9 11:59:02 2019 -0500

    Add caddr_t, daddr_t, and loff_t to the set of obsolete typedefs.
    
    caddr_t is a BSD-derived alias for â??char *â??, obsoleted by the
    introduction of â??void *â?? in C89 (!)  daddr_t is a â??disk address,â??
    but itâ??s always defined as â??intâ??, making it too small for modern
    disks and tapes.  loff_t is another name for off64_t, from early
    drafts of LFS.  All three are already only exposed by sys/types.h
    under __USE_MISC.
    
    This patch adds them to the set of types that shall not be used in
    installed headers (enforced by check-obsolete-constructs.py) and
    expunges all remaining uses, internally as well as in installed
    headers.  Since __DADDR_T_TYPE is always defined as __S32_TYPE, and
    daddr_t is obsolete so thereâ??s no need to worry about future
    variation, the patch also removes __DADDR_T_TYPE from the set of
    macros that bits/typesizes.h is required to define.  Instead
    bits/types.h always defines __daddr_t as __S32_TYPE, and the
    definition is moved to a more logical location within the file, next
    to __caddr_t.
    
    Itâ??s always safe to change (__)loff_t to the matching (__)off64_t;
    in a few internal files, I removed an unnecessary __ prefix.
    
    daddr_t is only used for struct ustat, which is obsoleted by struct
    statvfs and we already donâ??t declare it in public headers, and for an
    ioctl parameter block in sys/mtio.h (which may or may not be obsolete,
    I canâ??t tell).  In sys/mtio.h I replaced both uses with â??intâ?? to match
    the use of bare â??long intâ?? for most of the other fields of that
    structure.  In misc/ustat.c, the definition of struct ustat is not
    actually necessary so I removed it entirely.  In
    sysdeps/unix/sysv/linux/ustat.c a definition is necessary but only
    because INLINE_SYSCALL_CALL doesnâ??t work (on at least x86) when an
    argument is a pointer to an incomplete type, so I substituted a dummy
    definition.
    
    Most of the internal uses of caddr_t are in the sunrpc and nis
    directories, and since most of that code is obsolete, I mechanically
    replaced them with char * rather than consider whether void * might
    make more sense.  Because â??const caddr_t fooâ?? is semantically
    different from â??const char *fooâ?? (in the first case â??fooâ?? itself is
    const but the memory pointed to isnâ??t, in the second case the memory
    pointed to is const but â??fooâ?? isnâ??t) this change exposed some
    const-correctness errors in sunrpc, which I fixed minimally.  Outside
    of sunrpc and nis, I put a little more thought into whether uses of
    caddr_t should be void * instead.
    
    	* scripts/check-obsolete-constructs.py: Add caddr_t, daddr_t,
            and loff_t to the set of obsolete types forbidden in public
            headers.
    
    	* posix/bits/types.h: Unconditionally define __daddr_t as
            __S32_TYPE.  Move definition of __daddr_t next to definition
            of __caddr_t.
    	* bits/typesizes.h
    	* sysdeps/mach/hurd/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/generic/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/mips/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/s390/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/sparc/bits/typesizes.h
    	* sysdeps/unix/sysv/linux/x86/bits/typesizes.h:
            Donâ??t define __DADDR_T_TYPE.
    
            * sysdeps/gnu/sys/mtio.h (struct mtget): Change all uses of
    	__daddr_t to int.
    	* misc/ustat.c: Remove definition of struct ustat; only
            forward-declare it.
    	* sysdeps/unix/sysv/linux/ustat.c: Replace fields of
            struct ustat with a size-preserving dummy field.
    
    	* hurd/Makefile (migheaderpipe): Rewrite loff_t as __off64_t.
            * hurd/fd-read.c (_hurd_fd_read): Use off64_t instead of loff_t.
            * hurd/fd-write.c (hurd_fd_write): Use off64_t instead of loff_t.
            * hurd/hurd/fd.h (_hurd_fd_read, _hurd_fd_write): Declare
            using __off64_t instead of __loff_t.
            * support/xunistd.h (xcopy_file_range): Declare using off64_t
            instead of loff_t.
    	* sysdeps/unix/sysv/linux/generic/wordsize-32/overflow.h
    	* sysdeps/unix/sysv/linux/lseek.c
    	* sysdeps/unix/sysv/linux/lseek64.c
    	* sysdeps/unix/sysv/linux/splice.c
            Throughout, use off64_t instead of loff_t.
    
    	* sysdeps/unix/sysv/linux/sys/quota.h
            (dqoff): Use __off64_t instead of __loff_t.
            (quotactl): Declare using char * instead of caddr_t.
    	* sysdeps/unix/sysv/linux/test-errno-linux.c
            (do_test): Cast to char * instead of caddr_t when calling quotactl.
    
    	* elf/dl-map-segments.h (_dl_map_segments): Cast to void *
            instead of caddr_t when calling __mprotect and __mmap.
            * elf/dl-minimal.c (malloc): Declare page as char *, not caddr_t.
            * elf/dl-reloc.c (_dl_relocate_object): Declare textrels.start
            as char *, not caddr_t.  Cast to char *, not caddr_t, in
            pointer arithmetic.
    
    	* intl/loadmsgcat.c: Remove two unnecessary casts to caddr_t
            when calling munmap. Change a third cast to target void *
            instead and add a comment explaining why this one is necessary.
    
    	* locale/loadlocale.c (_nl_load_locale): Use NULL instead of
            `(caddr_t)0`, and remove an unnecessary cast to caddr_t when
            calling munmap.
            (_nl_unload_locale): Change casts when calling free and munmap
            to target char *, and add a comment explaining why they are
            necessary.
    
    	* sysdeps/gnu/net/if.h
            (struct ifreq): Declare ifru_data as char *, not __caddr_t.
            (struct ifconf): Declare ifcu_buf as char *, not __caddr_t.
    
    	* nis/nis_add.c
    	* nis/nis_call.c
    	* nis/nis_callback.c
    	* nis/nis_checkpoint.c
    	* nis/nis_findserv.c
    	* nis/nis_intern.h
    	* nis/nis_lookup.c
    	* nis/nis_mkdir.c
    	* nis/nis_modify.c
    	* nis/nis_ping.c
    	* nis/nis_remove.c
    	* nis/nis_rmdir.c
    	* nis/nis_server.c
    	* nis/nis_table.c
    	* nis/nis_util.c
    	* nis/nss_nisplus/nisplus-grp.c
    	* nis/nss_nisplus/nisplus-pwd.c
    	* nis/rpcsvc/nis_callback.h
    	* nis/rpcsvc/yp.h
    	* nis/ypclnt.c
    	* sunrpc/auth_des.c
    	* sunrpc/auth_unix.c
    	* sunrpc/authdes_prot.c
    	* sunrpc/authuxprot.c
    	* sunrpc/clnt_raw.c
    	* sunrpc/clnt_tcp.c
    	* sunrpc/clnt_udp.c
    	* sunrpc/clnt_unix.c
    	* sunrpc/key_call.c
    	* sunrpc/pm_getmaps.c
    	* sunrpc/pm_getport.c
    	* sunrpc/pmap_clnt.c
    	* sunrpc/pmap_prot2.c
    	* sunrpc/pmap_rmt.c
    	* sunrpc/proto.h
    	* sunrpc/rpc/auth.h
    	* sunrpc/rpc/clnt.h
    	* sunrpc/rpc/pmap_clnt.h
    	* sunrpc/rpc/pmap_rmt.h
    	* sunrpc/rpc/rpc_msg.h
    	* sunrpc/rpc/svc.h
    	* sunrpc/rpc/xdr.h
    	* sunrpc/rpc_clntout.c
    	* sunrpc/rpc_cmsg.c
    	* sunrpc/rpc_hout.c
    	* sunrpc/rpc_prot.c
    	* sunrpc/rpc_sample.c
    	* sunrpc/rpc_svcout.c
    	* sunrpc/svc.c
    	* sunrpc/svc_authux.c
    	* sunrpc/svc_raw.c
    	* sunrpc/svc_tcp.c
    	* sunrpc/svc_udp.c
    	* sunrpc/svc_unix.c
    	* sunrpc/xdr.c
    	* sunrpc/xdr_array.c
    	* sunrpc/xdr_mem.c
    	* sunrpc/xdr_rec.c
    	* sunrpc/xdr_ref.c
    	* sunrpc/xdr_sizeof.c
    	* sunrpc/xdr_stdio.c:
            Mechanically replace all uses of caddr_t with char *.
    
            * sunrpc/xdr_mem.c (xdrmem_create): Cast away const when
            setting xdrs->x_private and xdrs->x_base.
            * sunrpc/xdr_stdio.c (xdrstdio_getbytes): Correct argument
            types in definition to match prototype.

commit ad4d473af1f3e62421488c6dc55b4a48376450b9
Author: Zack Weinberg <zackw@panix.com>
Date:   Mon Feb 18 21:00:34 2019 -0500

    sys/types.h: Donâ??t define u_intN_t or register_t unless __USE_MISC.
    
    sys/types.h unconditionally defines u_int8_t, u_int16_t, u_int32_t,
    u_int64_t, and register_t.  These are not part of any standard.  The
    u_intXX_t types are superseded by C99â??s uintXX_t types (defined in
    stdint.h).  Iâ??m not aware of a standardized exact equivalent of
    register_t, but also Iâ??ve never seen anyone use it for anything.
    I could be persuaded to leave that one alone.
    
    sys/types.h also unconditionally defines int8_t, int16_t, int32_t, and
    int64_t, which are the same as the C99 exact-width signed types in
    stdint.h.  POSIX doesnâ??t require these to appear in sys/types.h, so in
    principle they ought to be brought under __USE_MISC also.  But, when I
    tried that it broke about two dozen files just in our own source tree,
    and POSIX doesnâ??t *forbid* sys/types.h to define these types, so I
    think we should leave them alone.
    
    	* posix/sys/types.h (u_int8_t, u_int16_t, u_int32_t, u_int64_t)
            (register_t): Move under #ifdef __USE_MISC.
            Consolidate adjacent #ifdef __USE_MISC blocks.
            * scripts/check_obsolete_constructs.py: Add register_t to the
            set of obsolete typedefs that our headers should not use
            (but sys/types.h may still define).

commit 86ec3f7bccd663ea5ffe75afd0bb022edf7e5ad0
Author: Zack Weinberg <zackw@panix.com>
Date:   Tue Feb 19 08:45:22 2019 -0500

    Define register_t using bits/typesizes.h macros.
    
    Currently register_t is, unlike all other types in sys/types.h,
    defined using a GCC extension (__attribute__((mode(word)))), falling
    back to â??intâ?? if the extension is unavailable.  This is a potential
    ABI compatibility hazard for people using non-GNU compilers with
    glibc.  Itâ??s also unnecessary; the bits/typesizes.h mechanism can
    handle all of the existing variation in the definition.  In most
    cases, defining __REGISTER_T_TYPE as __SWORD_TYPE is sufficient.
    Special handling is necessary for MIPS n32 and x86-64 x32, where
    __SWORD_TYPE is â??intâ?? and the appropriate type for register_t is
    â??long longâ??.  Unfortunately, this means we need to create a new
    bits/typesizes.h variant for linux/mips.  This variant is based
    on the top-level bits/typesizes.h, not linux/generic/bits/typesizes.h,
    to match the existing MIPS ABIs.
    
    Tested using build-many-glibcs.  The c++-types test confirms that the
    physical type of register_t does not change on any supported platform.
    
    	* posix/sys/types.h: Typedef register_t as __register_t.
            * posix/bits/types.h: Typedef __register_t using __REGISTER_T_TYPE.
    
    	* bits/typesizes.h
            * sysdeps/mach/hurd/bits/typesizes.h
            * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h
            * sysdeps/unix/sysv/linux/generic/bits/typesizes.h
            * sysdeps/unix/sysv/linux/s390/bits/typesizes.h
            * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h:
            Define __REGISTER_T_TYPE as __SWORD_TYPE.
    
            * sysdeps/unix/sysv/linux/mips/bits/typesizes.h:
            New file (copied from bits/typesizes.h).
            Define __REGISTER_T_TYPE as __SWORD_TYPE for o32 and n64 ABIs.
            Define __REGISTER_T_TYPE as __SQUAD_TYPE for n32.
            * sysdeps/unix/sysv/linux/x86/bits/typesizes.h:
            Define __REGISTER_T_TYPE as __SWORD_TYPE for o32 and 64-bit ABIs.
            Define __REGISTER_T_TYPE as __SQUAD_TYPE for x32.

commit 11945dbb61c386b1670d38c86d7e3a6da9d2fa11
Author: Zack Weinberg <zackw@panix.com>
Date:   Sat Feb 23 19:08:54 2019 -0500

    Move most headers installed by top-level Makefile to misc/.
    
    The Makefile glue to run tests on installed headers is currently
    duplicated between the top-level Makefile and Rules, because the
    top-level Makefile doesn't read Rules but does install some headers.
    
    This patch moves most of the headers installed by the top-level Makefile
    to misc/ (chosen arbitrarily; I'm open to putting them somewhere else
    if reviewers feel it would be better) and removes the duplicated logic
    from the top-level Makefile.  I believe this also means that none of
    the headers in include/ are installed headers anymore.
    
    gnu/lib-names*.h are still generated by code in Makerules and installed
    by the top-level Makefile.  I tried to move them to misc/ as well, but
    that broke the generation process in a manner that didn't make any sense
    so I gave up.  The tests performed on installed headers are not
    especially useful for gnu/lib-names*.h so I think we can live with this
    for now.
    
    	* include/bits/xopen_lim.h
    	* include/features.h
    	* include/gnu-versions.h
    	* include/gnu/libc-version.h
    	* include/limits.h
    	* include/stdc-predef.h
    	* include/values.h:
    	Move to misc/ and replace with a trivial wrapper.
    	* Makefile (headers): Remove all headers moved to misc/.
    	Don't set a vpath for %.h.
    	(check-installed-headers-c.out, check-installed-headers-cxx.out)
    	(check-wrapper-headers.out): Remove rules.
    	* misc/Makefile (headers): Add all of the above headers and
    	sort the list.
    	* sysdeps/mach/hurd/bits/errno.h: Regenerate.

commit cb755eede7abad9515d2194313ae3f9e1011791d
Author: Zack Weinberg <zackw@panix.com>
Date:   Wed May 22 15:09:32 2019 -0400

    Add ChangeLog entry for previous commit.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]