From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Cr3EX-0007Yb-P1 for qemu-devel@nongnu.org; Tue, 18 Jan 2005 18:58:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Cr3EH-0007QZ-NB for qemu-devel@nongnu.org; Tue, 18 Jan 2005 18:57:50 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cr3EG-0007NG-Bd for qemu-devel@nongnu.org; Tue, 18 Jan 2005 18:57:44 -0500 Received: from [80.91.229.2] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cr2un-0003eq-ON for qemu-devel@nongnu.org; Tue, 18 Jan 2005 18:37:37 -0500 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1Cr2ul-0004VU-00 for ; Wed, 19 Jan 2005 00:37:35 +0100 Received: from amarseille-206-1-10-117.w81-49.abo.wanadoo.fr ([81.49.130.117]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 19 Jan 2005 00:37:35 +0100 Received: from daimon55 by amarseille-206-1-10-117.w81-49.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 19 Jan 2005 00:37:35 +0100 From: Ronald Date: Wed, 19 Jan 2005 00:37:26 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Sender: news Subject: [Qemu-devel] [WIN32] qemu-system-ppc fix Reply-To: daimon55@free.fr, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, This correct the build for windows which don't handle pre-1970 date correctly. With a lot of help from Jocelyn Mayer. --- m48t59.c.old 2005-01-19 00:22:17.584979798 +0100 +++ m48t59.c 2005-01-18 23:49:11.000041668 +0100 @@ -80,6 +80,11 @@ static void set_time (m48t59_t *NVRAM, struct tm *tm) { time_t now, new_time; + +#ifdef _WIN32 + if(tm->tm_year < 70) + tm->tm_year = 70; +#endif new_time = mktime(tm); now = time(NULL); Same thing in m48t08.c file --- m48t08.c.old 2005-01-19 00:23:53.766894517 +0100 +++ m48t08.c 2005-01-19 00:25:01.224204587 +0100 @@ -71,6 +71,11 @@ static void set_time (m48t08_t *NVRAM, struct tm *tm) { time_t now, new_time; + +#ifdef _WIN32 + if(tm->tm_year < 70) + tm->tm_year = 70; +#endif new_time = mktime(tm); now = time(NULL);