test-netdb.c
Roland McGrath
roland@frob.com
Mon Aug 27 12:50:00 GMT 2001
> That's not what is used. gethostname() is a syscall.
Really? When I run test-netdb under gdb on x86 and set a bkpt on gethostname,
I get the C code.
> The test-netdb code is clearly wrong, regardless of what the sysv
> implementation of gethostname does.
The test-netdb code is clearly correct according to the description of
gethostname in the manual. However, the sysdeps/unix/sysv/gethostname.c
code does not behave as the manual says--it should write the truncated name
before returning ENAMETOOLONG.
More information about the Libc-hacker
mailing list