From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.1 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 92BED1F462 for ; Mon, 29 Jul 2019 16:25:57 +0000 (UTC) Received: from localhost ([::1]:54990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hs8TE-0001lf-5Q for normalperson@yhbt.net; Mon, 29 Jul 2019 12:25:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58745) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hs8T4-0001lG-8m for bug-gnulib@gnu.org; Mon, 29 Jul 2019 12:25:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hs8T2-0002su-Rl for bug-gnulib@gnu.org; Mon, 29 Jul 2019 12:25:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34284) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hs8T2-0002sO-HM for bug-gnulib@gnu.org; Mon, 29 Jul 2019 12:25:44 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C0796308A98C for ; Mon, 29 Jul 2019 16:25:43 +0000 (UTC) Received: from [10.3.116.93] (ovpn-116-93.phx2.redhat.com [10.3.116.93]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 821C13DB6; Mon, 29 Jul 2019 16:25:39 +0000 (UTC) Subject: mingw pollution of DATADIR vs. configmake.h [was: [libvirt] [PATCH v10 08/19] backup: Parse and output checkpoint XML] To: libvir-list@redhat.com References: <20190724055609.30691-1-eblake@redhat.com> <20190724055609.30691-9-eblake@redhat.com> From: Eric Blake Openpgp: preference=signencrypt Autocrypt: addr=eblake@redhat.com; keydata= xsBNBEvHyWwBCACw7DwsQIh0kAbUXyqhfiKAKOTVu6OiMGffw2w90Ggrp4bdVKmCaEXlrVLU xphBM8mb+wsFkU+pq9YR621WXo9REYVIl0FxKeQo9dyQBZ/XvmUMka4NOmHtFg74nvkpJFCD TUNzmqfcjdKhfFV0d7P/ixKQeZr2WP1xMcjmAQY5YvQ2lUoHP43m8TtpB1LkjyYBCodd+LkV GmCx2Bop1LSblbvbrOm2bKpZdBPjncRNob73eTpIXEutvEaHH72LzpzksfcKM+M18cyRH+nP sAd98xIbVjm3Jm4k4d5oQyE2HwOur+trk2EcxTgdp17QapuWPwMfhaNq3runaX7x34zhABEB AAHNHkVyaWMgQmxha2UgPGVibGFrZUByZWRoYXQuY29tPsLAegQTAQgAJAIbAwULCQgHAwUV CgkICwUWAgMBAAIeAQIXgAUCS8fL9QIZAQAKCRCnoWtKJSdDahBHCACbl/5FGkUqJ89GAjeX RjpAeJtdKhujir0iS4CMSIng7fCiGZ0fNJCpL5RpViSo03Q7l37ss+No+dJI8KtAp6ID+PMz wTJe5Egtv/KGUKSDvOLYJ9WIIbftEObekP+GBpWP2+KbpADsc7EsNd70sYxExD3liwVJYqLc Rw7so1PEIFp+Ni9A1DrBR5NaJBnno2PHzHPTS9nmZVYm/4I32qkLXOcdX0XElO8VPDoVobG6 gELf4v/vIImdmxLh/w5WctUpBhWWIfQDvSOW2VZDOihm7pzhQodr3QP/GDLfpK6wI7exeu3P pfPtqwa06s1pae3ad13mZGzkBdNKs1HEm8x6zsBNBEvHyWwBCADGkMFzFjmmyqAEn5D+Mt4P zPdO8NatsDw8Qit3Rmzu+kUygxyYbz52ZO40WUu7EgQ5kDTOeRPnTOd7awWDQcl1gGBXgrkR pAlQ0l0ReO57Q0eglFydLMi5bkwYhfY+TwDPMh3aOP5qBXkm4qIYSsxb8A+i00P72AqFb9Q7 3weG/flxSPApLYQE5qWGSXjOkXJv42NGS6o6gd4RmD6Ap5e8ACo1lSMPfTpGzXlt4aRkBfvb NCfNsQikLZzFYDLbQgKBA33BDeV6vNJ9Cj0SgEGOkYyed4I6AbU0kIy1hHAm1r6+sAnEdIKj cHi3xWH/UPrZW5flM8Kqo14OTDkI9EtlABEBAAHCwF8EGAEIAAkFAkvHyWwCGwwACgkQp6Fr SiUnQ2q03wgAmRFGDeXzc58NX0NrDijUu0zx3Lns/qZ9VrkSWbNZBFjpWKaeL1fdVeE4TDGm I5mRRIsStjQzc2R9b+2VBUhlAqY1nAiBDv0Qnt+9cLiuEICeUwlyl42YdwpmY0ELcy5+u6wz mK/jxrYOpzXKDwLq5k4X+hmGuSNWWAN3gHiJqmJZPkhFPUIozZUCeEc76pS/IUN72NfprZmF Dp6/QDjDFtfS39bHSWXKVZUbqaMPqlj/z6Ugk027/3GUjHHr8WkeL1ezWepYDY7WSoXwfoAL 2UXYsMAr/uUncSKlfjvArhsej0S4zbqim2ZY6S8aRWw94J3bSvJR+Nwbs34GPTD4Pg== Organization: Red Hat, Inc. Message-ID: <6e20ccab-6507-e2ed-bd06-98f7d6112e50@redhat.com> Date: Mon, 29 Jul 2019 11:25:37 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190724055609.30691-9-eblake@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gYkGyCBpCMvSGbfw5tdRTTh1I02tO4VXO" X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Mon, 29 Jul 2019 16:25:43 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Privoznik , pkrempa@redhat.com, Gnulib bugs Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gYkGyCBpCMvSGbfw5tdRTTh1I02tO4VXO Content-Type: multipart/mixed; boundary="zRBYZDolTKcT5Qnxu9JSzDtEIdT3lDamS"; protected-headers="v1" From: Eric Blake To: libvir-list@redhat.com Cc: Michal Privoznik , pkrempa@redhat.com, Gnulib bugs Message-ID: <6e20ccab-6507-e2ed-bd06-98f7d6112e50@redhat.com> Subject: mingw pollution of DATADIR vs. configmake.h [was: [libvirt] [PATCH v10 08/19] backup: Parse and output checkpoint XML] References: <20190724055609.30691-1-eblake@redhat.com> <20190724055609.30691-9-eblake@redhat.com> In-Reply-To: <20190724055609.30691-9-eblake@redhat.com> --zRBYZDolTKcT5Qnxu9JSzDtEIdT3lDamS Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable [adding bug-gnulib] On 7/24/19 12:55 AM, Eric Blake wrote: > Add a new file checkpoint_conf.c that performs the translation to and > from new XML describing a checkpoint. The code shares a common base > class with snapshots, since a checkpoint similarly represents the > domain state at a moment in time. Add some basic testing of round trip > XML handling through the new code. > +++ b/src/conf/checkpoint_conf.c > +#include > + > +#include "configmake.h" > +#include "internal.h" > +#include "virbitmap.h" > +#include "virbuffer.h" > +#include "datatypes.h" This causes a compilation failure on mingw, due to libvirt's "datatypes.h" including after the point at which gnulib's "configmake.h" has already #define'd DATADIR into a string, but mingw's winsock.h tries to use DATADIR as a data-type tag name: make all-am make[1]: Entering directory '/home/berrange/src/virt/libvirt/src' CC conf/libvirt_conf_la-checkpoint_conf.lo In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/objbase.h:66, from /usr/i686-w64-mingw32/sys-root/mingw/include/ole2.h:17, from /usr/i686-w64-mingw32/sys-root/mingw/include/wtypes.h:12, from /usr/i686-w64-mingw32/sys-root/mingw/include/winscard.h:10, from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:97, from /usr/i686-w64-mingw32/sys-root/mingw/include/winsock2.h:23, from ../gnulib/lib/unistd.h:48, from ./driver.h:24, from ./datatypes.h:26, from conf/checkpoint_conf.c:28: /usr/i686-w64-mingw32/sys-root/mingw/include/objidl.h:12275:2: error: expected identifier or '(' before string constant } DATADIR; ^~~~~~~~~ make[1]: *** [Makefile:10127: conf/libvirt_conf_la-checkpoint_conf.lo] Error 1 And it's not the first time libvirt has run into this issue; I've found the following commits in 2015 that worked around it: https://libvirt.org/git/?p=3Dlibvirt.git;a=3Dcommitdiff;h=3D976abdf6 https://libvirt.org/git/?p=3Dlibvirt.git;a=3Dcommitdiff;h=3Dbd205a90 Gnulib should work around this: perhaps "configmake.h" should include first when built on mingw, as that is sufficient to trigger enough other headers to be included such that a later inclusion of after "configmake.h" no longer runs into an issue with the DATADIR pollution breaking compilation, or perhaps gnulib can wrap in such a way that it no longer depends on a tag name DATADIR. In the meantime, I'll push an obvious fix to libvirt to reorder the header inclusions to work around the problem. --=20 Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org --zRBYZDolTKcT5Qnxu9JSzDtEIdT3lDamS-- --gYkGyCBpCMvSGbfw5tdRTTh1I02tO4VXO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEccLMIrHEYCkn0vOqp6FrSiUnQ2oFAl0/HgEACgkQp6FrSiUn Q2pEMwf/fbmq135oFFedxwUmWMmCxIgqthZXNITEzvZsQ+nNeEVR3+WTYkD+hjgQ N1llhzj72FvqREPqxnf0yjyK1e94H/X919BSdlDfb8S9iNPx0JGLMP3Ja0aekXjD PN2dlkWlijGZolvMUlkcDVO+xq2JdCDLxDbDtMLeQXSOn1Eflib3DHgYEiDUp/r5 arMEmyRsIIC4Tzn48NEjwvn590BNfaH9qqUzQ+1TGNZDXH9Urlbx4cHpj7YUn5GO g4NdXsqiLywGuV3YP5bhQuQ4pF+wom2vibDxT8WayIz6fc+yFbl4L6cz8FasU4+t yGXUyl7VQKlaRKCZULdBQW3KJq19pA== =pQKx -----END PGP SIGNATURE----- --gYkGyCBpCMvSGbfw5tdRTTh1I02tO4VXO--