don't cast to timeval since timeval is for some reason not always a struct

Wed Dec 23 04:18:11 1998  George Lebl  <jirka@5z.com>

        * gmain.c: (g_get_current_time) don't cast to timeval since
          timeval is for some reason not always a struct of longs, weird
This commit is contained in:
George Lebl 1998-12-23 12:18:36 +00:00 committed by George Lebl
parent c250dff3f6
commit 4277349743
10 changed files with 52 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Wed Dec 23 04:18:11 1998 George Lebl <jirka@5z.com>
* gmain.c: (g_get_current_time) don't cast to timeval since
timeval is for some reason not always a struct of longs, weird
Tue Dec 22 10:32:11 1998 Tim Janik <timj@gtk.org>
* ghook.c (g_hook_first_valid): fixed buglet that could cause bogus

View File

@ -1,3 +1,8 @@
Wed Dec 23 04:18:11 1998 George Lebl <jirka@5z.com>
* gmain.c: (g_get_current_time) don't cast to timeval since
timeval is for some reason not always a struct of longs, weird
Tue Dec 22 10:32:11 1998 Tim Janik <timj@gtk.org>
* ghook.c (g_hook_first_valid): fixed buglet that could cause bogus

View File

@ -1,3 +1,8 @@
Wed Dec 23 04:18:11 1998 George Lebl <jirka@5z.com>
* gmain.c: (g_get_current_time) don't cast to timeval since
timeval is for some reason not always a struct of longs, weird
Tue Dec 22 10:32:11 1998 Tim Janik <timj@gtk.org>
* ghook.c (g_hook_first_valid): fixed buglet that could cause bogus

View File

@ -1,3 +1,8 @@
Wed Dec 23 04:18:11 1998 George Lebl <jirka@5z.com>
* gmain.c: (g_get_current_time) don't cast to timeval since
timeval is for some reason not always a struct of longs, weird
Tue Dec 22 10:32:11 1998 Tim Janik <timj@gtk.org>
* ghook.c (g_hook_first_valid): fixed buglet that could cause bogus

View File

@ -1,3 +1,8 @@
Wed Dec 23 04:18:11 1998 George Lebl <jirka@5z.com>
* gmain.c: (g_get_current_time) don't cast to timeval since
timeval is for some reason not always a struct of longs, weird
Tue Dec 22 10:32:11 1998 Tim Janik <timj@gtk.org>
* ghook.c (g_hook_first_valid): fixed buglet that could cause bogus

View File

@ -1,3 +1,8 @@
Wed Dec 23 04:18:11 1998 George Lebl <jirka@5z.com>
* gmain.c: (g_get_current_time) don't cast to timeval since
timeval is for some reason not always a struct of longs, weird
Tue Dec 22 10:32:11 1998 Tim Janik <timj@gtk.org>
* ghook.c (g_hook_first_valid): fixed buglet that could cause bogus

View File

@ -1,3 +1,8 @@
Wed Dec 23 04:18:11 1998 George Lebl <jirka@5z.com>
* gmain.c: (g_get_current_time) don't cast to timeval since
timeval is for some reason not always a struct of longs, weird
Tue Dec 22 10:32:11 1998 Tim Janik <timj@gtk.org>
* ghook.c (g_hook_first_valid): fixed buglet that could cause bogus

View File

@ -1,3 +1,8 @@
Wed Dec 23 04:18:11 1998 George Lebl <jirka@5z.com>
* gmain.c: (g_get_current_time) don't cast to timeval since
timeval is for some reason not always a struct of longs, weird
Tue Dec 22 10:32:11 1998 Tim Janik <timj@gtk.org>
* ghook.c (g_hook_first_valid): fixed buglet that could cause bogus

View File

@ -346,9 +346,14 @@ g_source_remove_by_source_data (gpointer source_data)
void
g_get_current_time (GTimeVal *result)
{
struct timeval r;
g_return_if_fail (result != NULL);
gettimeofday ((struct timeval *) result, NULL);
/*this is required on alpha, there the timeval structs are int's
not longs and a cast only would fail horribly*/
gettimeofday (&r, NULL);
result->tv_sec = r.tv_sec;
result->tv_usec = r.tv_usec;
}
/* Running the main loop */

View File

@ -346,9 +346,14 @@ g_source_remove_by_source_data (gpointer source_data)
void
g_get_current_time (GTimeVal *result)
{
struct timeval r;
g_return_if_fail (result != NULL);
gettimeofday ((struct timeval *) result, NULL);
/*this is required on alpha, there the timeval structs are int's
not longs and a cast only would fail horribly*/
gettimeofday (&r, NULL);
result->tv_sec = r.tv_sec;
result->tv_usec = r.tv_usec;
}
/* Running the main loop */