diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2023-12-05 11:04:06 +0100 |
---|---|---|
committer | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2023-12-05 11:04:06 +0100 |
commit | 691858d279335eeeeed3afafdf872b1c5f8f4201 (patch) | |
tree | 05f37af0a7c2a704abad1cb86c8afcd3940a8630 /gcc/ada/adaint.c | |
parent | 414d795d8a365b6e72a84257caa36cb3bed7e0ba (diff) | |
download | gcc-691858d279335eeeeed3afafdf872b1c5f8f4201.zip gcc-691858d279335eeeeed3afafdf872b1c5f8f4201.tar.gz gcc-691858d279335eeeeed3afafdf872b1c5f8f4201.tar.bz2 |
libiberty: Fix pex_unix_wait return type
The recent warning patches broke Solaris bootstrap:
/vol/gcc/src/hg/master/local/libiberty/pex-unix.c:326:3: error: initialization of 'pid_t (*)(struct pex_obj *, pid_t, int *, struct pex_time *, int, const char **, int *)' {aka 'long int (*)(struct pex_obj *, long int, int *, struct pex_time *, int, const char **, int *)'} from incompatible pointer type 'int (*)(struct pex_obj *, pid_t, int *, struct pex_time *, int, const char **, int *)' {aka 'int (*)(struct pex_obj *, long int, int *, struct pex_time *, int, const char **, int *)'} [-Wincompatible-pointer-types]
326 | pex_unix_wait,
| ^~~~~~~~~~~~~
/vol/gcc/src/hg/master/local/libiberty/pex-unix.c:326:3: note: (near initialization for 'funcs.wait')
While pex_funcs.wait expects a function returning pid_t, pex_unix_wait
currently returns int. However, on Solaris pid_t is long for 32-bit,
but int for 64-bit.
This patches fixes this by having pex_unix_wait return pid_t as
expected, and like every other variant already does.
Bootstrapped without regressions on i386-pc-solaris2.11,
sparc-sun-solaris2.11, x86_64-pc-linux-gnu, and
x86_64-apple-darwin23.1.0.
2023-12-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
libiberty:
* pex-unix.c (pex_unix_wait): Change return type to pid_t.
Diffstat (limited to 'gcc/ada/adaint.c')
0 files changed, 0 insertions, 0 deletions