From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id 652DC3858CDA for ; Sat, 15 Oct 2022 16:36:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 652DC3858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62f.google.com with SMTP id 10so7393043pli.0 for ; Sat, 15 Oct 2022 09:36:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SrrW6kE7Ez2Dr55KBdekvkvKhRpQUsiLByNA5bvelO8=; b=aS0jvvDRAYDRxOyGC11rpOjDbfn4RmrYrQQ1YA9Ztrc1cjqrhVZHHHvp6tGsE+CnLJ rUEQP5Zfcwgpmf+7xzIjLTJncikdTNGXZAz12vluzqWh/SP20T+dt3Zs36Vl5In2mAZF wTAZofhMBziL0aMNA1eBXpC9UqTXpqqsDhcxoNZmgFReWAx/K/vqzt1JWgm33suMR8dD r/gjSV3kZj4xi4xRN70agrRzsUZXOreioFayjt9E5udsMSa1e3//1U4v3V5+6WhTo9Uy g9Vs1L1FdDBvAyJ2HCnlMqCuBVkK5aDPsQIySHmpXI9HT1TIarv2/pAXLAEaMD6wuRoy N57g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SrrW6kE7Ez2Dr55KBdekvkvKhRpQUsiLByNA5bvelO8=; b=vvyjsLXPMD8KwIHPrEKqONHBHec6tNoTcZ2rgHMgqtUUeEPZGdtkjGiHiCdJdAmgW0 mAxnKBeSJ65O6aOMbp/iMgN8dgCx+9ZWpqeKhuDNI9ATNzIKPXQ4qPwIRVD7sAqLX6uF rkFRgZvJhBNfGlfatsQ46L3pARZCiWcP3qJe/tuSRIXtX98c3rao8W+07JpbnPFfQNtZ dxtK9oI3wViQrjUfd1OyT5nkaq57LTpaKqbhd521PCyOgDjuOk/oZjARRwHErJWk7kvJ ENjKf2cb7u/vmEaclG9P94vGZtynBHC8kb359GmpR7hRb11NwJgnGl+VqQhsCdI3ircz 6yQQ== X-Gm-Message-State: ACrzQf3VCoUDBX2cXZochEaY6LPkgXTQdW08ehsi9c3Jhk+U6HmqTBAV 6tRWn81oa/S+LzSUIvTAssRsrTqP4elV8A== X-Google-Smtp-Source: AMsMyM7KhZuSZRYuDOXohkJYtc/tkutZhM+8PlRI2xFJtXUvWDFH6MoIyvsTadJJH3xtVpe4zv+8nQ== X-Received: by 2002:a17:90b:1b42:b0:20d:6ddd:9ed2 with SMTP id nv2-20020a17090b1b4200b0020d6ddd9ed2mr24392884pjb.232.1665851802071; Sat, 15 Oct 2022 09:36:42 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id b5-20020a62a105000000b0056299fd2ba2sm3760622pff.162.2022.10.15.09.36.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Oct 2022 09:36:41 -0700 (PDT) From: Yonggang Luo To: elfutils-devel@sourceware.org Cc: Yonggang Luo Subject: [PATCH v2 3/7] Move the #include into eu-config.h Date: Sun, 16 Oct 2022 00:36:21 +0800 Message-Id: <20221015163622.129-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.36.1.windows.1 In-Reply-To: <20221015163622.129-1-luoyonggang@gmail.com> References: <20221015163622.129-1-luoyonggang@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: So we do not need include in each file. And indeed the macro #define _(Str) dgettext ("elfutils", Str) access libintl function dgettext, so it's make more sense #include in file eu-config.h Signed-off-by: Yonggang Luo --- debuginfod/debuginfod.cxx | 1 - lib/color.c | 1 - lib/eu-config.h | 1 + lib/printversion.c | 1 - lib/xasprintf.c | 1 - lib/xmalloc.c | 1 - libasm/asm_end.c | 1 - libasm/asm_error.c | 1 - libasm/asm_newscn.c | 1 - libcpu/i386_lex.l | 1 - libcpu/i386_parse.y | 1 - libdw/libdwP.h | 1 - libdwfl/argp-std.c | 1 - libdwfl/dwfl_error.c | 1 - libebl/libeblP.h | 1 - libelf/elf_error.c | 1 - src/addr2line.c | 1 - src/ar.c | 1 - src/arlib-argp.c | 1 - src/arlib.c | 1 - src/arlib2.c | 1 - src/elfcmp.c | 1 - src/elflint.c | 1 - src/findtextrel.c | 1 - src/nm.c | 1 - src/objdump.c | 1 - src/ranlib.c | 1 - src/readelf.c | 1 - src/size.c | 1 - src/strings.c | 1 - src/strip.c | 1 - src/unstrip.c | 1 - 32 files changed, 1 insertion(+), 31 deletions(-) diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx index 000a41c4..8e7ee499 100644 --- a/debuginfod/debuginfod.cxx +++ b/debuginfod/debuginfod.cxx @@ -47,7 +47,6 @@ extern "C" { #include #include -#include #include #include #include diff --git a/lib/color.c b/lib/color.c index e43b6143..bd105ec2 100644 --- a/lib/color.c +++ b/lib/color.c @@ -32,7 +32,6 @@ #endif #include -#include #include #include #include diff --git a/lib/eu-config.h b/lib/eu-config.h index c7d7cbb2..78a5c4fe 100644 --- a/lib/eu-config.h +++ b/lib/eu-config.h @@ -52,6 +52,7 @@ # define rwlock_unlock(lock) ((void) (lock)) #endif /* USE_LOCKS */ +#include /* gettext helper macros. */ #define N_(Str) Str #define _(Str) dgettext ("elfutils", Str) diff --git a/lib/printversion.c b/lib/printversion.c index f657329c..7d31fa83 100644 --- a/lib/printversion.c +++ b/lib/printversion.c @@ -30,7 +30,6 @@ # include #endif -#include #include "printversion.h" void diff --git a/lib/xasprintf.c b/lib/xasprintf.c index 179ea2e8..d61fad90 100644 --- a/lib/xasprintf.c +++ b/lib/xasprintf.c @@ -33,7 +33,6 @@ #include #include #include -#include #include "libeu.h" #include "system.h" diff --git a/lib/xmalloc.c b/lib/xmalloc.c index 7c094985..de7211f1 100644 --- a/lib/xmalloc.c +++ b/lib/xmalloc.c @@ -30,7 +30,6 @@ # include #endif -#include #include #include #include diff --git a/libasm/asm_end.c b/libasm/asm_end.c index 077d2aa5..a26120f2 100644 --- a/libasm/asm_end.c +++ b/libasm/asm_end.c @@ -32,7 +32,6 @@ #endif #include -#include #include #include #include diff --git a/libasm/asm_error.c b/libasm/asm_error.c index cc3e660b..2b769395 100644 --- a/libasm/asm_error.c +++ b/libasm/asm_error.c @@ -31,7 +31,6 @@ # include #endif -#include #include #include diff --git a/libasm/asm_newscn.c b/libasm/asm_newscn.c index 1150015f..d258d969 100644 --- a/libasm/asm_newscn.c +++ b/libasm/asm_newscn.c @@ -32,7 +32,6 @@ #endif #include -#include #include #include diff --git a/libcpu/i386_lex.l b/libcpu/i386_lex.l index b6ec0f87..9b33ed95 100644 --- a/libcpu/i386_lex.l +++ b/libcpu/i386_lex.l @@ -31,7 +31,6 @@ #endif #include -#include #include #include "system.h" diff --git a/libcpu/i386_parse.y b/libcpu/i386_parse.y index 9a92c2e0..d2236d59 100644 --- a/libcpu/i386_parse.y +++ b/libcpu/i386_parse.y @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/libdw/libdwP.h b/libdw/libdwP.h index 56b388c1..961fa4e7 100644 --- a/libdw/libdwP.h +++ b/libdw/libdwP.h @@ -29,7 +29,6 @@ #ifndef _LIBDWP_H #define _LIBDWP_H 1 -#include #include #include diff --git a/libdwfl/argp-std.c b/libdwfl/argp-std.c index 01ec18e2..bc013aa0 100644 --- a/libdwfl/argp-std.c +++ b/libdwfl/argp-std.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c index a5c683a9..43fa1dcc 100644 --- a/libdwfl/dwfl_error.c +++ b/libdwfl/dwfl_error.c @@ -31,7 +31,6 @@ #endif #include -#include #include #include #include diff --git a/libebl/libeblP.h b/libebl/libeblP.h index fa1c2c9f..c408ed97 100644 --- a/libebl/libeblP.h +++ b/libebl/libeblP.h @@ -32,7 +32,6 @@ #include #include #include -#include /* Backend handle. */ diff --git a/libelf/elf_error.c b/libelf/elf_error.c index 5364e685..e596108d 100644 --- a/libelf/elf_error.c +++ b/libelf/elf_error.c @@ -32,7 +32,6 @@ #endif #include -#include #include #include #include diff --git a/src/addr2line.c b/src/addr2line.c index 25db2926..7768b266 100644 --- a/src/addr2line.c +++ b/src/addr2line.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ar.c b/src/ar.c index 04456c18..3bcb18fe 100644 --- a/src/ar.c +++ b/src/ar.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/arlib-argp.c b/src/arlib-argp.c index a3c12e4d..115b9d76 100644 --- a/src/arlib-argp.c +++ b/src/arlib-argp.c @@ -20,7 +20,6 @@ #endif #include -#include #include "arlib.h" diff --git a/src/arlib.c b/src/arlib.c index c09fc3c6..b8f89ba7 100644 --- a/src/arlib.c +++ b/src/arlib.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/arlib2.c b/src/arlib2.c index 11f44e5d..9ae6662c 100644 --- a/src/arlib2.c +++ b/src/arlib2.c @@ -20,7 +20,6 @@ # include #endif -#include #include #include diff --git a/src/elfcmp.c b/src/elfcmp.c index 21d8d9dc..fba67e02 100644 --- a/src/elfcmp.c +++ b/src/elfcmp.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/elflint.c b/src/elflint.c index b0e5415e..565cffdc 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/src/findtextrel.c b/src/findtextrel.c index ecb1d118..d3021a3a 100644 --- a/src/findtextrel.c +++ b/src/findtextrel.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/nm.c b/src/nm.c index 16647589..b46c1fd7 100644 --- a/src/nm.c +++ b/src/nm.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/src/objdump.c b/src/objdump.c index b32de17d..d43c1dd6 100644 --- a/src/objdump.c +++ b/src/objdump.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/src/ranlib.c b/src/ranlib.c index bd7e1d8a..7838d69e 100644 --- a/src/ranlib.c +++ b/src/ranlib.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/readelf.c b/src/readelf.c index 1a10fd01..a206e60e 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include diff --git a/src/size.c b/src/size.c index 8f203167..ff8ca075 100644 --- a/src/size.c +++ b/src/size.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/src/strings.c b/src/strings.c index 04aac3b6..55b047be 100644 --- a/src/strings.c +++ b/src/strings.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/strip.c b/src/strip.c index 452b1279..2a2cc801 100644 --- a/src/strip.c +++ b/src/strip.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/src/unstrip.c b/src/unstrip.c index 3472637a..d5bd1821 100644 --- a/src/unstrip.c +++ b/src/unstrip.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include -- 2.36.1.windows.1