This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
egcs-19980715 doesn't recognize '__linux__' in C++ code
- To: egcs at cygnus dot com
- Subject: egcs-19980715 doesn't recognize '__linux__' in C++ code
- From: Byeong-ryeol Kim <jinbo21 at soback dot kornet21 dot net>
- Date: Sat, 18 Jul 1998 14:01:36 +0900 (KST)
- Reply-To: Byeong-ryeol Kim <jinbo21 at soback dot kornet21 dot net>
I compilled, installed egcs-19980715(egcs-2.91.50) on i586-pc-linux-gnu
system(RH5.1, glibc-2.0.94-4, libg++-2.8.2-980708, ...).
It compiles linux kernel 2.1.108, 2.1.109, and compiled kernels boots
OK.
But 'make -k check' shows gcc(egcs-19980715) cannot recognize
'__linux__' in libg++/etc/lf/screen.cc and fails to compile screen.cc.
It works well with 'LINUX' or '__LINUX__', but, I think, these are not
used frequently on linux system.
This problem seems to appear for the first time in this version of egcs.
1. the code of screen.cc
--------------------------------------------------------------------
#if !defined(hpux) && !defined(__linux__) && !defined(_AIX41)
extern "C" int tgetent(void *, const char *);
extern "C" int tgetnum(const char*);
extern "C" char *tgetstr(const char *, char**);
#endif
--------------------------------------------------------------------
2. error messages of egcs-19980715
/usr/src/egcs-19980715-objdir/gcc/xgcc
-B/usr/src/egcs-19980715-objdir/gcc/ -c -
O9 -mcpu=pentium -march=pentium -fomit-frame-pointer -fvtable-thunks
-nostdinc++
-I. -I../../../libio -I../../../../../egcs-19980715/libg++/etc/lf
-I../../../..
/../egcs-19980715/libg++/etc/lf/../../../libio
-I../../../../../egcs-19980715/li
bg++/etc/lf/../../../libstdc++
-I../../../../../egcs-19980715/libg++/etc/lf/../.
./src ../../../../../egcs-19980715/libg++/etc/lf/screen.cc
../../../../../egcs-19980715/libg++/etc/lf/screen.cc: In method
`Screen_Handler:
:Screen_Handler()':
../../../../../egcs-19980715/libg++/etc/lf/screen.cc:22: `tgetent'
undeclared (f
irst use this function)
../../../../../egcs-19980715/libg++/etc/lf/screen.cc:22: (Each
undeclared identi
fier is reported only once
../../../../../egcs-19980715/libg++/etc/lf/screen.cc:22: for each
function it ap
pears in.)
../../../../../egcs-19980715/libg++/etc/lf/screen.cc:29: `tgetnum'
undeclared (f
:
irst use this function)
../../../../../egcs-19980715/libg++/etc/lf/screen.cc:31: `tgetstr'
undeclared (f
irst use this function)
../../../../../egcs-19980715/libg++/etc/lf/screen.cc:32: confused by
earlier err
ors, bailing out
make[5]: *** [screen.o] Error 1
......
/usr/src/egcs-19980715-objdir/gcc/xgcc
-B/usr/src/egcs-19980715-objdir/gcc/ -c -
O9 -mcpu=pentium -march=pentium -fomit-frame-pointer -fvtable-thunks
-nostdinc++
-I. -I../../../libio -I../../../../../egcs-19980715/libg++/etc/lf
-I../../../..
/../egcs-19980715/libg++/etc/lf/../../../libio
-I../../../../../egcs-19980715/li
bg++/etc/lf/../../../libstdc++
-I../../../../../egcs-19980715/libg++/etc/lf/../.
./src ../../../../../egcs-19980715/libg++/etc/lf/Dirent.cc
make[5]: Target `check' not remade because of errors.
make[5]: Leaving directory
`/usr/src/egcs-19980715-objdir/i586-pc-linux-gnu/libg
++/etc/lf'
make[4]: *** [subdir_do] Error 1
make[4]: Leaving directory
`/usr/src/egcs-19980715-objdir/i586-pc-linux-gnu/libg
++/etc'
make[3]: *** [check] Error 2
make[3]: Leaving directory
`/usr/src/egcs-19980715-objdir/i586-pc-linux-gnu/libg
++/etc'
make[2]: *** [subdir_do] Error 1
make[2]: Leaving directory
`/usr/src/egcs-19980715-objdir/i586-pc-linux-gnu/libg
++'
make[1]: *** [check] Error 2
make[1]: Leaving directory
`/usr/src/egcs-19980715-objdir/i586-pc-linux-gnu/libg
++'
make: *** [check-target-libg++] Error 2
3. warning messages of egcs-1.0.2(RedHat5.1. It compiles OK)
/usr/src/egcs-19980715/libg++/etc/lf/screen.cc: In method
`Screen_Handler::Scree
n_Handler()':
/usr/src/egcs-19980715/libg++/etc/lf/screen.cc:22: warning: implicit
declaration
of function `int tgetent(...)'
/usr/src/egcs-19980715/libg++/etc/lf/screen.cc:29: warning: implicit
declaration
of function `int tgetnum(...)'
/usr/src/egcs-19980715/libg++/etc/lf/screen.cc:31: warning: implicit
declaration
of function `int tgetstr(...)'
/usr/src/egcs-19980715/libg++/etc/lf/screen.cc:31: warning: assignment
to `char
*' from `int' lacks a cast
/usr/src/egcs-19980715/libg++/etc/lf/screen.cc:32: warning: assignment
to `char
*' from `int' lacks a cast
--
"Where there is a will, there is a way." jinbo21@soback.kornet21.net
kbeyl@kids.kotel.co.kr
For the future of you and me! hitel: jinbo21