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 libc.
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 has gone wrong?
Thanks,
-- Brian Litzinger <brian@litzinger.com>Copyright (c) 2000 By Brian Litzinger, All Rights Reserved
----- End forwarded message ----- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 21:00:26 EST