dejagnu-19981224 fails to compile on a glibc-2.0.108 linux-2.1.132
system with :
make[2]: Entering directory
`/usr/local/src/ftp/gdb/dejagnu-19981224/tcl/unix'
gcc -c -g -O2  -I./../generic -I. -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1
-DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1
-DHAVE_UNISTD_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TM_ZONE=1 -DHAVE_TM_GMTOFF=1
-DHAVE_TIMEZONE_VAR=1 -DHAVE_TIMEZONE_DECL=1 -DHAVE_ST_BLKSIZE=1
-DSTDC_HEADERS=1 -DNEED_MATHERR=1 -DHAVE_SIGNED_CHAR=1
-DHAVE_SYS_IOCTL_H=1        -DTCL_SHLIB_EXT=\".so\"
./../generic/tclPosixStr.c
./../generic/tclPosixStr.c: In function `Tcl_ErrnoId':
./../generic/tclPosixStr.c:340: duplicate case value
./../generic/tclPosixStr.c:328: this is the first entry for that value
./../generic/tclPosixStr.c: In function `Tcl_ErrnoMsg':
./../generic/tclPosixStr.c:787: duplicate case value
./../generic/tclPosixStr.c:775: this is the first entry for that value
This is caused by the following Code in tclPosixStr.c
[...]
switch (err)
[...]
#ifdef ENOTSUP
        case ENOTSUP: return "ENOTSUP";
#endif
#ifdef ENOTTY
        case ENOTTY: return "ENOTTY";
#endif
#ifdef ENOTUNIQ
        case ENOTUNIQ: return "ENOTUNIQ";
#endif
#ifdef ENXIO
        case ENXIO: return "ENXIO";
#endif
#ifdef EOPNOTSUPP
        case EOPNOTSUPP: return "EOPNOTSUPP";
#endif
#ifdef EPERM
        case EPERM: return "EPERM";
#endif
[...]
and  the following define in 
<bits/errno.h>:
[...]
/* Linux has no ENOTSUP error code.  */
# define ENOTSUP EOPNOTSUPP

/* Linux also has no ECANCELED error code.  Since it is not used here
   we define it to an invalid value.  */
# define ECANCELED      125
[...]

What to fix here ?
The glibc headers ( remove the #define or #define it to an invalid value
like for ECANCELED )
or the tcl code coming with dejagnu  ( don�t assume that the makro
values are unique) ?
--
Markus Kossmann                                    
[EMAIL PROTECTED]

Reply via email to