Message ID | 20201027141741.27391-1-ericonr@disroot.org |
---|---|
State | Committed |
Commit | 9538f6b95a3be228edc078ce58258f0574142e0c |
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9C2383840C30; Tue, 27 Oct 2020 14:17:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9C2383840C30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1603808275; bh=AfiW/JExheluKcrYuBtBN1OXqG2LqYsTTIRRpA2a2Cc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=V8+OD+40mXBAUtJnnmz1Db2FclCGVhWVB43V4Q0kXRDzQX13nq962oPLResynFoIt rURbNvff9Jctl7SSGEj6ujeXA00uVlqJ3hXtG4egtlc8+diKwf+O8na8NzaJc+M6s8 X572koCMr6e27zzKFsN4yGaFLCfSu0KNzu/F11vI= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from knopi.disroot.org (knopi.disroot.org [178.21.23.139]) by sourceware.org (Postfix) with ESMTPS id 5AD10386F018 for <libc-alpha@sourceware.org>; Tue, 27 Oct 2020 14:17:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5AD10386F018 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id F2EB7536E9; Tue, 27 Oct 2020 15:17:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FPp7puvJfFW1; Tue, 27 Oct 2020 15:17:47 +0100 (CET) To: libc-alpha@sourceware.org Subject: [PATCH v2] Make elf.h header self contained. Date: Tue, 27 Oct 2020 11:17:41 -0300 Message-Id: <20201027141741.27391-1-ericonr@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: =?utf-8?q?=C3=89rico_Nogueira_via_Libc-alpha?= <libc-alpha@sourceware.org> Reply-To: =?utf-8?q?=C3=89rico_Nogueira?= <ericonr@disroot.org> Cc: fweimer@redhat.com, =?utf-8?q?=C3=89rico_Rolim?= <ericonr@disroot.org> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
[v2] Make elf.h header self contained.
|
|
Commit Message
Érico Nogueira
Oct. 27, 2020, 2:17 p.m. UTC
From: Érico Rolim <ericonr@disroot.org>
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.
---
Per https://sourceware.org/pipermail/elfutils-devel/2020q4/002994.html ,
the elfutils project would prefer to keep maintenance to a minimum,
which can be achieved by making this single header more portable.
elf/elf.h | 6 ------
1 file changed, 6 deletions(-)
Comments
* Érico Nogueira via Libc-alpha: > From: Érico Rolim <ericonr@disroot.org> > > 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. I've pushed this for you after checking that the glibcs stage of build-many-glibcs.py still passes. Thanks, Florian
On Wed Oct 28, 2020 at 9:16 AM -03, Florian Weimer wrote: > * Érico Nogueira via Libc-alpha: > > > From: Érico Rolim <ericonr@disroot.org> > > > > 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. > > I've pushed this for you after checking that the glibcs stage of > build-many-glibcs.py still passes. > > Thanks, > Florian > -- > Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn, > Commercial register: Amtsgericht Muenchen, HRB 153243, > Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael > O'Neill Thank you! Érico
diff --git a/elf/elf.h b/elf/elf.h index ff9f1dadd5..6439c1a4d5 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -19,10 +19,6 @@ #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 */