qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] rtc: skip year-2038 overflow check in case time_t is 32bit only
@ 2013-01-04  9:43 Gerd Hoffmann
  2013-01-04 10:22 ` Andreas Färber
  0 siblings, 1 reply; 3+ messages in thread
From: Gerd Hoffmann @ 2013-01-04  9:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 tests/rtc-test.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tests/rtc-test.c b/tests/rtc-test.c
index 02edbf5..548200a 100644
--- a/tests/rtc-test.c
+++ b/tests/rtc-test.c
@@ -201,6 +201,10 @@ static void set_year_20xx(void)
     g_assert_cmpint(cmos_read(RTC_YEAR), ==, 0x11);
     g_assert_cmpint(cmos_read(RTC_CENTURY), ==, 0x20);
 
+    if (sizeof(time_t) == 32) {
+        return;
+    }
+
     /* Set a date in 2080 to ensure there is no year-2038 overflow.  */
     cmos_write(RTC_REG_A, 0x76);
     cmos_write(RTC_YEAR, 0x80);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] rtc: skip year-2038 overflow check in case time_t is 32bit only
  2013-01-04  9:43 [Qemu-devel] [PATCH] rtc: skip year-2038 overflow check in case time_t is 32bit only Gerd Hoffmann
@ 2013-01-04 10:22 ` Andreas Färber
  2013-01-04 12:47   ` Gerd Hoffmann
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Färber @ 2013-01-04 10:22 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel

Am 04.01.2013 10:43, schrieb Gerd Hoffmann:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  tests/rtc-test.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/tests/rtc-test.c b/tests/rtc-test.c
> index 02edbf5..548200a 100644
> --- a/tests/rtc-test.c
> +++ b/tests/rtc-test.c
> @@ -201,6 +201,10 @@ static void set_year_20xx(void)
>      g_assert_cmpint(cmos_read(RTC_YEAR), ==, 0x11);
>      g_assert_cmpint(cmos_read(RTC_CENTURY), ==, 0x20);
>  
> +    if (sizeof(time_t) == 32) {

You sure that shouldn't be 4 then?

Andreas

> +        return;
> +    }
> +
>      /* Set a date in 2080 to ensure there is no year-2038 overflow.  */
>      cmos_write(RTC_REG_A, 0x76);
>      cmos_write(RTC_YEAR, 0x80);

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] rtc: skip year-2038 overflow check in case time_t is 32bit only
  2013-01-04 10:22 ` Andreas Färber
@ 2013-01-04 12:47   ` Gerd Hoffmann
  0 siblings, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2013-01-04 12:47 UTC (permalink / raw)
  To: Andreas Färber; +Cc: qemu-devel

  Hi,

>> +    if (sizeof(time_t) == 32) {
> 
> You sure that shouldn't be 4 then?

Oops, yes.  Should have waited for buildbot results ...

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-04 12:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-04  9:43 [Qemu-devel] [PATCH] rtc: skip year-2038 overflow check in case time_t is 32bit only Gerd Hoffmann
2013-01-04 10:22 ` Andreas Färber
2013-01-04 12:47   ` Gerd Hoffmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).