summaryrefslogtreecommitdiff
path: root/arch/powerpc/bits/shm.h
AgeCommit message (Collapse)AuthorLines
2021-07-06fix broken struct shmid_ds on powerpc (32-bit)Rich Felker-1/+1
the kernel structure has padding of the shm_segsz member up to 64 bits, as well as 2 unused longs at the end. somehow that was overlooked when the powerpc port was added, and it has been broken ever since; applications compiled with the wrong definition do not correctly see the shm_segsz, shm_cpid, and shm_lpid members. fixing the definition just by adding the missing padding would break the ABI size of the structure as well as the position of the time64 shm_atime and shm_dtime members we added at the end. instead, just move one of the unused padding members from the original end (before time64) of the structure to the position of the missing padding. this preserves size and preserves correct behavior of any compiled code that was already working. programs affected by the wrong definition need to be recompiled with the correct one.
2019-11-02switch all existing 32-bit archs to 64-bit time_tRich Felker-7/+9
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-07-29remove trailing newlines from various versions of bits/shm.hRich Felker-1/+0
2016-07-03make brace placement in public header struct definitions consistentRich Felker-2/+1
placing the opening brace on the same line as the struct keyword/tag is the style I prefer and seems to be the prevailing practice in more recent additions. these changes were generated by the command: find include/ arch/*/bits -name '*.h' \ -exec sed -i '/^struct [^;{]*$/{N;s/\n/ /;}' {} + and subsequently checked by hand to ensure that the regex did not pick up any false positives.
2014-03-11fix sysvipc structures on powerpcRich Felker-4/+5
these have been wrong for a long time and were never detected or corrected. powerpc needs some gratuitous extra padding/reserved slots in ipc_perm, big-endian ordering for the padding of time_t slots that was intended by the kernel folks to allow a transition to 64-bit time_t, and some minor gratuitous reordering of struct members.
2014-02-23sys/shm.h: move arch specific structs to bits/rofl0r-0/+11
2012-11-13PPC port cleaned up, static linking works well now.rofl0r-0/+18