From: Ulrich Drepper Date: Sun, 8 Jul 2001 06:47:53 +0000 (+0000) Subject: (__gettimeofday): Add declarations for asm functions. X-Git-Tag: glibc-2.16-ports-before-merge~1846 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da48cd782fafade16e1894fe18915a2e8ad97ad2;p=thirdparty%2Fglibc.git (__gettimeofday): Add declarations for asm functions. --- diff --git a/sysdeps/unix/sysv/aix/gettimeofday.c b/sysdeps/unix/sysv/aix/gettimeofday.c index c7a4a01c08f..031a84ebb60 100644 --- a/sysdeps/unix/sysv/aix/gettimeofday.c +++ b/sysdeps/unix/sysv/aix/gettimeofday.c @@ -21,11 +21,14 @@ #include #ifndef HAVE_GNU_LD -#define __daylight daylight -#define __timezone timezone -#define __tzname tzname +# define __daylight daylight +# define __timezone timezone +# define __tzname tzname #endif +extern int rtc_upper (void); +extern int rtc_lower (void); + /* Assembler Routines to access the timer registers */ asm(" .rtc_upper: mfspr 3,4 # copy RTCU to return register @@ -51,14 +54,14 @@ __gettimeofday (tv, tz) return -1; } - ts = rtc_upper(); /* seconds */ - tl = rtc_lower(); /* nanoseconds */ - tu = rtc_upper(); /* Check for a carry from */ - if (ts != tu) /* the lower reg to the upper */ - tl = rtc_lower(); /* Recover from the race condition */ + ts = rtc_upper (); /* Seconds. */ + tl = rtc_lower (); /* Nanoseconds. */ + tu = rtc_upper (); /* Check for a carry from. */ + if (ts != tu) /* The lower reg to the upper. */ + tl = rtc_lower (); /* Recover from the race condition. */ - tv->tv_sec = (long int) (tu + (double)tl/1000000000); - tv->tv_usec = (long int) ((double)tl/1000); + tv->tv_sec = (long int) (tu + (double) tl / 1000000000); + tv->tv_usec = (long int) ((double) tl / 1000); if (tz != NULL) {