<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/gen/gethostname.c, branch release/6.0.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2005-11-03T00:35:26+00:00</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2005-11-03T00:35:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3640cb54210edbb7edbf1b12ef0127ecfcea967d'/>
<id>3640cb54210edbb7edbf1b12ef0127ecfcea967d</id>
<content type='text'>
'RELENG_6_0_0_RELEASE'.

This commit was manufactured to restore the state of the 6.0-RELEASE image.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'RELENG_6_0_0_RELEASE'.

This commit was manufactured to restore the state of the 6.0-RELEASE image.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a kluge suggested by Marcel to paper over the difference between</title>
<updated>2003-08-19T23:01:46+00:00</updated>
<author>
<name>Garrett Wollman</name>
<email>wollman@FreeBSD.org</email>
</author>
<published>2003-08-19T23:01:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=89a26fd1fce00fc24d05956b3b32ac782ab144a4'/>
<id>89a26fd1fce00fc24d05956b3b32ac782ab144a4</id>
<content type='text'>
gethostname()'s old and new signatures without requiring a library
bump.  Note that programs which called gethostname() with a negative
argument were already broken, since the same type conversion was done
by the old implementation.  Add a note in the Makefile so that whoever
next bumps the libc revision will delete the kluge at the same time
(as it will no longer be necessary).  This is only operative on 64-bit
platforms.

Submitted by:	marcel
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gethostname()'s old and new signatures without requiring a library
bump.  Note that programs which called gethostname() with a negative
argument were already broken, since the same type conversion was done
by the old implementation.  Add a note in the Makefile so that whoever
next bumps the libc revision will delete the kluge at the same time
(as it will no longer be necessary).  This is only operative on 64-bit
platforms.

Submitted by:	marcel
</pre>
</div>
</content>
</entry>
<entry>
<title>Change gethostname() to set errno to ENAMETOOLONG instead of ENOMEM</title>
<updated>2003-08-19T20:38:44+00:00</updated>
<author>
<name>Garrett Wollman</name>
<email>wollman@FreeBSD.org</email>
</author>
<published>2003-08-19T20:38:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=effcb5eca32e16b2d7e796dcec4354fe989e1065'/>
<id>effcb5eca32e16b2d7e796dcec4354fe989e1065</id>
<content type='text'>
when the buffer is not long enough to hold the current host name.
POSIX does not standardize error returns for gethostname(), so it
doesn't matter which one we use, but ENAMETOOLONG is at least a little
more intuitive, and mi suggests the existence of prior art.  I've been
running with this change for a while on my home machine with no
effect.  At the same time, I've updated the prototype for
gethostname() to use the correct standard type (size_t) for the
namelen argument.

All of the in-tree callers fall into one of the following categories:
1) Call perror() or equivalent when gethostname() fails.
2) Ignore gethostname()'s return value entirely, potentially resulting
in data corruption if the buffer is too small.
3) Fall back to a (possibly sensible) default value if gethostname()
fails.

Many of the callers I examined shows signs of confusion about the
correct sizing of the host name buffer.  gethostname(3) now has more
information about this, as well as updated standards information.

PR:		48114
Submitted by:	mi (in part)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
when the buffer is not long enough to hold the current host name.
POSIX does not standardize error returns for gethostname(), so it
doesn't matter which one we use, but ENAMETOOLONG is at least a little
more intuitive, and mi suggests the existence of prior art.  I've been
running with this change for a while on my home machine with no
effect.  At the same time, I've updated the prototype for
gethostname() to use the correct standard type (size_t) for the
namelen argument.

All of the in-tree callers fall into one of the following categories:
1) Call perror() or equivalent when gethostname() fails.
2) Ignore gethostname()'s return value entirely, potentially resulting
in data corruption if the buffer is too small.
3) Fall back to a (possibly sensible) default value if gethostname()
fails.

Many of the callers I examined shows signs of confusion about the
correct sizing of the host name buffer.  gethostname(3) now has more
information about this, as well as updated standards information.

PR:		48114
Submitted by:	mi (in part)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix the style of the SCM ID's.</title>
<updated>2002-03-22T21:53:29+00:00</updated>
<author>
<name>David E. O'Brien</name>
<email>obrien@FreeBSD.org</email>
</author>
<published>2002-03-22T21:53:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=333fc21e3cd79bca0c94d7722c5a56cb5ad078d1'/>
<id>333fc21e3cd79bca0c94d7722c5a56cb5ad078d1</id>
<content type='text'>
I believe have made all of libc .c's as consistent as possible.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I believe have made all of libc .c's as consistent as possible.
</pre>
</div>
</content>
</entry>
<entry>
<title>gethostname() returns int, not long.  Answered my own question by</title>
<updated>1996-12-05T18:14:56+00:00</updated>
<author>
<name>Jordan K. Hubbard</name>
<email>jkh@FreeBSD.org</email>
</author>
<published>1996-12-05T18:14:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8af0a47fbac4dd73680dbc786d05aca54ae74c5b'/>
<id>8af0a47fbac4dd73680dbc786d05aca54ae74c5b</id>
<content type='text'>
RTFM'ing.  Either both the header files and the man pages are wrong
or this code is, and I'll take the majority decision. :-)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
RTFM'ing.  Either both the header files and the man pages are wrong
or this code is, and I'll take the majority decision. :-)
</pre>
</div>
</content>
</entry>
<entry>
<title>BSD 4.4 Lite Lib Sources</title>
<updated>1994-05-27T05:00:24+00:00</updated>
<author>
<name>Rodney W. Grimes</name>
<email>rgrimes@FreeBSD.org</email>
</author>
<published>1994-05-27T05:00:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=58f0484fa251c266ede97b591b499fe3dd4f578e'/>
<id>58f0484fa251c266ede97b591b499fe3dd4f578e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
