From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIl2G-0002VV-BJ for qemu-devel@nongnu.org; Tue, 03 Feb 2015 16:29:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIl2D-000478-Dd for qemu-devel@nongnu.org; Tue, 03 Feb 2015 16:29:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIl2D-000472-5l for qemu-devel@nongnu.org; Tue, 03 Feb 2015 16:29:25 -0500 Message-ID: <54D13DB0.2080302@redhat.com> Date: Tue, 03 Feb 2015 14:29:20 -0700 From: Eric Blake MIME-Version: 1.0 References: <1420031214-6053-1-git-send-email-den@openvz.org> <1420031214-6053-2-git-send-email-den@openvz.org> In-Reply-To: <1420031214-6053-2-git-send-email-den@openvz.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Rt6hGdI1MxWCQgklkUraL7or6w5A77Qkx" Subject: Re: [Qemu-devel] [PATCH 1/8] qga: fixed warning in qemu-ga.exe for mingw >= 4.9.1 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: Olga Krishtal , Michael Roth , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Rt6hGdI1MxWCQgklkUraL7or6w5A77Qkx Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12/31/2014 06:06 AM, Denis V. Lunev wrote: > From: Olga Krishtal >=20 > strtok_r was redefined before the patch >=20 > Signed-off-by: Olga Krishtal > Signed-off-by: Denis V. Lunev > CC: Michael Roth > --- > include/sysemu/os-win32.h | 2 ++ > 1 file changed, 2 insertions(+) What's the actual compiler error you get without this patch? >=20 > diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h > index af3fbc4..84e229b 100644 > --- a/include/sysemu/os-win32.h > +++ b/include/sysemu/os-win32.h > @@ -81,7 +81,9 @@ struct tm *gmtime_r(const time_t *timep, struct tm *r= esult); > #undef localtime_r > struct tm *localtime_r(const time_t *timep, struct tm *result); > =20 > +#if defined __MINGW32__ && !(__GNUC__ >=3D 4 && __GNUC_MINOR__ >=3D 9)= > char *strtok_r(char *str, const char *delim, char **saveptr); It feels weird to key off of the gcc version. Whether strtok_r is defined is a property of the system headers, not the compiler. For example, I'm aware a but where older mingw would pollute the namespace with a broken #define of strtok_r; but that has been fixed in newer mingw headers (on Fedora, I know that F20 mingw has the bug, F21 does not). But that is the version of mingw, not the version of gcc, that determined that problem. Therefore, I'm not sure this is the right patch, but without knowing the symptoms it fixes, I don't know if anything is better. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Rt6hGdI1MxWCQgklkUraL7or6w5A77Qkx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJU0T2wAAoJEKeha0olJ0Nq+ecH/2zOAB3D1Z7jSmjo+WEhdYmK 86oHc2ndBRAr7/eg4WnDKriQObugA75w+t2dANyT3oc2fztZZWRm0qVGTA9o6mwR /1DsMUElvR5a+KxC6JX5cfZNTu6GIoUjNcGpUlJANoj+HuDy7K04C7tEyvmIs81i BUPVV0VR2hqfyGpj+8EWcEBxCfzhA+MPJIL3qYQVvYMxIzyDQLp2ZxRWGRES/uKe cUdWVmzTii8hnR/sdWGNhY1Y4CLMzi1yWRmLD4/qRUmkf2sEjA1UFmJgepJ8e7HL AWqdp4Ul3oXKuj087RkmTD4byIYLUbKRm7m5n2imoQzW/ksdP9KpZjhH4Yky7LY= =pkU3 -----END PGP SIGNATURE----- --Rt6hGdI1MxWCQgklkUraL7or6w5A77Qkx--