From patchwork Tue Oct 27 14:17:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=89rico_Nogueira?= X-Patchwork-Id: 40885 Return-Path: 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 ; 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?=C3=89rico_Nogueira_via_Libc-alpha?= From: =?utf-8?q?=C3=89rico_Nogueira?= Reply-To: =?utf-8?q?=C3=89rico_Nogueira?= Cc: fweimer@redhat.com, =?utf-8?q?=C3=89rico_Rolim?= Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" From: Érico Rolim 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 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(-) 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 - -__BEGIN_DECLS - /* Standard ELF types. */ #include @@ -4105,6 +4101,4 @@ enum #define R_ARC_TLS_LE_S9 0x4a #define R_ARC_TLS_LE_32 0x4b -__END_DECLS - #endif /* elf.h */