[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] xgethostname fix
From: |
Simon Josefsson |
Subject: |
[Bug-gnulib] xgethostname fix |
Date: |
Wed, 24 Sep 2003 01:17:53 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
Isn't a header for xgethostname needed?
Index: lib/xgethostname.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/xgethostname.c,v
retrieving revision 1.16
diff -u -p -r1.16 xgethostname.c
--- lib/xgethostname.c 12 Sep 2003 20:14:10 -0000 1.16
+++ lib/xgethostname.c 23 Sep 2003 23:14:36 -0000
@@ -21,6 +21,9 @@
# include <config.h>
#endif
+/* Specification. */
+#include "xgethostname.h"
+
#include <stdlib.h>
#include <sys/types.h>
Index: lib/xgethostname.h
===================================================================
RCS file: lib/xgethostname.h
diff -N lib/xgethostname.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lib/xgethostname.h 23 Sep 2003 23:14:36 -0000
@@ -0,0 +1,26 @@
+/* xgethostname.h -- return current hostname with unlimited length
+ Copyright (C) 1992, 1996, 2000, 2001, 2003 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef _XGETHOSTNAME_H
+#define _XGETHOSTNAME_H
+
+/* Return the current hostname in malloc'd storage.
+ If malloc fails, exit.
+ Upon any other failure, return NULL. */
+extern char *xgethostname (void);
+
+#endif /* _XGETHOSTNAME_H */
Index: modules/xgethostname
===================================================================
RCS file: /cvsroot/gnulib/gnulib/modules/xgethostname,v
retrieving revision 1.5
diff -u -p -r1.5 xgethostname
--- modules/xgethostname 15 Sep 2003 20:40:48 -0000 1.5
+++ modules/xgethostname 23 Sep 2003 23:14:36 -0000
@@ -2,6 +2,7 @@ Description:
Return machine's hostname, without size limitations.
Files:
+lib/xgethostname.h
lib/xgethostname.c
Depends-on:
@@ -13,7 +14,7 @@ exit
configure.ac:
Makefile.am:
-lib_SOURCES += xgethostname.c
+lib_SOURCES += xgethostname.h xgethostname.c
Include:
- [Bug-gnulib] xgethostname fix,
Simon Josefsson <=