bug-gnulib
[Top][All Lists]
Advanced

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

signature warnings on OSF/1 5.1


From: Bruno Haible
Subject: signature warnings on OSF/1 5.1
Date: Sun, 19 Dec 2010 22:45:30 +0100
User-agent: KMail/1.9.9

On OSF/1 5.1 I'm also seeing these gcc warnings:

* test-getaddrinfo.c:26: warning: initialization from incompatible pointer type

This one is because the gai_strerror declaration is different from POSIX:
  - POSIX: const char *gai_strerror(int);
  - OSF/1: char *gai_strerror(int);

I think there's no immediate need to work around this one in gnulib.

* test-gethostname.c:24: warning: initialization from incompatible pointer type
Similarly:
  - POSIX: int gethostname(char *, size_t);
  - OSF/1: int gethostname(char *, int);

Likewise.

* test-inet_ntop.c:24: warning: initialization from incompatible pointer type
Similarly:
  - POSIX: const char *inet_ntop(int, const void *, char *, socklen_t);
  - OSF/1: const char *inet_ntop(int, const void *, char *, size_t);

Likewise.


2010-12-19  Bruno Haible  <address@hidden>

        Document some different function declarations on OSF/1 5.1.
        * doc/posix-functions/gai_strerror.texi: Mention different declaration.
        * doc/posix-functions/inet_ntop.texi: Likewise.
        * doc/posix-functions/gethostname.texi: Likewise.
        * lib/unistd.in.h (gethostname): Update comment.

--- doc/posix-functions/gai_strerror.texi.orig  Sun Dec 19 22:39:00 2010
+++ doc/posix-functions/gai_strerror.texi       Sun Dec 19 22:14:58 2010
@@ -15,4 +15,7 @@
 
 Portability problems not fixed by Gnulib:
 @itemize
+This function's return type is @code{char *} instead of @code{const char *}
+on some platforms:
+OSF/1 5.1.
 @end itemize
--- doc/posix-functions/gethostname.texi.orig   Sun Dec 19 22:39:00 2010
+++ doc/posix-functions/gethostname.texi        Sun Dec 19 22:26:29 2010
@@ -16,6 +16,10 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+This function's second argument type is @code{int} instead of @code{size_t}
+on some platforms:
+OSF/1 5.1, Solaris 10.
address@hidden
 If the given buffer is too small for the host name, some implementations
 fail with @code{EINVAL}, instead of returning a truncated host name.
 @end itemize
--- doc/posix-functions/inet_ntop.texi.orig     Sun Dec 19 22:39:00 2010
+++ doc/posix-functions/inet_ntop.texi  Sun Dec 19 22:27:25 2010
@@ -15,4 +15,8 @@
 
 Portability problems not fixed by Gnulib:
 @itemize
address@hidden
+This function's fourth argument type is @code{size_t} instead of
address@hidden on some platforms:
+OSF/1 5.1.
 @end itemize
--- lib/unistd.in.h.orig        Sun Dec 19 22:39:00 2010
+++ lib/unistd.in.h     Sun Dec 19 22:24:59 2010
@@ -654,7 +654,8 @@
 _GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len)
                                     _GL_ARG_NONNULL ((1)));
 #  endif
-/* Need to cast, because on Solaris 10 systems, the second parameter is
+/* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second
+   parameter is
                                                       int len.  */
 _GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len));
 # endif



reply via email to

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