https://bugzilla.novell.com/show_bug.cgi?id=298852#c8
--- Comment #8 from Marcus Meissner 2007-11-28 07:24:39 MST ---
with this code:
#include
#include
int main() {
struct hostent serv_host;
char hbuf[8192];
int herr = 0;
int ret;
struct hostent* hent_res = NULL;
if ((ret=gethostbyname_r("nonexistenthost", &serv_host, hbuf, sizeof(hbuf),
&hent_res, &herr))) {
printf("ret=%d, herr=%d\n", ret, herr);
return 1;
}
printf("%p, herr=%d\n", serv_host.h_addr_list, herr);
return 0;
}
(all test on 10.3)
x86 32bit with nscd has:
meissner@westernhagen:~> ./xx
0xffe5f258, herr=1
meissner@westernhagen:~> ./xx
0xffdcd1c8, herr=1
random return values.
ppc32 without nscd:
meissner@grape:~> gcc -O2 -o xx xx.c -g -m32
meissner@grape:~> ./xx
ret=110, herr=1
meissner@grape:~> gcc -O2 -o xx xx.c -g -m64
meissner@grape:~> ./xx
ret=110, herr=1
meissner@grape:~>
ppc32 with nscd:
meissner@grape:~> gcc -O2 -o xx xx.c -g -m32
meissner@grape:~> ./xx
(nil), herr=1
meissner@grape:~> gcc -O2 -o xx xx.c -g -m64
meissner@grape:~> ./xx
(nil), herr=1
meissner@grape:~>
I would talk to Mr. Drepper.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.