diff options
author | Bruno Haible <bruno@clisp.org> | 2019-12-09 03:02:08 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-12-09 03:02:08 +0100 |
commit | 253f29d8b391ebe8cea50355eda351bb7962e160 (patch) | |
tree | bef6c4e98b191c6e3dc1721560a07238adca551e /lib/stdlib.in.h | |
parent | 035e545a4f4cdd1b358810b2498541159b7e6bf1 (diff) | |
download | gnulib-253f29d8b391ebe8cea50355eda351bb7962e160.tar.gz |
Fix compilation errors in C++ mode on Haiku.
* lib/stdio.in.h (vdprintf): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.
* lib/spawn.in.h (posix_spawnattr_getschedpolicy,
posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam,
posix_spawnattr_setschedparam): Likewise.
* lib/stdlib.in.h (random, initstate_r, setstate_r): Use
_GL_CXXALIAS_SYS_CAST instead of _GL_CXXALIAS_SYS.
* lib/unistd.in.h (usleep): Likewise.
Diffstat (limited to 'lib/stdlib.in.h')
-rw-r--r-- | lib/stdlib.in.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 2d02b4b012..5edae2c4ef 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -599,7 +599,9 @@ _GL_CXXALIAS_RPL (random, long, (void)); # if !@HAVE_RANDOM@ _GL_FUNCDECL_SYS (random, long, (void)); # endif -_GL_CXXALIAS_SYS (random, long, (void)); +/* Need to cast, because on Haiku, the return type is + int. */ +_GL_CXXALIAS_SYS_CAST (random, long, (void)); # endif _GL_CXXALIASWARN (random); #elif defined GNULIB_POSIXCHECK @@ -766,9 +768,11 @@ _GL_FUNCDECL_SYS (initstate_r, int, struct random_data *rand_state) _GL_ARG_NONNULL ((2, 4))); # endif -_GL_CXXALIAS_SYS (initstate_r, int, - (unsigned int seed, char *buf, size_t buf_size, - struct random_data *rand_state)); +/* Need to cast, because on Haiku, the third parameter is + unsigned long buf_size. */ +_GL_CXXALIAS_SYS_CAST (initstate_r, int, + (unsigned int seed, char *buf, size_t buf_size, + struct random_data *rand_state)); # endif _GL_CXXALIASWARN (initstate_r); #elif defined GNULIB_POSIXCHECK @@ -796,8 +800,10 @@ _GL_FUNCDECL_SYS (setstate_r, int, (char *arg_state, struct random_data *rand_state) _GL_ARG_NONNULL ((1, 2))); # endif -_GL_CXXALIAS_SYS (setstate_r, int, - (char *arg_state, struct random_data *rand_state)); +/* Need to cast, because on Haiku, the first parameter is + void *arg_state. */ +_GL_CXXALIAS_SYS_CAST (setstate_r, int, + (char *arg_state, struct random_data *rand_state)); # endif _GL_CXXALIASWARN (setstate_r); #elif defined GNULIB_POSIXCHECK |