[Top][All Lists]

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

sethostname: update doc

From: Bruno Haible
Subject: sethostname: update doc
Date: Sat, 22 Apr 2017 15:00:46 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-72-generic; KDE/5.18.0; x86_64; ; )

On Mac OS X, I'm seeing this warning:

test-sethostname1.c:23:1: warning: incompatible pointer types initializing 'int 
(*)(const char *, size_t)' (aka 'int (*)(const char *, unsigned long)') with an 
expression of type 'int (const char *, int)' [-Wincompatible-pointer-types]
SIGNATURE_CHECK (sethostname, int, (const char *, size_t));
^                ~~~~~~~~~~~
./signature.h:39:3: note: expanded from macro 'SIGNATURE_CHECK'
  SIGNATURE_CHECK1 (fn, ret, args, __LINE__)
  ^                 ~~
./signature.h:44:3: note: expanded from macro 'SIGNATURE_CHECK1'
  SIGNATURE_CHECK2 (fn, ret, args, id) /* macroexpand line */
  ^                 ~~
./signature.h:46:28: note: expanded from macro 'SIGNATURE_CHECK2'
  static ret (* _GL_UNUSED signature_check ## id) args = fn
                           ^                             ~~
<scratch space>:4:1: note: expanded from here

Here's a doc update:

2017-04-22  Bruno Haible  <address@hidden>

        sethostname: Update doc.
        * doc/glibc-functions/sethostname.texi: Mention differing prototype on
        Mac OS X.

diff --git a/doc/glibc-functions/sethostname.texi 
index b5afec8..ee05ab0 100644
--- a/doc/glibc-functions/sethostname.texi
+++ b/doc/glibc-functions/sethostname.texi
@@ -18,7 +18,9 @@ AIX 7.1, OSF/1 5.1, Solaris 10.
 Portability problems not fixed by Gnulib:
-On Solaris 11 2010-11, the first argument is @code{char *} instead of
address@hidden char *} and the second parameter is @code{int} instead of
+The first parameter is @code{char *} instead of @code{const char *}
+on some platforms: Solaris 11 2010-11.
+The second parameter is @code{int} instead of @code{size_t}
+on some platforms: Mac OS X 10.12, Solaris 11 2010-11.
 @end itemize

reply via email to

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