This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
2.2.18pre15aa1 cvs glibc problem
- To: glibc-linux at ricardo dot ecn dot wfu dot edu
- Subject: 2.2.18pre15aa1 cvs glibc problem
- From: brian at worldcontrol dot com
- Date: Thu, 19 Oct 2000 14:51:31 -0700
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
I have a program:
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
int
main() {
DIR *dir = opendir("/uss/zzq/TIDs");
printf("dir = %08lx\n",(int)dir);
}
which fails to work correctly under the development version of glibc.
brian@remo brian>gcc foo.c (redhat 6.2 libc)
brian@remo brian>./a.out
dir = 08049760
brian@remo brian>xgcc foo.c (recent cvs libc)
brian@remo brian>./a.out
dir = 00000000
the machines remo runs 2.2.18pre15aa1 and the filesystem is
reiserfs 3.5.26. The same thing happens if the filesystem is ext2.
gcc and xgcc invoke the same compiler:
egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
And here is the actual failure in the bowels of libc:
(gdb) s
__libc_fcntl (fd=6, cmd=2) at ../sysdeps/unix/sysv/linux/i386/fcntl.c:44
44 arg = va_arg (ap, void *);
(gdb) n
51 if (! __have_no_fcntl64)
(gdb) n
53 int result = INLINE_SYSCALL (fcntl64, 3, fd, cmd, arg);
(gdb) n
54 if (result >= 0 || errno != ENOSYS)
(gdb) print result
$9 = -1
What have I done wrong?
Thanks,
--
Brian Litzinger <brian@litzinger.com>
Copyright (c) 2000 By Brian Litzinger, All Rights Reserved