Commit Graph

11 Commits

Author SHA1 Message Date
Rich Felker 3814333964 switch all existing 32-bit archs to 64-bit time_t
this commit preserves ABI fully for existing interface boundaries
between libc and libc consumers (applications or libraries), by
retaining existing symbol names for the legacy 32-bit interfaces and
redirecting sources compiled against the new headers to alternate
symbol names. this does not necessarily, however, preserve the
pairwise ABI of libc consumers with one another; where they use
time_t-derived types in their interfaces with one another, it may be
necessary to synchronize updates with each other.

the intent is that ABI resulting from this commit already be stable
and permanent, but it will not be officially so until a release is
made. changes to some header-defined types that do not play any role
in the ABI between libc and its consumers may still be subject to
change.

mechanically, the changes made by this commit for each 32-bit arch are
as follows:

- _REDIR_TIME64 is defined to activate the symbol redirections in
  public headers

- COMPAT_SRC_DIRS is defined in arch.mak to activate build of ABI
  compat shims to serve as definitions for the original symbol names

- time_t and suseconds_t definitions are changed to long long (64-bit)

- IPC_STAT definition is changed to add the IPC_TIME64 bit (0x100),
  triggering conversion of semid_ds, shmid_ds, and msqid_ds split
  low/high time bits into new time_t members

- structs semid_ds, shmid_ds, msqid_ds, and stat are modified to add
  new 64-bit time_t/timespec members at the end, maintaining existing
  layout of other members.

- socket options (SO_*) and ioctl (sockios) command macros are
  redefined to use the kernel's "_NEW" values.

in addition, on archs where vdso clock_gettime is used, the
VDSO_CGT_SYM macro definition in syscall_arch.h is changed to use a
new time64 vdso function if available, and a new VDSO_CGT32_SYM macro
is added for use as fallback on kernels lacking time64.
2019-11-02 18:30:56 -04:00
Bobby Bingham 3517d74a5e move arch-invariant definitions out of bits/ioctl.h 2019-02-07 12:43:19 -05:00
Szabolcs Nagy 754f66afb7 ioctl TIOCGPTPEER from linux v4.13
added for safe opening of peer end of pty in a mount namespace.
new in linux commit c6325179238f1d4683edbec53d8322575d76d7e2
2017-11-05 18:41:22 -05:00
Szabolcs Nagy cc08669380 add SIOCGSTAMPNS socket ioctl macro to ioctl.h
it is defined in linux asm/sockios.h since commit
ae40eb1ef30ab4120bd3c8b7e3da99ee53d27a23 (linux v2.6.22)
but was missing from musl by accident.

in musl the sockios macros are exposed in sys/ioctl.h together
with other ioctl requests instead of in sys/socket.h because of
namespace rules. (glibc has them in sys/socket.h under _GNU_SOURCE.)
2017-08-29 19:48:37 -04:00
Szabolcs Nagy 058c0b2d70 remove mips and powerpc ioctls that are missing from linux uapi
mips and powerpc use their own asm/ioctls.h, not the asm-generic/ioctls.h
and they lack termiox macros that are available on other targets.
see kernel commit 1d65b4a088de407e99714fdc27862449db04fb5c
2016-07-03 14:54:34 -04:00
Szabolcs Nagy 5ce901279e add missing TIOC* macros to ioctl.h
these are defined in linux asm/ioctls.h.
(powerpc64 and powerpc bits/ioctl.h are now identical)
2016-07-03 14:54:34 -04:00
Szabolcs Nagy 8735a921d0 add missing SIOCSIFNAME from linux/sockios.h to ioctl.h
glibc ioctl.h has it too.
2016-07-03 14:54:33 -04:00
Szabolcs Nagy 2df9ae9161 remove ioctl macros that were removed from linux uapi
TIOCTTYGSTRUCT, TIOCGHAYESESP, TIOCSHAYESESP and TIOCM_MODEM_BITS
were removed from the linux uapi and not present in glibc ioctl.h
2016-07-03 14:54:33 -04:00
Szabolcs Nagy 41c34d188a fix ioctl _IOR, _IOW, etc macros to avoid signed overflow (2<<30) 2013-05-26 15:49:08 +00:00
rofl0r 3bb6bd8580 fix powerpc termios.h and ioctl.h 2012-11-16 04:55:52 +01:00
rofl0r 1c8eb8bad7 PPC port cleaned up, static linking works well now. 2012-11-13 19:12:25 +01:00