This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-2.95.2
In one sense, it is, but both versions contain the ostensibly
offending declaration:
"__const struct timezone *__tz"
----- Original Message -----
From: Agung Yogaswara <azung@xerxes.intern.trabas.com>
To: Jerry Miller <gmiller@cs.sunysb.edu>
Cc: <gcc-help@gcc.gnu.org>
Sent: Thursday, February 22, 2001 7:31 AM
Subject: Re: gcc-2.95.2
> On Thu, 22 Feb 2001, Jerry Miller wrote:
>
> > The only version of <sys/time.h> where I could find '__tz'
> > was on my Web host. (It's also the only Linux system to
> > which I have access.) The lines where I found it are:
> >
> > extern int __gettimeofday __P ((struct timeval * __tp,
> > struct timezone * __tz));
> > extern int gettimeofday __P ((struct timeval * __tp,
> > struct timezone * __tz));
> > extern int __settimeofday __P ((__const struct timeval *__tv,
> > __const struct timezone *__tz));
> > extern int settimeofday __P ((__const struct timeval *__tv,
> > __const struct timezone *__tz));
> >
> > If yours looks anything like this, the only explanation I can
> > see is that '__const' is for some reason defined as something
> > other than 'const'. (A declaration of "int float x;" gives the
> > identical error message.)
> >
>
> thanks.
> here is my version of '__tz" in /usr/include/sys/time.h (the
> only one):
>
> struct timezone
> {
> int tz_minuteswest; /* Minutes west of GMT. */
> int tz_dsttime; /* Nonzero if DST is ever in effect. */
> };
>
> #if defined __USE_GNU || defined __USE_BSD
> typedef struct timezone *__timezone_ptr_t;
> #else
> typedef void *__timezone_ptr_t;
> #endif
>
> extern int gettimeofday (struct timeval *__restrict __tv,
> __timezone_ptr_t __restrict __tz) __THROW;
>
> extern int settimeofday (__const struct timeval *__tv,
> __const struct timezone *__tz) __THROW;
>
>
> thats pretty much different, isn't it?
> am i miss something?
>
> btw, i'm using kernel 2.3.4.
>
>