From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrUkW-0001N1-E5 for qemu-devel@nongnu.org; Tue, 25 Jun 2013 11:01:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrUkR-0003cI-4h for qemu-devel@nongnu.org; Tue, 25 Jun 2013 11:01:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrUkQ-0003c6-Rf for qemu-devel@nongnu.org; Tue, 25 Jun 2013 11:01:35 -0400 Message-ID: <51C9B0B1.7000508@redhat.com> Date: Tue, 25 Jun 2013 17:01:05 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20130606150618.10486.60669.stgit@hds.com> <20130606150638.10486.36820.stgit@hds.com> <51C9B0E5.6040306@redhat.com> In-Reply-To: <51C9B0E5.6040306@redhat.com> Content-Type: multipart/mixed; boundary="------------050800030803000203010206" Subject: Re: [Qemu-devel] [PATCH v4 04/10] Add a script to extract VSS SDK headers on POSIX system List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: libaiqing@huawei.com, mdroth@linux.vnet.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, vrozenfe@redhat.com, Tomoki Sekiyama , seiji.aguchi@hds.com, areis@redhat.com This is a multi-part message in MIME format. --------------050800030803000203010206 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Il 25/06/2013 17:01, Laszlo Ersek ha scritto: > On 06/06/13 17:06, Tomoki Sekiyama wrote: > >> +if ! command -v msiextract > /dev/null; then >> + echo 'msiextract not found. Please install msitools.' >&2 >> + exit 1 >> +fi > > (This is not a review comment -- I'm trying to test it:) > > What msiextract version (and dependencies, like libgcab, libgsf etc) are > you using? I'm unable to extract "vsssdk.msi"; msiextract spews a bunch > of assertion failures. > > 2e39646b7850a12673bc66ade85fece3 setup.exe > 433eb024ed0c669dd1563d952ca41091 vsssdk.msi > > My versions (RHEL-6.4.z distro): > - msitools-0.92 (built from source) > - gcab-0.4 (built from source) > - libgsf-1.14.15-5.el6 (patch in [1] doesn't seem to help, it only > changes the kinds of asserts that fail) > - glib2-2.22.5-7.el6 > - libuuid-2.17.2-12.9.el6_4.3 The attached patch may help building a newer libgsf on RHEL6. Paolo --------------050800030803000203010206 Content-Type: text/x-patch; name="0001-remove-need-for-glib-2.26.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-remove-need-for-glib-2.26.patch" >>From 0eee72d26d06d7087d5d83efbc37564f67489019 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 16 Jan 2013 19:27:20 +0100 Subject: [PATCH] remove need for glib 2.26 --- configure | 2 +- configure.in | 2 +- gsf/gsf-timestamp.c | 16 +++++++++------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 30aa84d..029f5f9 100755 --- a/configure +++ b/configure @@ -12740,7 +12740,7 @@ _ACEOF libgsf_reqs=" gobject-2.0 >= 2.16.0 - glib-2.0 >= 2.26.0 + glib-2.0 >= 2.22.0 libxml-2.0 >= 2.4.16 " diff --git a/configure.in b/configure.in index a830360..c6c7254 100644 --- a/configure.in +++ b/configure.in @@ -71,7 +71,7 @@ ifelse([ dnl Modules required for libgsf libgsf_reqs=" gobject-2.0 >= 2.16.0 - glib-2.0 >= 2.26.0 + glib-2.0 >= 2.22.0 libxml-2.0 >= 2.4.16 " diff --git a/gsf/gsf-timestamp.c b/gsf/gsf-timestamp.c index 9d45f9a..a8e0a44 100644 --- a/gsf/gsf-timestamp.c +++ b/gsf/gsf-timestamp.c @@ -136,20 +136,22 @@ int gsf_timestamp_load_from_string (GsfTimestamp *stamp, char const *spec) { int year, month, day, hour, minute, second; - GDateTime *dt; + time_t t; /* 'YYYY-MM-DDThh:mm:ss' */ if (6 != sscanf (spec, "%d-%d-%dT%d:%d:%d", &year, &month, &day, &hour, &minute, &second)) return FALSE; - dt = g_date_time_new_utc (year, month, day, hour, minute, second); - if (!dt) - return FALSE; - - stamp->timet = g_date_time_to_unix (dt); + if (month < 3) { + month += 12; + year--; + } + t = 86400ULL * (day + (153 * month - 457) / 5 + 365 * year + year / 4 - year / 100 + + year / 400 - 719469); + t += 3600 * hour + 60 * minute + second; - g_date_time_unref (dt); + stamp->timet = t; return TRUE; } -- 1.7.1 --------------050800030803000203010206--