On MidnightBSD 2.0 I see these warnings: ../../gltests/test-getlogin_r.c:24:18: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] ../../gltests/test-random.c:22:18: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] ../../gltests/test-random.c:23:18: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] ../../gltests/test-sethostname1.c:23:18: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
Some functions have slightly different prototypes. Not worth adding workarounds. Just a documentation is sufficient. 2021-02-08 Bruno Haible <br...@clisp.org> Document non-standard prototypes on MidnightBSD. * doc/posix-functions/initstate.texi: Mention different prototype on MidnightBSD 2.0. * doc/posix-functions/srandom.texi: Likewise. * doc/posix-functions/getlogin_r.texi: Likewise. * doc/glibc-functions/sethostname.texi: Likewise. diff --git a/doc/glibc-functions/sethostname.texi b/doc/glibc-functions/sethostname.texi index 8294a4a..d34f4a1 100644 --- a/doc/glibc-functions/sethostname.texi +++ b/doc/glibc-functions/sethostname.texi @@ -37,5 +37,5 @@ The first parameter is @code{char *} instead of @code{const char *} on some platforms: Solaris 11 2010-11. @item The second parameter is @code{int} instead of @code{size_t} -on some platforms: Mac OS X 10.12, Solaris 11 2010-11. +on some platforms: Mac OS X 10.12, MidnightBSD 2.0, Solaris 11 2010-11. @end itemize diff --git a/doc/posix-functions/getlogin_r.texi b/doc/posix-functions/getlogin_r.texi index d17c541..c70eb32 100644 --- a/doc/posix-functions/getlogin_r.texi +++ b/doc/posix-functions/getlogin_r.texi @@ -25,7 +25,7 @@ Portability problems not fixed by Gnulib: @itemize @item This function has an incompatible declaration on some platforms: -Solaris 11.4 (when @code{_POSIX_PTHREAD_SEMANTICS} is not defined). +MidnightBSD 2.0, Solaris 11.4 (when @code{_POSIX_PTHREAD_SEMANTICS} is not defined). @item This function fails even when standard input is a tty on some platforms: HP-UX 11.11. diff --git a/doc/posix-functions/initstate.texi b/doc/posix-functions/initstate.texi index fa03e99..3346767 100644 --- a/doc/posix-functions/initstate.texi +++ b/doc/posix-functions/initstate.texi @@ -18,4 +18,11 @@ Cygwin 1.5.25. Portability problems not fixed by Gnulib: @itemize +@item +The first parameter is @code{unsigned long} instead of @code{unsigned int} on +some platforms: +MidnightBSD 2.0. +@item +The third parameter is @code{long} instead of @code{size_t} on some platforms: +MidnightBSD 2.0. @end itemize diff --git a/doc/posix-functions/srandom.texi b/doc/posix-functions/srandom.texi index d553373..12df916 100644 --- a/doc/posix-functions/srandom.texi +++ b/doc/posix-functions/srandom.texi @@ -22,4 +22,8 @@ Portability problems not fixed by Gnulib: This function has a slightly incompatible declaration (the return type being @samp{long} instead of @samp{void}) on some platforms: Cygwin 1.5.25. +@item +The parameter is @code{unsigned long} instead of @code{unsigned int} on some +platforms: +MidnightBSD 2.0. @end itemize