[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnulib] gethostname patch to assume C89 or better

From: Paul Eggert
Subject: [Bug-gnulib] gethostname patch to assume C89 or better
Date: 09 Sep 2003 00:00:54 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

I installed this:

2003-09-08  Paul Eggert  <address@hidden>

        * gethostname.c: Include <stddef.h>.
        (gethostname): Define with prototype.  Length is size_t, not int.

Index: lib/gethostname.c
RCS file: /cvsroot/gnulib/gnulib/lib/gethostname.c,v
retrieving revision 1.5
diff -p -u -r1.5 gethostname.c
--- lib/gethostname.c   7 Aug 2000 15:48:18 -0000       1.5
+++ lib/gethostname.c   9 Sep 2003 06:56:13 -0000
@@ -1,5 +1,5 @@
 /* gethostname emulation for SysV and POSIX.1.
-   Copyright (C) 1992 Free Software Foundation, Inc.
+   Copyright (C) 1992, 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
@@ -29,10 +29,10 @@
    Null terminate it if the name is shorter than LEN.
    Return 0 if ok, -1 if error.  */
+#include <stddef.h>
-gethostname (name, len)
-     char *name;
-     int len;
+gethostname (char *name, size_t len)
 #ifdef HAVE_UNAME
   struct utsname uts;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]