summaryrefslogtreecommitdiff
path: root/include/signal.h
AgeCommit message (Collapse)AuthorFilesLines
2014-05-24overhaul siginfo_t definition in signal.hRich Felker1-23/+28
the main motivation for this change is that, with the previous definition, it was arguably illegal, in standard C, to initialize both si_value and si_pid/si_uid with designated initializers, due to the rule that only one member of a union can have an initializer. whether or not this affected real-world application code, it affected some internal code, and clang was producing warnings (and possibly generating incorrect code). the new definition uses a more complex hierarchy of structs and unions to avoid the need to initialize more than one member of a single union in usage cases that make sense. further work would be needed to eliminate even the ones with no practical applications. at the same time, some fixes are made to the exposed names for nonstandard fields, to match what software using them expects.
2014-03-18fix signal.h breakage from moving stack_t to arch-specific bitsRich Felker1-0/+2
in the previous changes, I missed the fact that both the prototype of the sigaltstack function and the definition of ucontext_t depend on stack_t.
2014-03-18move signal.h definition of stack_t to arch-specific bitsRich Felker1-6/+0
it's different at least on mips. mips version will be fixed in a separate commit to show the change.
2014-01-07fix const-correctness in sigandset/sigorset argumentsRich Felker1-2/+2
this change is consistent with the corresponding glibc functions and is semantically const-correct. the incorrect argument types without const seem to have been taken from erroneous man pages.
2013-10-20fix multiple minor namespace issues in headersRich Felker1-4/+1
fcntl.h: AT_* is not a reserved namespace so extensions cannot be exposed by default. langinfo.h: YESSTR and NOSTR were removed from the standard. limits.h: NL_NMAX was removed from the standard. signal.h: the conditional for NSIG was wrongly checking _XOPEN_SOURCE rather than _BSD_SOURCE. this was purely a mistake; it doesn't even match the commit message from the commit that added it.
2013-07-24fix incorrect type for new si_call_addr in siginfo_tRich Felker1-3/+3
apparently the original kernel commit's i386 version of siginfo.h defined this field as unsigned int, but the asm-generic file always had void *. unsigned int is obviously not a suitable type for an address, in a non-arch-specific file, and glibc also has void * here, so I think void * is the right type for it. also fix redundant type specifiers.
2013-07-24update siginfo according to linux headersSzabolcs Nagy1-1/+13
linux commit a0727e8ce513fe6890416da960181ceb10fbfae6 (2012-04-12) added siginfo fields for SIGSYS (seccomp uses it) linux commit ad5fa913991e9e0f122b021e882b0d50051fbdbc (2009-09-16) added siginfo field and si_code values for SIGBUS (hwpoison signal)
2013-07-22refactor headers, especially alltypes.h, and improve C++ ABI compatRich Felker1-17/+15
the arch-specific bits/alltypes.h.sh has been replaced with a generic alltypes.h.in and minimal arch-specific bits/alltypes.h.in. this commit is intended to have no functional changes except: - exposing additional symbols that POSIX allows but does not require - changing the C++ name mangling for some types - fixing the signedness of blksize_t on powerpc (POSIX requires signed) - fixing the limit macros for sig_atomic_t on x86_64 - making dev_t an unsigned type (ABI matching goal, and more logical) in addition, some types that were wrongly defined with long on 32-bit archs were changed to int, and vice versa; this change is non-functional except for the possibility of making pointer types mismatch, and only affects programs that were using them incorrectly, and only at build-time, not runtime. the following changes were made in the interest of moving non-arch-specific types out of the alltypes system and into the headers they're associated with, and also will tend to improve application compatibility: - netdb.h now includes netinet/in.h (for socklen_t and uint32_t) - netinet/in.h now includes sys/socket.h and inttypes.h - sys/resource.h now includes sys/time.h (for struct timeval) - sys/wait.h now includes signal.h (for siginfo_t) - langinfo.h now includes nl_types.h (for nl_item) for the types in stdint.h: - types which are of no interest to other headers were moved out of the alltypes system. - fast types for 8- and 64-bit are hard-coded (at least for now); only the 16- and 32-bit ones have reason to vary by arch. and the following types have been changed for C++ ABI purposes; - mbstate_t now has a struct tag, __mbstate_t - FILE's struct tag has been changed to _IO_FILE - DIR's struct tag has been changed to __dirstream - locale_t's struct tag has been changed to __locale_struct - pthread_t is defined as unsigned long in C++ mode only - fpos_t now has a struct tag, _G_fpos64_t - fsid_t's struct tag has been changed to __fsid_t - idtype_t has been made an enum type (also required by POSIX) - nl_catd has been changed from long to void * - siginfo_t's struct tag has been removed - sigset_t's has been given a struct tag, __sigset_t - stack_t has been given a struct tag, sigaltstack - suseconds_t has been changed to long on 32-bit archs - [u]intptr_t have been changed from long to int rank on 32-bit archs - dev_t has been made unsigned summary of tests that have been performed against these changes: - nsz's libc-test (diff -u before and after) - C++ ABI check symbol dump (diff -u before, after, glibc) - grepped for __NEED, made sure types needed are still in alltypes - built gcc 3.4.6
2013-03-04fix some obscure header type size/alignment issuesRich Felker1-1/+1
2012-12-06add sigandset and sigorset (needed for qemu)rofl0r1-0/+3
2012-12-03feature test macros: make _GNU_SOURCE enable everythingRich Felker1-1/+1
previously, a few BSD features were enabled only by _BSD_SOURCE, not by _GNU_SOURCE. since _BSD_SOURCE is default in the absence of other feature test macros, this made adding _GNU_SOURCE to a project not a purely additive feature test macro; it actually caused some features to be suppressed. most of the changes made by this patch actually bring musl in closer alignment with the glibc behavior for _GNU_SOURCE. the only exceptions are the added visibility of functions like strlcpy which were BSD-only due to being disliked/rejected by glibc maintainers. here, I feel the consistency of having _GNU_SOURCE mean "everything", and especially the property of it being purely additive, are more valuable than hiding functions which glibc does not have.
2012-11-30provide NSIG under _BSD_SOURCE (default) as well as _GNU_SOURCERich Felker1-1/+4
this fixes a regression related to the changes made to bits/signal.h between 0.9.7 and 0.9.8 that broke some (non-portable) software.
2012-11-25fixup mcontext stuff to expost gregset_t/fpregset_t as appropriateRich Felker1-0/+1
2012-11-21add back NSIG, removed from powerpc in last commit, but for all archsRich Felker1-0/+1
unlike the previous definition, NSIG/_NSIG is supposed to be one more than the highest signal number. adding this will allow simplifying libc-internal code that makes signal-related syscalls, which can be done as a later step. some apps might use it too; while this usage is questionable, it's at least not insane.
2012-09-07default features: make musl usable without feature test macrosRich Felker1-5/+1
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.
2012-09-06use restrict everywhere it's required by c99 and/or posix 2008Rich Felker1-7/+13
to deal with the fact that the public headers may be used with pre-c99 compilers, __restrict is used in place of restrict, and defined appropriately for any supported compiler. we also avoid the form [restrict] since older versions of gcc rejected it due to a bug in the original c99 standard, and instead use the form *restrict.
2012-07-12fix redef of sigprocmask constants on mipsRich Felker1-2/+0
this fix is easier than trying to reorder the header stuff
2012-07-12more mips bits-header fixesRich Felker1-0/+2
signal handling was very broken because of this
2012-05-22bsd_signal is a legacy (removed) XSI function, not needed in _BSD_SOURCERich Felker1-4/+1
its only purpose was for use on non-BSD systems that implement sysv semantics for signal() by default.
2012-05-22support _BSD_SOURCE feature test macroRich Felker1-2/+10
patch by Isaac Dunham. matched closely (maybe not exact) to glibc's idea of what _BSD_SOURCE should make visible.
2012-04-13rename __sa_restorer to sa_restorer in struct sigactionRich Felker1-1/+1
this is legal since sa_* is in the reserved namespace for signal.h, per posix. note that the sa_restorer field is not used anywhere, so programs that are trying to use it may still break, but at least they'll compile. if it turns out such programs actually need to be able to set their own sa_restorer to function properly, i'll add the necessary code to sigaction.c later.
2012-01-25fix typo in FPE_FLTUND definition, signal.hRich Felker1-1/+1
2011-09-21fix missing SIG_DFL, SIG_IGN, SIG_ERR without posix in signal.hRich Felker1-5/+6
2011-09-20fix broken siginfo_t with _GNU_SOURCE definedRich Felker1-6/+5
this bug was introduced in a recent patch. the problem we're working around is that broken GNU software wants to use "struct siginfo" rather than "siginfo_t", but "siginfo" is not in the reserved namespace and thus not legal for the standard header to use.
2011-09-19add some more siginfo aliases broken software expects...Rich Felker1-0/+2
2011-09-19cleanup redundancy in bits/signal.h versionsRich Felker1-4/+108
2011-09-12implement gnu sigisemptysetRich Felker1-0/+1
2011-09-02fix missing prototypes/wrong signature for psiginfo, psignalRich Felker1-0/+3
2011-06-16fix some struct padding to match LSB/glibc ABI where it may be helpfulRich Felker1-0/+1
2011-05-05add SA_NOMASK alias for SA_NODEFER with _GNU_SOURCERich Felker1-0/+1
2011-04-13fix incorrect GNU sighandler_t typedefRich Felker1-1/+1
2011-03-29implement POSIX timersRich Felker1-6/+16
this implementation is superior to the glibc/nptl implementation, in that it gives true realtime behavior. there is no risk of timer expiration events being lost due to failed thread creation or failed malloc, because the thread is created as time creation time, and reused until the timer is deleted.
2011-02-20move the GNU siginfo renaming so it doesn't lead to mismatching namesRich Felker1-1/+4
2011-02-16some gnu software wrongly uses "struct siginfo" instead of siginfo_t...Rich Felker1-0/+1
2011-02-15fix broken signal.h from header cleanupRich Felker1-2/+2
2011-02-15fix some type leakage (timer_t) from x86_64 commitRich Felker1-1/+0
2011-02-15Port musl to x86-64. One giant commit!Nicholas J. Kain1-0/+1
2011-02-14header cleanup, conformance fixes - signalsRich Felker1-13/+19
2011-02-12initial check-in, version 0.5.0v0.5.0Rich Felker1-0/+98