musl/include/sys/sem.h, branch master musl - an implementation of the standard library for Linux-based systems add time64 symbol name redirects to public headers, under arch control 2019年10月28日T23:26:52+00:00 Rich Felker dalias@aerifal.cx 2019年07月31日T19:24:58+00:00 1febd21d3fb7b78f6fc13e48b3ff2a396a607a15 a _REDIR_TIME64 macro is introduced, which the arch's alltypes.h is expected to define, to control redirection of symbol names for interfaces that involve time_t and derived types. this ensures that object files will only be linked to libc interfaces matching the ABI whose headers they were compiled against. along with time32 compat shims, which will be introduced separately, the redirection also makes it possible for a single libc (static or shared) to be used with object files produced with either the old (32-bit time_t) headers or the new ones after 64-bit time_t switchover takes place. mixing of such object files (or shared libraries) in the same program will also be possible, but must be done with care; ABI between libc and a consumer of the libc interfaces is guaranteed to match by the the symbol name redirection, but pairwise ABI between consumers of libc that define interfaces between each other in terms of time_t is not guaranteed to match. this change adds a dependency on an additional "GNU C" feature to the public headers for existing 32-bit archs, which is generally undesirable; however, the feature is one which glibc has depended on for a long time, and thus which any viable alternative compiler is going to need to provide. 64-bit archs are not affected, nor will future 32-bit archs be, regardless of whether they are "new" on the kernel side (e.g. riscv32) or just newly-added (e.g. a new sparc or xtensa port). the same applies to newly-added ABIs for existing machine-level archs.
a _REDIR_TIME64 macro is introduced, which the arch's alltypes.h is
expected to define, to control redirection of symbol names for
interfaces that involve time_t and derived types. this ensures that
object files will only be linked to libc interfaces matching the ABI
whose headers they were compiled against.
along with time32 compat shims, which will be introduced separately,
the redirection also makes it possible for a single libc (static or
shared) to be used with object files produced with either the old
(32-bit time_t) headers or the new ones after 64-bit time_t switchover
takes place. mixing of such object files (or shared libraries) in the
same program will also be possible, but must be done with care; ABI
between libc and a consumer of the libc interfaces is guaranteed to
match by the the symbol name redirection, but pairwise ABI between
consumers of libc that define interfaces between each other in terms
of time_t is not guaranteed to match.
this change adds a dependency on an additional "GNU C" feature to the
public headers for existing 32-bit archs, which is generally
undesirable; however, the feature is one which glibc has depended on
for a long time, and thus which any viable alternative compiler is
going to need to provide. 64-bit archs are not affected, nor will
future 32-bit archs be, regardless of whether they are "new" on the
kernel side (e.g. riscv32) or just newly-added (e.g. a new sparc or
xtensa port). the same applies to newly-added ABIs for existing
machine-level archs.
remove indirect use of endian.h from public headers 2019年10月17日T20:03:42+00:00 Rich Felker dalias@aerifal.cx 2019年10月17日T20:03:42+00:00 71d23fbeacdd1f0c5e33cffb0979250d576fcf9c building on commit 97d35a552ec5b6ddf7923dd2f9a8eb973526acea, __BYTE_ORDER is now available wherever alltypes.h is included. endian.h should not be used since, in the future, it will expose identifiers that are not in the reserved namespace for the headers which were previously using it.
building on commit 97d35a552ec5b6ddf7923dd2f9a8eb973526acea,
__BYTE_ORDER is now available wherever alltypes.h is included.
endian.h should not be used since, in the future, it will expose
identifiers that are not in the reserved namespace for the headers
which were previously using it.
allow archs to define IPC_STAT, propagate time64 bit to other macros 2019年08月02日T04:08:23+00:00 Rich Felker dalias@aerifal.cx 2019年07月31日T05:17:53+00:00 3c02bacf0f6bed54979e67d22c43745df9add4a0 to make use of {sem,shm,msg}ctl IPC_STAT functionality to provide 64-bit time_t on 32-bit archs, IPC_STAT and related macros must be defined with bit 8 (0x100) set. allow archs to define IPC_STAT in bits/ipc.h, and define the other macros in terms of it so that they all get the same value of the time64 bit.
to make use of {sem,shm,msg}ctl IPC_STAT functionality to provide
64-bit time_t on 32-bit archs, IPC_STAT and related macros must be
defined with bit 8 (0x100) set. allow archs to define IPC_STAT in
bits/ipc.h, and define the other macros in terms of it so that they
all get the same value of the time64 bit.
add {MSG,SEM,SHM}_STAT_ANY from linux v4.17 2018年06月19日T17:26:24+00:00 Szabolcs Nagy nsz@port70.net 2018年06月09日T21:06:58+00:00 af55070eae5438476f921d827b7ae49e8141c3fe introduced to stat ipc objects without permission checks since the info is available in /proc/sysvipc anyway, new in linux commits 23c8cec8cf679b10997a512abb1e86f0cedc42ba a280d6dc77eb6002f269d58cd47c7c7e69b617b6 c21a6970ae727839a2f300cd8dd957de0d0238c3
introduced to stat ipc objects without permission checks since the
info is available in /proc/sysvipc anyway, new in linux commits
23c8cec8cf679b10997a512abb1e86f0cedc42ba
a280d6dc77eb6002f269d58cd47c7c7e69b617b6
c21a6970ae727839a2f300cd8dd957de0d0238c3
move struct semid_ds to from shared sys/sem.h to bits 2014年03月11日T19:27:13+00:00 Rich Felker dalias@aerifal.cx 2014年03月11日T19:27:13+00:00 f6e2f7e13f0edb1bb1d94e6ad4bf44abffd048d1 the definition was found to be incorrect at least for powerpc, and fixing this cleanly requires making the definition arch-specific. this will allow cleaning up the definition for other archs to make it more specific, and reversing some of the ugliness (time_t hacks) introduced with the x32 port. this first commit simply copies the existing definition to each arch without any changes. this is intentional, to make it easier to review changes made on a per-arch basis.
the definition was found to be incorrect at least for powerpc, and
fixing this cleanly requires making the definition arch-specific. this
will allow cleaning up the definition for other archs to make it more
specific, and reversing some of the ugliness (time_t hacks) introduced
with the x32 port.
this first commit simply copies the existing definition to each arch
without any changes. this is intentional, to make it easier to review
changes made on a per-arch basis.
sys/sem.h: cheat and make all longs use time_t instead 2014年02月22日T11:25:17+00:00 rofl0r retnyg@gmx.net 2014年01月07日T23:04:29+00:00 1a2e55b95a2cf51616cce7b46f9a30e820679314 most of the members should be time_t anyway, and time_t has the correct semantics for "syscall_long", so it works on all archs, even x32.
most of the members should be time_t anyway, and time_t has the
correct semantics for "syscall_long", so it works on all archs, even x32.
work around wrong kernel type for sem_nsems member of struct semid_ds 2013年06月29日T03:57:58+00:00 Rich Felker dalias@aerifal.cx 2013年06月29日T03:57:58+00:00 062f40ef3e56021f4a9902095867e35cce6d99c4 rejecting invalid values for n is fine even in the case where a new sem will not be created, since the kernel does its range checks on n even in this case as well. by default, the kernel will bound the limit well below USHRT_MAX anyway, but it's presumably possible that an administrator could override this limit and break things.
rejecting invalid values for n is fine even in the case where a new
sem will not be created, since the kernel does its range checks on n
even in this case as well.
by default, the kernel will bound the limit well below USHRT_MAX
anyway, but it's presumably possible that an administrator could
override this limit and break things.
default features: make musl usable without feature test macros 2012年09月08日T03:13:55+00:00 Rich Felker dalias@aerifal.cx 2012年09月08日T03:13:55+00:00 c1a9658bd19245ff0fb52d3da567815d822fb622 the old behavior of exposing nothing except plain ISO C can be obtained by defining __STRICT_ANSI__ or using a compiler option (such as -std=c99) that predefines it. the new default featureset is POSIX with XSI plus _BSD_SOURCE. any explicit feature test macros will inhibit the default. installation docs have also been updated to reflect this change.
the old behavior of exposing nothing except plain ISO C can be
obtained by defining __STRICT_ANSI__ or using a compiler option (such
as -std=c99) that predefines it. the new default featureset is POSIX
with XSI plus _BSD_SOURCE. any explicit feature test macros will
inhibit the default.
installation docs have also been updated to reflect this change.
type exposure fixes in sys/sem.h 2012年08月24日T21:01:17+00:00 Rich Felker dalias@aerifal.cx 2012年08月24日T21:01:17+00:00 7dba0494e8153e4358b09cbf30ff07d5ba4dbf37
initial check-in, version 0.5.0 2011年02月12日T05:22:29+00:00 Rich Felker dalias@aerifal.cx 2011年02月12日T05:22:29+00:00 0b44a0315b47dd8eced9f3b7f31580cf14bbfc01

AltStyle によって変換されたページ (->オリジナル) /