From: Bruno Haible Date: Sun, 23 Aug 2020 23:22:49 +0000 (+0200) Subject: tests: Don't assume that pid_t fits in an 'int'. X-Git-Tag: v1.0~3680 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=83f2c832a760bd7e5d32e2d2ab8298f697cf3f70;p=gnulib.git tests: Don't assume that pid_t fits in an 'int'. * tests/test-nonblocking-pipe-main.c (main): Use type 'pid_t' instead of 'int'. * tests/test-nonblocking-socket-main.c (main): Likewise. --- diff --git a/ChangeLog b/ChangeLog index 9c2dcdca25..073f96870b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2020-08-23 Bruno Haible + tests: Don't assume that pid_t fits in an 'int'. + * tests/test-nonblocking-pipe-main.c (main): Use type 'pid_t' instead + of 'int'. + * tests/test-nonblocking-socket-main.c (main): Likewise. + sys_types: Fix definition of pid_t on 64-bit MSVC. * m4/pid_t.m4: New file. * modules/sys_types (Files): Add it. diff --git a/tests/test-nonblocking-pipe-main.c b/tests/test-nonblocking-pipe-main.c index 0e132f0037..ec19be5fb7 100644 --- a/tests/test-nonblocking-pipe-main.c +++ b/tests/test-nonblocking-pipe-main.c @@ -44,7 +44,7 @@ main (int argc, char *argv[]) const char *child_path; int test; int fd[2]; - int child; + pid_t child; int exitcode; child_path = argv[1]; diff --git a/tests/test-nonblocking-socket-main.c b/tests/test-nonblocking-socket-main.c index 500479de7c..d2cf50e350 100644 --- a/tests/test-nonblocking-socket-main.c +++ b/tests/test-nonblocking-socket-main.c @@ -47,7 +47,7 @@ main (int argc, char *argv[]) int test; int server; int port; - int child; + pid_t child; int server_socket; int exitcode;