X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fxgethostname.c;h=1f4d728a038210f0805b0a0b02891f24dc0b9c9d;hb=265465e1145409720be48d30b6277a59151d293a;hp=5178784baca5bffa889d7db3078a65f0b3f405e0;hpb=a83f0239e5027272c6f5b38fa2d06e96675d81dc;p=gnulib.git diff --git a/lib/xgethostname.c b/lib/xgethostname.c index 5178784ba..1f4d728a0 100644 --- a/lib/xgethostname.c +++ b/lib/xgethostname.c @@ -21,6 +21,9 @@ # include #endif +/* Specification. */ +#include "xgethostname.h" + #include #include @@ -30,16 +33,13 @@ extern int errno; #endif #include "error.h" +#include "exit.h" #include "xalloc.h" #ifndef ENAMETOOLONG # define ENAMETOOLONG 9999 #endif -#ifndef EXIT_FAILURE -# define EXIT_FAILURE 1 -#endif - int gethostname (); #ifndef INITIAL_HOSTNAME_LENGTH @@ -50,7 +50,7 @@ int gethostname (); If malloc fails, exit. Upon any other failure, return NULL. */ char * -xgethostname () +xgethostname (void) { char *hostname; size_t size;