History log of /freebsd-10.1-release/lib/libc/gen/gethostname.3
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 165903 08-Jan-2007 imp

Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.


# 131539 03-Jul-2004 ru

Eliminate double whitespace.


# 119893 08-Sep-2003 ru

mdoc(7): Use the new feature of the .In macro.


# 119140 19-Aug-2003 wollman

Change gethostname() to set errno to ENAMETOOLONG instead of ENOMEM
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)


# 108087 19-Dec-2002 ru

mdoc(7) police: "The .Fa argument.".


# 108030 18-Dec-2002 ru

mdoc(7) police: "The .Fn function".


# 84306 01-Oct-2001 ru

mdoc(7) police: Use the new .In macro for #include statements.


# 82642 31-Aug-2001 ru

Use ``.Rv -std'' wherever possible.

Submitted by: yar


# 79531 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


# 74289 15-Mar-2001 brian

Mention that MAXHOSTNAMELEN includes space for the NUL.


# 67967 30-Oct-2000 asmodai

Whitespace only change: trim trailing whitespace.


# 59460 21-Apr-2000 phantom

Introduce ".Lb" macro to libc manpages.

More libraries manpages updates following.


# 50476 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 48794 12-Jul-1999 nik

Add $Id$, to make it simpler for members of the translation teams to
track.

The $Id$ line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;

.\" $Id$
.\"

If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.

Approved by: bde


# 17780 22-Aug-1996 mpp

Update a bunch of man pages to use .Fn instead
of .Nm when referencing funciton names.


# 14038 11-Feb-1996 mpp

Correct a bunch of man page cross references and generally
try and silence "manck".

ncurses, rpc, and some of the gnu stuff are still a big mess, however.


# 1574 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1573,
which included commits to RCS files with non-trunk default branches.


# 1573 27-May-1994 rgrimes

BSD 4.4 Lite Lib Sources