unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/8] sys/types.h cleanup and further typedef obsoletion
@ 2019-03-11 14:59 Zack Weinberg
  2019-03-11 14:59 ` [PATCH 1/8] Move inttypes.h and stdint.h to stdlib Zack Weinberg
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Zack Weinberg @ 2019-03-11 14:59 UTC (permalink / raw)
  To: libc-alpha

This patch series removes a fair amount of cruft from sys/types.h and
bits/types.h, obsoletes four additional typedefs that should not
be used in public interfaces anymore (caddr_t, daddr_t, loff_t,
register_t), and restricts sys/types.h’s definition of u_intN_t and
register_t to __USE_MISC (i.e. they are no longer present in strict
conformance modes).

It depends on the “Use a proper C tokenizer to implement the obsolete
typedefs test” patch, which has just been resubmitted separately.
Unlike that patch, this series is not intended to be appropriate for
backport to release branches.

Zack Weinberg (8):
  Move inttypes.h and stdint.h to stdlib.
  Define register_t using bits/typesizes.h macros.
  sys/types.h: Don’t define u_intN_t or register_t unless __USE_MISC.
  Add caddr_t, daddr_t, and loff_t to the set of obsolete typedefs.
  Simplify definition of __time64_t.
  Clean up bits/types.h.
  Create bits/types headers for most remaining __T_defined macros.
  Don’t conditionalize declarations of ldiv_t, lldiv_t, __gwchar_t.

 NEWS                                          |   8 +
 bits/socket.h                                 |   8 +-
 bits/time64.h                                 |   2 +-
 bits/typesizes.h                              |  16 +-
 dirent/dirent.h                               |  14 +-
 elf/dl-map-segments.h                         |  15 +-
 elf/dl-minimal.c                              |   2 +-
 elf/dl-reloc.c                                |   4 +-
 grp/grp.h                                     |   6 +-
 hurd/Makefile                                 |   2 +-
 hurd/fd-read.c                                |   2 +-
 hurd/fd-write.c                               |   2 +-
 hurd/hurd/fd.h                                |   6 +-
 include/bits/types/blkcnt64_t.h               |   1 +
 include/bits/types/blkcnt_t.h                 |   1 +
 include/bits/types/blksize_t.h                |   1 +
 include/bits/types/caddr_t.h                  |   1 +
 include/bits/types/daddr_t.h                  |   1 +
 include/bits/types/dev_t.h                    |   1 +
 include/bits/types/fsblkcnt64_t.h             |   1 +
 include/bits/types/fsblkcnt_t.h               |   1 +
 include/bits/types/fsfilcnt64_t.h             |   1 +
 include/bits/types/fsfilcnt_t.h               |   1 +
 include/bits/types/fsid_t.h                   |   1 +
 include/bits/types/gid_t.h                    |   1 +
 include/bits/types/id_t.h                     |   1 +
 include/bits/types/ino64_t.h                  |   1 +
 include/bits/types/ino_t.h                    |   1 +
 include/bits/types/intptr_t.h                 |   1 +
 include/bits/types/key_t.h                    |   1 +
 include/bits/types/loff_t.h                   |   1 +
 include/bits/types/mode_t.h                   |   1 +
 include/bits/types/nlink_t.h                  |   1 +
 include/bits/types/off64_t.h                  |   1 +
 include/bits/types/off_t.h                    |   1 +
 include/bits/types/pid_t.h                    |   1 +
 include/bits/types/register_t.h               |   1 +
 include/bits/types/socklen_t.h                |   1 +
 include/bits/types/ssize_t.h                  |   1 +
 include/bits/types/suseconds_t.h              |   1 +
 include/bits/types/u_int.h                    |   1 +
 include/bits/types/u_intN_t.h                 |   1 +
 include/bits/types/uid_t.h                    |   1 +
 include/bits/types/uint.h                     |   1 +
 include/bits/types/useconds_t.h               |   1 +
 include/inttypes.h                            |   2 +-
 include/stdint.h                              |   1 +
 inet/arpa/inet.h                              |   7 +-
 intl/loadmsgcat.c                             |   7 +-
 io/fcntl.h                                    |  27 +--
 io/sys/stat.h                                 |  66 +----
 io/sys/statvfs.h                              |  21 +-
 libio/stdio.h                                 |  19 +-
 locale/loadlocale.c                           |  11 +-
 misc/sys/mman.h                               |  16 +-
 misc/sys/select.h                             |   7 +-
 misc/ustat.c                                  |   8 +-
 nis/nis_add.c                                 |   4 +-
 nis/nis_call.c                                |  10 +-
 nis/nis_callback.c                            |  12 +-
 nis/nis_checkpoint.c                          |   4 +-
 nis/nis_findserv.c                            |   8 +-
 nis/nis_intern.h                              |  12 +-
 nis/nis_lookup.c                              |   4 +-
 nis/nis_mkdir.c                               |   8 +-
 nis/nis_modify.c                              |   4 +-
 nis/nis_ping.c                                |   4 +-
 nis/nis_remove.c                              |   4 +-
 nis/nis_rmdir.c                               |   4 +-
 nis/nis_server.c                              |   8 +-
 nis/nis_table.c                               |  28 +--
 nis/nis_util.c                                |   4 +-
 nis/nss_nisplus/nisplus-grp.c                 |   8 +-
 nis/nss_nisplus/nisplus-pwd.c                 |   8 +-
 nis/rpcsvc/nis_callback.h                     |   2 +-
 nis/rpcsvc/yp.h                               |   6 +-
 nis/ypclnt.c                                  |  42 ++--
 posix/Makefile                                |  37 ++-
 posix/bits/types.h                            | 206 ++++++----------
 posix/bits/types/blkcnt64_t.h                 |   9 +
 posix/bits/types/blkcnt_t.h                   |  13 +
 posix/bits/types/blksize_t.h                  |   9 +
 posix/bits/types/caddr_t.h                    |   9 +
 posix/bits/types/daddr_t.h                    |   9 +
 posix/bits/types/dev_t.h                      |  10 +
 posix/bits/types/fsblkcnt64_t.h               |   9 +
 posix/bits/types/fsblkcnt_t.h                 |  13 +
 posix/bits/types/fsfilcnt64_t.h               |   9 +
 posix/bits/types/fsfilcnt_t.h                 |  13 +
 posix/bits/types/fsid_t.h                     |   9 +
 posix/bits/types/gid_t.h                      |   9 +
 posix/bits/types/id_t.h                       |  10 +
 posix/bits/types/ino64_t.h                    |   9 +
 posix/bits/types/ino_t.h                      |  13 +
 posix/bits/types/intptr_t.h                   |  10 +
 posix/bits/types/key_t.h                      |   9 +
 posix/bits/types/loff_t.h                     |   9 +
 posix/bits/types/mode_t.h                     |   9 +
 posix/bits/types/nlink_t.h                    |   9 +
 posix/bits/types/off64_t.h                    |   9 +
 posix/bits/types/off_t.h                      |  13 +
 posix/bits/types/pid_t.h                      |   9 +
 posix/bits/types/register_t.h                 |   9 +
 posix/bits/types/socklen_t.h                  |   9 +
 posix/bits/types/ssize_t.h                    |   9 +
 posix/bits/types/suseconds_t.h                |   9 +
 posix/bits/types/u_int.h                      |  15 ++
 posix/bits/types/u_intN_t.h                   |  17 ++
 posix/bits/types/uid_t.h                      |   9 +
 posix/bits/types/uint.h                       |  10 +
 posix/bits/types/useconds_t.h                 |   9 +
 posix/sched.h                                 |   6 +-
 posix/sys/types.h                             | 227 ++++--------------
 posix/sys/wait.h                              |  11 +-
 posix/unistd.h                                |  56 +----
 pwd/pwd.h                                     |  11 +-
 resource/sys/resource.h                       |   6 +-
 scripts/check-obsolete-constructs.py          | 149 ++++++++----
 signal/signal.h                               |  12 +-
 {sysdeps/generic => stdlib}/inttypes.h        |  15 +-
 stdlib/monetary.h                             |   7 +-
 {sysdeps/generic => stdlib}/stdint.h          |  16 +-
 stdlib/stdlib.h                               |   6 +-
 streams/stropts.h                             |  12 +-
 sunrpc/auth_des.c                             |   2 +-
 sunrpc/auth_unix.c                            |   4 +-
 sunrpc/authdes_prot.c                         |  10 +-
 sunrpc/authuxprot.c                           |   2 +-
 sunrpc/clnt_raw.c                             |  12 +-
 sunrpc/clnt_tcp.c                             |  28 +--
 sunrpc/clnt_udp.c                             |  22 +-
 sunrpc/clnt_unix.c                            |  26 +-
 sunrpc/key_call.c                             |   2 +-
 sunrpc/pm_getmaps.c                           |   2 +-
 sunrpc/pm_getport.c                           |   4 +-
 sunrpc/pmap_clnt.c                            |   4 +-
 sunrpc/pmap_prot2.c                           |   2 +-
 sunrpc/pmap_rmt.c                             |  16 +-
 sunrpc/proto.h                                |   2 +-
 sunrpc/rpc/auth.h                             |   4 +-
 sunrpc/rpc/clnt.h                             |  16 +-
 sunrpc/rpc/pmap_clnt.h                        |  12 +-
 sunrpc/rpc/pmap_rmt.h                         |   4 +-
 sunrpc/rpc/rpc_msg.h                          |   2 +-
 sunrpc/rpc/svc.h                              |  14 +-
 sunrpc/rpc/types.h                            |  44 +---
 sunrpc/rpc/xdr.h                              |  22 +-
 sunrpc/rpc_clntout.c                          |   8 +-
 sunrpc/rpc_cmsg.c                             |  12 +-
 sunrpc/rpc_hout.c                             |   2 +-
 sunrpc/rpc_prot.c                             |   4 +-
 sunrpc/rpc_sample.c                           |   4 +-
 sunrpc/rpc_svcout.c                           |   6 +-
 sunrpc/svc.c                                  |   2 +-
 sunrpc/svc_authux.c                           |   2 +-
 sunrpc/svc_raw.c                              |   8 +-
 sunrpc/svc_tcp.c                              |  24 +-
 sunrpc/svc_udp.c                              |  14 +-
 sunrpc/svc_unix.c                             |  28 +--
 sunrpc/xdr.c                                  |   4 +-
 sunrpc/xdr_array.c                            |   4 +-
 sunrpc/xdr_mem.c                              |  12 +-
 sunrpc/xdr_rec.c                              |  46 ++--
 sunrpc/xdr_ref.c                              |   6 +-
 sunrpc/xdr_sizeof.c                           |   8 +-
 sunrpc/xdr_stdio.c                            |  14 +-
 support/xunistd.h                             |   4 +-
 sysdeps/gnu/net/if.h                          |   4 +-
 sysdeps/gnu/sys/mtio.h                        |   4 +-
 sysdeps/gnu/utmpx.h                           |   5 +-
 sysdeps/mach/hurd/bits/socket.h               |   8 +-
 sysdeps/mach/hurd/bits/typesizes.h            |  16 +-
 .../unix/sysv/linux/alpha/bits/typesizes.h    |   2 +-
 sysdeps/unix/sysv/linux/bits/socket.h         |   7 +-
 .../unix/sysv/linux/generic/bits/typesizes.h  |  16 +-
 .../sysv/linux/generic/wordsize-32/overflow.h |   2 +-
 sysdeps/unix/sysv/linux/lseek.c               |   4 +-
 sysdeps/unix/sysv/linux/lseek64.c             |   2 +-
 sysdeps/unix/sysv/linux/mips/bits/typesizes.h |  88 +++++++
 sysdeps/unix/sysv/linux/s390/bits/typesizes.h |  16 +-
 .../unix/sysv/linux/sparc/bits/typesizes.h    |  16 +-
 sysdeps/unix/sysv/linux/splice.c              |   2 +-
 sysdeps/unix/sysv/linux/sys/quota.h           |   4 +-
 sysdeps/unix/sysv/linux/test-errno-linux.c    |   2 +-
 sysdeps/unix/sysv/linux/ustat.c               |   9 +-
 sysdeps/unix/sysv/linux/x86/bits/typesizes.h  |  21 +-
 sysvipc/sys/ipc.h                             |  24 +-
 sysvipc/sys/msg.h                             |  12 +-
 sysvipc/sys/shm.h                             |   9 +-
 termios/termios.h                             |   8 +-
 time/sys/time.h                               |   6 +-
 time/time.h                                   |   5 +-
 192 files changed, 1209 insertions(+), 1149 deletions(-)
 create mode 100644 include/bits/types/blkcnt64_t.h
 create mode 100644 include/bits/types/blkcnt_t.h
 create mode 100644 include/bits/types/blksize_t.h
 create mode 100644 include/bits/types/caddr_t.h
 create mode 100644 include/bits/types/daddr_t.h
 create mode 100644 include/bits/types/dev_t.h
 create mode 100644 include/bits/types/fsblkcnt64_t.h
 create mode 100644 include/bits/types/fsblkcnt_t.h
 create mode 100644 include/bits/types/fsfilcnt64_t.h
 create mode 100644 include/bits/types/fsfilcnt_t.h
 create mode 100644 include/bits/types/fsid_t.h
 create mode 100644 include/bits/types/gid_t.h
 create mode 100644 include/bits/types/id_t.h
 create mode 100644 include/bits/types/ino64_t.h
 create mode 100644 include/bits/types/ino_t.h
 create mode 100644 include/bits/types/intptr_t.h
 create mode 100644 include/bits/types/key_t.h
 create mode 100644 include/bits/types/loff_t.h
 create mode 100644 include/bits/types/mode_t.h
 create mode 100644 include/bits/types/nlink_t.h
 create mode 100644 include/bits/types/off64_t.h
 create mode 100644 include/bits/types/off_t.h
 create mode 100644 include/bits/types/pid_t.h
 create mode 100644 include/bits/types/register_t.h
 create mode 100644 include/bits/types/socklen_t.h
 create mode 100644 include/bits/types/ssize_t.h
 create mode 100644 include/bits/types/suseconds_t.h
 create mode 100644 include/bits/types/u_int.h
 create mode 100644 include/bits/types/u_intN_t.h
 create mode 100644 include/bits/types/uid_t.h
 create mode 100644 include/bits/types/uint.h
 create mode 100644 include/bits/types/useconds_t.h
 create mode 100644 include/stdint.h
 create mode 100644 posix/bits/types/blkcnt64_t.h
 create mode 100644 posix/bits/types/blkcnt_t.h
 create mode 100644 posix/bits/types/blksize_t.h
 create mode 100644 posix/bits/types/caddr_t.h
 create mode 100644 posix/bits/types/daddr_t.h
 create mode 100644 posix/bits/types/dev_t.h
 create mode 100644 posix/bits/types/fsblkcnt64_t.h
 create mode 100644 posix/bits/types/fsblkcnt_t.h
 create mode 100644 posix/bits/types/fsfilcnt64_t.h
 create mode 100644 posix/bits/types/fsfilcnt_t.h
 create mode 100644 posix/bits/types/fsid_t.h
 create mode 100644 posix/bits/types/gid_t.h
 create mode 100644 posix/bits/types/id_t.h
 create mode 100644 posix/bits/types/ino64_t.h
 create mode 100644 posix/bits/types/ino_t.h
 create mode 100644 posix/bits/types/intptr_t.h
 create mode 100644 posix/bits/types/key_t.h
 create mode 100644 posix/bits/types/loff_t.h
 create mode 100644 posix/bits/types/mode_t.h
 create mode 100644 posix/bits/types/nlink_t.h
 create mode 100644 posix/bits/types/off64_t.h
 create mode 100644 posix/bits/types/off_t.h
 create mode 100644 posix/bits/types/pid_t.h
 create mode 100644 posix/bits/types/register_t.h
 create mode 100644 posix/bits/types/socklen_t.h
 create mode 100644 posix/bits/types/ssize_t.h
 create mode 100644 posix/bits/types/suseconds_t.h
 create mode 100644 posix/bits/types/u_int.h
 create mode 100644 posix/bits/types/u_intN_t.h
 create mode 100644 posix/bits/types/uid_t.h
 create mode 100644 posix/bits/types/uint.h
 create mode 100644 posix/bits/types/useconds_t.h
 rename {sysdeps/generic => stdlib}/inttypes.h (98%)
 rename {sysdeps/generic => stdlib}/stdint.h (96%)
 create mode 100644 sysdeps/unix/sysv/linux/mips/bits/typesizes.h

-- 
2.20.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2019-05-22 16:27 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-11 14:59 [PATCH 0/8] sys/types.h cleanup and further typedef obsoletion Zack Weinberg
2019-03-11 14:59 ` [PATCH 1/8] Move inttypes.h and stdint.h to stdlib Zack Weinberg
2019-03-11 23:19   ` Joseph Myers
2019-03-13 13:46     ` Zack Weinberg
2019-03-11 14:59 ` [PATCH 2/8] Define register_t using bits/typesizes.h macros Zack Weinberg
2019-05-22 14:42   ` Florian Weimer
2019-05-22 15:31     ` Zack Weinberg
2019-05-22 16:27       ` Florian Weimer
2019-03-11 14:59 ` [PATCH 3/8] sys/types.h: Don’t define u_intN_t or register_t unless __USE_MISC Zack Weinberg
2019-05-09  8:34   ` Florian Weimer
2019-05-22 14:34     ` Zack Weinberg
2019-03-11 14:59 ` [PATCH 4/8] Add caddr_t, daddr_t, and loff_t to the set of obsolete typedefs Zack Weinberg
2019-03-11 14:59 ` [PATCH 5/8] Simplify definition of __time64_t Zack Weinberg
2019-05-22 14:44   ` Florian Weimer
2019-03-11 14:59 ` [PATCH 6/8] Clean up bits/types.h Zack Weinberg
2019-03-11 14:59 ` [PATCH 7/8] Create bits/types headers for most remaining __T_defined macros Zack Weinberg
2019-03-11 14:59 ` [PATCH 8/8] Don’t conditionalize declarations of ldiv_t, lldiv_t, __gwchar_t Zack Weinberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).