This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-2.95.2
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.)
Just on a hunch, try checking Cond.cpp and ../include/JTC/Types.h
for any #undef directives. Sorry I don't have any more enlightening
ideas.
----- Original Message -----
From: Agung Yogaswara <azung@xerxes.intern.trabas.com>
To: <gcc-help@gcc.gnu.org>
Sent: Thursday, February 22, 2001 1:31 AM
Subject: gcc-2.95.2
> I have gcc-2.95.2 installed with glibc-2.2 updated for Red Hat 7.0 plus
> the patch. But I got this error when compiling a program:
>
> In file included from
>
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/iostream
.h:31,
> from
>
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/iostream
:6,
> from ../include/JTC/Types.h:58,
> from Cond.cpp:11:
>
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/streambu
f.h: In
> method `struct streampos streambuf::pubseekoff(long long int,
> ios::seek_dir, int = 3)':
>
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/streambu
f.h:362: conversion
> from `__off64_t' to non-scalar type `streampos' requested
>
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/streambu
f.h: In
> method `struct streampos streambuf::pubseekpos(_G_fpos64_t, int = 3)':
>
/usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../include/g++-3/streambu
f.h:364: `struct
> streampos' used where a `long long int' was expected
>
> In file included from Cond.cpp:28:
> /usr/include/sys/time.h: At top level:
> /usr/include/sys/time.h:69: two or more data types in declaration of
> `__tz'
>
>
> Any ideas?
>
> Thanks
>
>