]> git.ipfire.org Git - thirdparty/glibc.git/commit
Swap sys/syslog.h with syslog.h.
authorZack Weinberg <zackw@panix.com>
Tue, 18 Jun 2019 15:45:26 +0000 (11:45 -0400)
committerZack Weinberg <zackw@panix.com>
Wed, 8 Jan 2020 17:56:34 +0000 (12:56 -0500)
commit5ad1fcd032064772025675690dea8e6335592c18
treef9f2dc5f1c1b2f6a063a3bd9b49fef5c36ddcfcc
parent86130d1b3749542aba2ac7949b6d2fe270a4a4b8
Swap sys/syslog.h with syslog.h.

Our installed syslog.h is a trivial wrapper around sys/syslog.h, which
is where all the actual declarations are.  This is backward from
POSIX, which specifies syslog.h and its contents, and does not specify
sys/syslog.h.  This arrangement appears to have been inherited from
some BSD-phylum C library, and probably pre-dates any standardization
of syslog.

This patch swaps the contents of syslog.h and sys/syslog.h, so that
the actual declarations appear under the standardized name.  Since it
is necessary to adjust all of syslog.h’s bits headers, I also added
multiple-include guards to those files that didn’t already have
them.  (All installed headers should have multiple-include guards,
even if they are internal and only used in one public header.  The
“never include this file directly” #error convention doesn’t protect
against including the internal header a second time after its parent
header has already been included.)

* misc/sys/syslog.h: Exchange contents with...
* misc/syslog.h: ...this file.  Adjust multiple-include guards.

* include/sys/syslog.h: Exchange contents with...
* include/syslog.h: ...this file.  Adjust multiple-include guards.

* bits/syslog-path.h, misc/bits/syslog-ldbl.h
* misc/bits/syslog.h: Allow inclusion by syslog.h, not sys/syslog.h.
Add multiple-include guard where not already present.

* scripts/check-obsolete-constructs.py (HEADER_ALLOWED_INCLUDES):
        Update.
bits/syslog-path.h
include/sys/syslog.h
include/syslog.h
misc/bits/syslog-ldbl.h
misc/bits/syslog.h
misc/sys/syslog.h
misc/syslog.h
scripts/check-obsolete-constructs.py