From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39830) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDGJJ-0001aV-65 for qemu-devel@nongnu.org; Wed, 06 Mar 2013 10:31:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDGJH-0001zs-SW for qemu-devel@nongnu.org; Wed, 06 Mar 2013 10:31:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55237) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDGJH-0001ze-Kr for qemu-devel@nongnu.org; Wed, 06 Mar 2013 10:31:15 -0500 Message-ID: <51376134.1090001@redhat.com> Date: Wed, 06 Mar 2013 08:31:00 -0700 From: Eric Blake MIME-Version: 1.0 References: <1362577504-7994-1-git-send-email-lilei@linux.vnet.ibm.com> <1362577504-7994-2-git-send-email-lilei@linux.vnet.ibm.com> In-Reply-To: <1362577504-7994-2-git-send-email-lilei@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2WLEHRONKEVRNUCCUDQJQ" Subject: Re: [Qemu-devel] [PATCH 1/2] qga: add windows implementation for guest-get-time List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lei Li Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2WLEHRONKEVRNUCCUDQJQ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/06/2013 06:45 AM, Lei Li wrote: > Signed-off-by: Lei Li > --- > qga/commands-win32.c | 28 ++++++++++++++++++++++++++++ > 1 files changed, 28 insertions(+), 0 deletions(-) >=20 > diff --git a/qga/commands-win32.c b/qga/commands-win32.c > index 7e8ecb3..4febec7 100644 > --- a/qga/commands-win32.c > +++ b/qga/commands-win32.c > @@ -22,6 +22,8 @@ > #define SHTDN_REASON_FLAG_PLANNED 0x80000000 > #endif > =20 > +#define _W32_FT_OFFSET (116444736000000000ULL) Defining a macro with a leading underscore infringes on the namespace reserved to the system headers and compiler implementation. Drop the leading underscore. As written, the () are redundant. However, it would be nicer to state HOW you came up with this number (and not that you just did a google search for it), as in: /* multiple of 100 nanoseconds elapsed between windows baseline (1/1/1601) and Unix Epoch (1/1/1970), accounting for leap years */ #define W32_FT_OFFSET (10000000ULL * 60 * 60 * 24 * \ (365 * (1970 - 1601) + \ (1970 - 1601) / 4 - 3)) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2WLEHRONKEVRNUCCUDQJQ 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.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRN2E0AAoJEKeha0olJ0NqXT0IAI3OnsQaZrQA7Bg9s1qFUQIE x7L5SARq5p7guA8BM7L1fS+/IcQ6FS+n8B0Um8g98tf8D9XpJBzLuVhXpxf9LEg5 Vtbo/Y5/3kta5uonG5a1944sDy3o6WDQa6q/Kn3x6DAS+GfyRMTTWydXcOc1hJ21 SbmwRV9rBRkF9E51K+tnDkZ1xilk/XkGHdV6zU+x5Ast8smFBod5ypDJHkf6kz3D dYoW44PolL+KKoxSJfWsANm0t1disuC2cNoJjWLHxvGqaxE0A+eeWbh3DZWsBv16 whBeGxeUJUKSFY95IOeeD5TmeJgKvpI0G177q2PL+LtoCv1dISh+0X0QjfYZRHY= =g8bF -----END PGP SIGNATURE----- ------enig2WLEHRONKEVRNUCCUDQJQ--