Make elf.h header self contained.
authorÉrico Rolim <ericonr@disroot.org>
Tue, 27 Oct 2020 14:17:41 +0000 (11:17 -0300)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 28 Oct 2020 10:29:16 +0000 (11:29 +0100)
The elf/elf.h header is shared, verbatim, by the elfutils project.
However, elfutils can be used on systems with libcs other than glibc,
making the presence of __BEGIN_DECLS, __END_DECLS and <features.h> in
the file something that downstream distros may have to add patches for.

Furthermore, this file doesn't declare anything with language linkage,
so `extern "C" {}` blocks aren't necessary; it also doesn't have any
conditional definitions based on feature test macros, making inclusion
of features.h unnecessary.

elf/elf.h

index ff9f1da..6439c1a 100644 (file)
--- a/elf/elf.h
+++ b/elf/elf.h
 #ifndef _ELF_H
 #define        _ELF_H 1
 
-#include <features.h>
-
-__BEGIN_DECLS
-
 /* Standard ELF types.  */
 
 #include <stdint.h>
@@ -4105,6 +4101,4 @@ enum
 #define R_ARC_TLS_LE_S9                0x4a
 #define R_ARC_TLS_LE_32                0x4b
 
-__END_DECLS
-
 #endif /* elf.h */