summaryrefslogtreecommitdiff
path: root/modules/sethostname
Commit message (Collapse)AuthorAgeFilesLines
* sethostname: Make more robust in multithreaded applications.Bruno Haible2020-05-271-0/+1
| | | | | * lib/sethostname.c (sethostname): Pass an 'e' flag to fopen. * modules/sethostname (Depends-on): Add fopen-gnu.
* Tweak last commit.Bruno Haible2011-12-031-2/+0
| | | | | | | | | | | * 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.
* Add a new sethostname moduleBen Walton2011-12-031-0/+31
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>