1
0
mirror of https://git.savannah.gnu.org/git/gnulib.git synced 2025-08-14 14:01:48 +03:00
Commit Graph

2 Commits

Author SHA1 Message Date
Bruno Haible
1917369d72 Tweak last commit.
* lib/sethostname.c: Don't include <string.h>.
(sethostname): No need to copy the argument string to the stack. Don't
call clearerr. Preserve errno when fprintf failed.
* m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): Comment about HOST_NAME_MAX.
Don't invoke AC_REPLACE_FUNCS.
* modules/sethostname (Link): Remove empty section.
* doc/glibc-functions/sethostname.texi: Gnulib does not fix the ENOSYS
failure problem.
2011-12-03 14:09:14 +01:00
Ben Walton
ab8fbf44bf Add a new sethostname module
Define sethostname on platforms that do not provide the declaration.
Provide a function for platforms that lack it.  The general handling
of the provided function is to simply return -1 and set errno to
ENOSYS.  A specific handler is provided for Minix.

* lib/sethostname.c (sethostname): New file.  Provide sethostname
for systems that lack it.
* m4/sethostname.m4 (gl_FUNC_SETHOSTNAME): New file.  Detection of
sethostname declaration and function.
* modules/sethostname: New file.  Define the sethostname module.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
2011-12-03 13:30:02 +01:00