>From 83f2c832a760bd7e5d32e2d2ab8298f697cf3f70 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 24 Aug 2020 01:22:49 +0200 Subject: [PATCH 2/2] 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. --- ChangeLog | 5 +++++ tests/test-nonblocking-pipe-main.c | 2 +- tests/test-nonblocking-socket-main.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c2dcdc..073f968 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 0e132f0..ec19be5 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 500479d..d2cf50e 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; -- 2.7.4