bug-gnulib
[Top][All Lists]
Advanced

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

random, random_r: update doc regarding Haiku


From: Bruno Haible
Subject: random, random_r: update doc regarding Haiku
Date: Sun, 29 Oct 2017 08:39:41 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-97-generic; KDE/5.18.0; x86_64; ; )

In a testdir on Haiku, I'm seeing these warnings:

In file included from ../../gltests/test-random.c:21:0:
../../gltests/test-random.c:25:18: warning: initialization from incompatible 
pointer type [-Wincompatible-pointer-types]
 SIGNATURE_CHECK (random, long, (void));
                  ^
../../gltests/signature.h:46:58: note: in definition of macro 'SIGNATURE_CHECK2'
   static ret (* _GL_UNUSED signature_check ## id) args = fn
                                                          ^
../../gltests/signature.h:39:3: note: in expansion of macro 'SIGNATURE_CHECK1'
   SIGNATURE_CHECK1 (fn, ret, args, __LINE__)
   ^
../../gltests/test-random.c:25:1: note: in expansion of macro 'SIGNATURE_CHECK'
 SIGNATURE_CHECK (random, long, (void));
 ^

In file included from ../../gltests/test-random_r.c:21:0:
../../gltests/test-random_r.c:23:18: warning: initialization from incompatible 
pointer type [-Wincompatible-pointer-types]
 SIGNATURE_CHECK (initstate_r, int, (unsigned int, char *, size_t,
                  ^
../../gltests/signature.h:46:58: note: in definition of macro 'SIGNATURE_CHECK2'
   static ret (* _GL_UNUSED signature_check ## id) args = fn
                                                          ^
../../gltests/signature.h:39:3: note: in expansion of macro 'SIGNATURE_CHECK1'
   SIGNATURE_CHECK1 (fn, ret, args, __LINE__)
   ^
../../gltests/test-random_r.c:23:1: note: in expansion of macro 
'SIGNATURE_CHECK'
 SIGNATURE_CHECK (initstate_r, int, (unsigned int, char *, size_t,
 ^
../../gltests/test-random_r.c:25:18: warning: initialization from incompatible 
pointer type [-Wincompatible-pointer-types]
 SIGNATURE_CHECK (setstate_r, int, (char *, struct random_data *));
                  ^
../../gltests/signature.h:46:58: note: in definition of macro 'SIGNATURE_CHECK2'
   static ret (* _GL_UNUSED signature_check ## id) args = fn
                                                          ^
../../gltests/signature.h:39:3: note: in expansion of macro 'SIGNATURE_CHECK1'
   SIGNATURE_CHECK1 (fn, ret, args, __LINE__)
   ^
../../gltests/test-random_r.c:25:1: note: in expansion of macro 
'SIGNATURE_CHECK'
 SIGNATURE_CHECK (setstate_r, int, (char *, struct random_data *));
 ^

The prototypes are different:

POSIX: long random (void)
Haiku: int random (void)

glibc: int random_r (struct random_data *, int32_t *)
Haiku: int random_r (struct random_data *, int *)

glibc: int initstate_r (unsigned int, char *, size_t, struct random_data *)
Haiku: int initstate_r (unsigned int, void *, size_t, struct random_data *)

glibc: int setstate_r (char *, struct random_data *)
Haiku: int setstate_r (void *, struct random_data *)

Not worth fixing, I would say. Let me just update the documentation:


2017-10-29  Bruno Haible  <address@hidden>

        random, random_r: Mention different prototypes on Haiku.
        * doc/posix-functions/random.texi: Mention different prototype on Haiku.
        * doc/glibc-functions/random_r.texi: Likewise.
        * doc/glibc-functions/initstate_r.texi: Likewise.
        * doc/glibc-functions/setstate_r.texi: Likewise.

diff --git a/doc/posix-functions/random.texi b/doc/posix-functions/random.texi
index 88d36f9..29aa2f2 100644
--- a/doc/posix-functions/random.texi
+++ b/doc/posix-functions/random.texi
@@ -18,5 +18,5 @@ Portability problems not fixed by Gnulib:
 @item
 This function has a slightly incompatible declaration (the return type being
 @samp{int} instead of @samp{long}) on some platforms:
-Cygwin 1.5.25.
+Cygwin 1.5.25, Haiku.
 @end itemize
diff --git a/doc/glibc-functions/random_r.texi 
b/doc/glibc-functions/random_r.texi
index 67c8033..b0d1ec4 100644
--- a/doc/glibc-functions/random_r.texi
+++ b/doc/glibc-functions/random_r.texi
@@ -16,4 +16,8 @@ AIX 7.1, OSF/1 5.1.
 
 Portability problems not fixed by Gnulib:
 @itemize
address@hidden
+This function has a slightly different (but compatible) declaration on some
+platforms:
+Haiku 2017.
 @end itemize
diff --git a/doc/glibc-functions/initstate_r.texi 
b/doc/glibc-functions/initstate_r.texi
index 868e1ef..c82f2cb 100644
--- a/doc/glibc-functions/initstate_r.texi
+++ b/doc/glibc-functions/initstate_r.texi
@@ -16,4 +16,8 @@ AIX 7.1, OSF/1 5.1.
 
 Portability problems not fixed by Gnulib:
 @itemize
address@hidden
+This function has a slightly different (but compatible) declaration on some
+platforms:
+Haiku 2017.
 @end itemize
diff --git a/doc/glibc-functions/setstate_r.texi 
b/doc/glibc-functions/setstate_r.texi
index 7da17eb..27ada10 100644
--- a/doc/glibc-functions/setstate_r.texi
+++ b/doc/glibc-functions/setstate_r.texi
@@ -16,4 +16,8 @@ AIX 7.1, OSF/1 5.1.
 
 Portability problems not fixed by Gnulib:
 @itemize
address@hidden
+This function has a slightly different (but compatible) declaration on some
+platforms:
+Haiku 2017.
 @end itemize




reply via email to

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