From patchwork Fri Aug 28 15:07:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 11743197 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4658813B6 for ; Fri, 28 Aug 2020 15:23:36 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2B09520757 for ; Fri, 28 Aug 2020 15:23:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B09520757 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kBgCs-0008Tm-Lq; Fri, 28 Aug 2020 15:22:22 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kBg00-0004eL-KB for xen-devel@lists.xenproject.org; Fri, 28 Aug 2020 15:09:04 +0000 X-Inumbo-ID: 83f0d348-c298-451c-8ae7-9702511c00d4 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 83f0d348-c298-451c-8ae7-9702511c00d4; Fri, 28 Aug 2020 15:07:58 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 46EE9AF9A; Fri, 28 Aug 2020 15:08:27 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross , Ian Jackson , Wei Liu , Anthony PERARD Subject: [PATCH v4 24/31] tools/libxl: don't include libxl_osdeps.h from libxlutil sources Date: Fri, 28 Aug 2020 17:07:40 +0200 Message-Id: <20200828150747.25305-25-jgross@suse.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200828150747.25305-1-jgross@suse.com> References: <20200828150747.25305-1-jgross@suse.com> MIME-Version: 1.0 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" There is no need for the sources of libxlutil to include libxl_osdeps.h as the only dependency is the leading #define _GNU_SOURCE in libxl_osdeps.h. So replace including libxl_osdeps.h by the needed define. Signed-off-by: Juergen Gross Acked-by: Wei Liu --- tools/libxl/libxlu_cfg.c | 3 +-- tools/libxl/libxlu_cfg_i.h | 1 - tools/libxl/libxlu_disk.c | 1 - tools/libxl/libxlu_disk_l.c | 14 +++++++------- tools/libxl/libxlu_disk_l.h | 8 ++++---- tools/libxl/libxlu_disk_l.l | 2 +- tools/libxl/libxlu_pci.c | 3 ++- tools/libxl/libxlu_vif.c | 3 ++- 8 files changed, 17 insertions(+), 18 deletions(-) diff --git a/tools/libxl/libxlu_cfg.c b/tools/libxl/libxlu_cfg.c index f9e8aa2f3a..874f5abfb9 100644 --- a/tools/libxl/libxlu_cfg.c +++ b/tools/libxl/libxlu_cfg.c @@ -15,8 +15,7 @@ * GNU Lesser General Public License for more details. */ - -#include "libxl_osdeps.h" /* must come before any other headers */ +#define _GNU_SOURCE #include diff --git a/tools/libxl/libxlu_cfg_i.h b/tools/libxl/libxlu_cfg_i.h index 87b19df311..4217f5b28d 100644 --- a/tools/libxl/libxlu_cfg_i.h +++ b/tools/libxl/libxlu_cfg_i.h @@ -18,7 +18,6 @@ #ifndef LIBXLU_CFG_I_H #define LIBXLU_CFG_I_H -#include "libxl_osdeps.h" /* must come before any other headers */ #include "libxlu_internal.h" #include "libxlu_cfg_y.h" diff --git a/tools/libxl/libxlu_disk.c b/tools/libxl/libxlu_disk.c index 18fe386dbe..1de16a6a06 100644 --- a/tools/libxl/libxlu_disk.c +++ b/tools/libxl/libxlu_disk.c @@ -1,4 +1,3 @@ -#include "libxl_osdeps.h" /* must come before any other headers */ #include "libxlu_internal.h" #include "libxlu_disk_l.h" #include "libxlu_disk_i.h" diff --git a/tools/libxl/libxlu_disk_l.c b/tools/libxl/libxlu_disk_l.c index 05f7ac74a0..32d4b74b58 100644 --- a/tools/libxl/libxlu_disk_l.c +++ b/tools/libxl/libxlu_disk_l.c @@ -1,7 +1,7 @@ -#line 2 "libxlu_disk_l.c" -#include "libxl_osdeps.h" /* must come before any other headers */ +#line 1 "libxlu_disk_l.c" +#define _GNU_SOURCE -#line 5 "libxlu_disk_l.c" +#line 4 "libxlu_disk_l.c" #define YY_INT_ALIGNED short int @@ -1199,9 +1199,9 @@ static int vdev_and_devtype(DiskParseContext *dpc, char *str) { #undef DPC /* needs to be defined differently the actual lexer */ #define DPC ((DiskParseContext*)yyextra) -#line 1203 "libxlu_disk_l.c" +#line 1202 "libxlu_disk_l.c" -#line 1205 "libxlu_disk_l.c" +#line 1204 "libxlu_disk_l.c" #define INITIAL 0 #define LEXERR 1 @@ -1483,7 +1483,7 @@ YY_DECL #line 180 "libxlu_disk_l.l" /*----- the scanner rules which do the parsing -----*/ -#line 1487 "libxlu_disk_l.c" +#line 1486 "libxlu_disk_l.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1836,7 +1836,7 @@ YY_RULE_SETUP #line 291 "libxlu_disk_l.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1840 "libxlu_disk_l.c" +#line 1839 "libxlu_disk_l.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(LEXERR): yyterminate(); diff --git a/tools/libxl/libxlu_disk_l.h b/tools/libxl/libxlu_disk_l.h index 54f4662d7a..6abeecf279 100644 --- a/tools/libxl/libxlu_disk_l.h +++ b/tools/libxl/libxlu_disk_l.h @@ -2,10 +2,10 @@ #define xlu__disk_yyHEADER_H 1 #define xlu__disk_yyIN_HEADER 1 -#line 6 "libxlu_disk_l.h" -#include "libxl_osdeps.h" /* must come before any other headers */ +#line 5 "libxlu_disk_l.h" +#define _GNU_SOURCE -#line 9 "libxlu_disk_l.h" +#line 8 "libxlu_disk_l.h" #define YY_INT_ALIGNED short int @@ -696,6 +696,6 @@ extern int yylex (yyscan_t yyscanner); #line 291 "libxlu_disk_l.l" -#line 700 "libxlu_disk_l.h" +#line 699 "libxlu_disk_l.h" #undef xlu__disk_yyIN_HEADER #endif /* xlu__disk_yyHEADER_H */ diff --git a/tools/libxl/libxlu_disk_l.l b/tools/libxl/libxlu_disk_l.l index 7a46f4a30c..3bd639aab0 100644 --- a/tools/libxl/libxlu_disk_l.l +++ b/tools/libxl/libxlu_disk_l.l @@ -28,7 +28,7 @@ */ %top{ -#include "libxl_osdeps.h" /* must come before any other headers */ +#define _GNU_SOURCE } %{ diff --git a/tools/libxl/libxlu_pci.c b/tools/libxl/libxlu_pci.c index e2709c5f89..12fc0b3a7f 100644 --- a/tools/libxl/libxlu_pci.c +++ b/tools/libxl/libxlu_pci.c @@ -1,4 +1,5 @@ -#include "libxl_osdeps.h" /* must come before any other headers */ +#define _GNU_SOURCE + #include "libxlu_internal.h" #include "libxlu_disk_l.h" #include "libxlu_disk_i.h" diff --git a/tools/libxl/libxlu_vif.c b/tools/libxl/libxlu_vif.c index 0665e624dc..ccf0cbdf57 100644 --- a/tools/libxl/libxlu_vif.c +++ b/tools/libxl/libxlu_vif.c @@ -1,4 +1,5 @@ -#include "libxl_osdeps.h" /* must come before any other headers */ +#define _GNU_SOURCE + #include "libxlu_internal.h" static const char *vif_bytes_per_sec_re = "^[0-9]+[GMK]?[Bb]/s$";