From: Jens Thoms Toerring on
Ersek, Laszlo <lacos(a)ludens.elte.hu> wrote:
> In general, I don't trust Linux manual pages -- not even for Linux. For
> example, on my Debian Lenny desktop, there is

> Package: manpages-dev
> Version: 3.05-1
> Description: Manual pages about using GNU/Linux for development
> These man pages describe the Linux programming interface, including
> these two sections:
> 2 = Linux system calls.

> (Many lines snipped for brevity.)

> Then,

> $ man 2 write

> ----v----
> WRITE(2) Linux Programmer's Manual WRITE(2)

> NAME
> write - write to a file descriptor

> [...]

> Linux 2007-06-18 WRITE(2)
> ----^----

> The manual page does not contain a single instance of the word
> "SIGXFSZ", even though Linux *does* generate SIGXFSZ for the thread when
> appropriate.

If you find such problems you shouldn't hesitate to send an email
to Michael Kerrisk, the Linux man page maintainer, see

http://www.kernel.org/doc/man-pages/reporting_bugs.html

When I reported a few minor issues I got an immediate reply from
him - and, after a pleasant discussion, in the next release of
the man pages they were gone.

But, of course, you should also consider downloading the newest
version of the man pages first as a man page from 2007 can be a
bit outdated - the current version is 3.24, 3.01 is more than
1.5 years old. You can get the current version from

http://www.kernel.org/pub/linux/docs/man-pages/

> (I'm not bashing the people maintaining the glibc or the Linux
> documentation. It's obvious that with limited resources, making the
> implementation standards-conformant is more important than making the
> decomentation implementation-conformant.

Also, unfortunately, the guys doing the documentation may not always
get informed of relevant changes (and going through the sources each
time a modification is made to find out if the documentation requires
an update could be quite a task, I guess...).

Best regards, Jens
--
\ Jens Thoms Toerring ___ jt(a)toerring.de
\__________________________ http://toerring.de
From: Ersek, Laszlo on
In article <7v88c0Fq60U1(a)mid.uni-berlin.de>, jt(a)toerring.de (Jens Thoms Toerring) writes:

> If you find such problems you shouldn't hesitate to send an email
> to Michael Kerrisk, the Linux man page maintainer, see
>
> http://www.kernel.org/doc/man-pages/reporting_bugs.html

Will do right away; thanks. Honestly, this is the constructive attitude,
not just bickering around :)


> But, of course, you should also consider downloading the newest
> version of the man pages first as a man page from 2007 can be a
> bit outdated - the current version is 3.24, 3.01 is more than
> 1.5 years old. You can get the current version from
>
> http://www.kernel.org/pub/linux/docs/man-pages/

The "reporting bugs" page you've linked to above has an anchor named
"online pages" -- I just checked write(2) from 2009-02-23 and
gethostbyname(3) from 2009-12-03, and they still have the problems in
question.

Thanks for the hint,
lacos
From: Ersek, Laszlo on
In article <7v88c0Fq60U1(a)mid.uni-berlin.de>, jt(a)toerring.de (Jens Thoms Toerring) writes:

> If you find such problems you shouldn't hesitate to send an email
> to Michael Kerrisk, the Linux man page maintainer

http://www.spinics.net/lists/linux-man/msg01242.html
http://www.spinics.net/lists/linux-man/msg01243.html

Thank you,
lacos
From: Rick Jones on
IPv6 support in gethostbyname/gethostbyaddr is likely not terribly
portable across operating systems. I would strongly suggest you
convert your code to use getaddrinfo/getnodeinfo.

rick jones
--
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
From: trustee on
Hi,

thanks for your comments so far. :-)

I decided to take a look at the implementation of the gethostbyname
function.
And what I found really confused me: It is implemented exactly how the
manpage describes it.

glibc-2.7\resolv\gethnamaddr.c

struct hostent *
gethostbyname(name)
const char *name;
{
struct hostent *hp;

if (__res_maybe_init (&_res, 0) == -1) {
__set_h_errno (NETDB_INTERNAL);
return (NULL);
}
if (_res.options & RES_USE_INET6) {
hp = gethostbyname2(name, AF_INET6);
if (hp)
return (hp);
}
return (gethostbyname2(name, AF_INET));
}

Note: The RES_USE_INET6 flag is set when you add "options inet6" to /
etc/resolv.conf and was already set during my gethostbyname tests.

I will try to build glibc myself and add debug statements to see if
this is the function that really gets called.