musl/include/syslog.h, branch master musl - an implementation of the standard library for Linux-based systems syslog: revert LOG_FAC/LOG_FACMASK changes 2024年07月05日T17:22:25+00:00 Rich Felker dalias@aerifal.cx 2024年07月05日T17:22:25+00:00 dd1e63c3638d5f9afb857fccf6ce1415ca5f1b8b commit 895736d49bd2bb318c69de99a05ea70c035c2da9 made these changes along with fixing a real bug in LOG_MAKEPRI. based on further information, they do not seem to be well-motivated or in line with policy. the result of LOG_FAC is not a meaningful facility value if we shift it down like before, but apparently the way it is used by applications is as an index into an array of facility names. moreover, all historical systems which define it do so with the shift. as it is a nonstandard interface, there is no justification for providing a macro by the same name that is incompatible with historical practice. the value of LOG_FACMASK likewise is 0x3f8 on all historical systems checked. while only 5 bits are used for existing facility codes, the convention seems to be that all 7 bits belong to the facility field and theoretically could be used to expand to having more facilities. that seems unlikely to happen, but there is no reason to make a gratuitously incompatible change here.
commit 895736d49bd2bb318c69de99a05ea70c035c2da9 made these changes
along with fixing a real bug in LOG_MAKEPRI. based on further
information, they do not seem to be well-motivated or in line with
policy.
the result of LOG_FAC is not a meaningful facility value if we shift
it down like before, but apparently the way it is used by applications
is as an index into an array of facility names. moreover, all
historical systems which define it do so with the shift. as it is a
nonstandard interface, there is no justification for providing a macro
by the same name that is incompatible with historical practice.
the value of LOG_FACMASK likewise is 0x3f8 on all historical systems
checked. while only 5 bits are used for existing facility codes, the
convention seems to be that all 7 bits belong to the facility field
and theoretically could be used to expand to having more facilities.
that seems unlikely to happen, but there is no reason to make a
gratuitously incompatible change here.
syslog: fix incorrect LOG_MAKEPRI and LOG_FAC[MASK] macros 2024年06月13日T15:48:40+00:00 Rich Felker dalias@aerifal.cx 2024年06月13日T15:48:40+00:00 895736d49bd2bb318c69de99a05ea70c035c2da9 these are nonstandard and unnecessary for using the associated functionality, but resulted in applications that used them malfunctioning. patch based on proposed fix by erny hombre.
these are nonstandard and unnecessary for using the associated
functionality, but resulted in applications that used them
malfunctioning.
patch based on proposed fix by erny hombre.
remove hack in syslog.h that resulted in aliasing violations 2014年06月21日T11:44:46+00:00 Rich Felker dalias@aerifal.cx 2014年06月21日T11:44:46+00:00 70d9c303b3115ab0fe6060ba0f7b0e4c0a2320b7 this issue affected the prioritynames and facilitynames arrays which are only provided when requested (usually by syslogd implementations) and which are presently defined as compound literals. the aliasing violation seems to have been introduced as a workaround for bad behavior by gcc's -Wwrite-strings option, but it caused compilers to completely optimize out the contents of prioritynames and facilitynames since, under many usage cases, the aliasing rules prove that the contents are never accessed.
this issue affected the prioritynames and facilitynames arrays which
are only provided when requested (usually by syslogd implementations)
and which are presently defined as compound literals. the aliasing
violation seems to have been introduced as a workaround for bad
behavior by gcc's -Wwrite-strings option, but it caused compilers to
completely optimize out the contents of prioritynames and
facilitynames since, under many usage cases, the aliasing rules prove
that the contents are never accessed.
add parens when bit and arith ops are mixed in macros in public headers 2014年02月11日T17:02:06+00:00 Szabolcs Nagy nsz@port70.net 2014年02月11日T17:02:06+00:00 e74f3b0234de9a8e0596166bdfa04af3f031249c another commit to silence gcc warnings (-Wparentheses) for standard headers. changed macros: LOG_UPTO, IN6_ARE_ADDR_EQUAL
another commit to silence gcc warnings (-Wparentheses) for standard headers.
changed macros: LOG_UPTO, IN6_ARE_ADDR_EQUAL
use 0 instead of NULL in headers where NULL is not defined 2013年11月24日T00:34:07+00:00 Szabolcs Nagy nsz@port70.net 2013年11月24日T00:34:07+00:00 10c8b7148b918938d8e681c5801b913dd56cb7e4 some macros in sys/mtio.h and syslog.h used NULL without defining it
some macros in sys/mtio.h and syslog.h used NULL without defining it
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.
header file fixes: multiple include guard consistency and correctness 2012年06月16日T01:52:53+00:00 Rich Felker dalias@aerifal.cx 2012年06月16日T01:52:53+00:00 57d5fff5f7dd9af27152c84ce041c18597a22766 one file was reusing another file's macro name, and many had inconsistent underscores and application of SYS prefix, etc. patch by Szabolcs Nagy (nsz)
one file was reusing another file's macro name, and many had
inconsistent underscores and application of SYS prefix, etc.
patch by Szabolcs Nagy (nsz)
support _BSD_SOURCE feature test macro 2012年05月23日T01:52:08+00:00 Rich Felker dalias@aerifal.cx 2012年05月23日T01:52:08+00:00 419ae6d5c95629d3ebaff6f1880d52cb027ba924 patch by Isaac Dunham. matched closely (maybe not exact) to glibc's idea of what _BSD_SOURCE should make visible.
patch by Isaac Dunham. matched closely (maybe not exact) to glibc's
idea of what _BSD_SOURCE should make visible.
fix missing va_list for vsyslog 2012年05月13日T02:18:34+00:00 Rich Felker dalias@aerifal.cx 2012年05月13日T02:18:34+00:00 c3dbe9b22c93c187d806f5def44da5b47744923c
move vsyslog out of SYSLOG_NAMES conditional 2012年05月11日T02:41:54+00:00 Rich Felker dalias@aerifal.cx 2012年05月11日T02:41:54+00:00 c8b01e73cad6a3edea7bfdf4e674f945fd7b6de3

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