[uClibc] fopen doesn't set errno?
Joseph Chiu
josephc at idealab.com
Tue May 21 20:06:33 UTC 2002
A test program (trying to open /etc/hosts that doesnt exist) gives the
wrong value for errno -- it should return ENOENT (2), but doesnt:
#include <stdio.h>
#include <errno.h>
int main() {
FILE *fp;
if ((fp = fopen("/etc/hosts", "r")) == NULL) {
printf ("Error %d\n", errno);
}
return;
}
# ./foo
Error 716676704
#
Im running top-of-CVS, on MIPS Linux 2.4.18. I tried to follow the trail
of function calls, but am stuck trying to figure out where/what __libc_open
is.
Thanks.
Joseph
(BTW, I first mentioned this problem when I was discussing problems with the
resolver.)
--
Joseph Chiu, Developer, idealab!
josephc at idealab.com (626) 535-2819
It's a small change... what could possibly go wR.u6$
More information about the uClibc
mailing list