From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 693AD38582BA; Mon, 29 Aug 2022 16:54:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 693AD38582BA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1661792081; bh=DtDZk5nOR5RtEy1TRHDjq1215soJkCzesTiX5B6OOzM=; h=From:To:Subject:Date:From; b=dXp4Eda2eUG0pBpdfwzRVBOx1XZcMK4z7W5FYD3/a8KJv8E/nAWA3u3AQOLw18/RZ wyfZAyK/uO3KSUtbAe7YEiFAqeNM+BxmpYe9sUGbh9bOVxhygoCTAwaoixW1f8Zg/u MPlZUm/NleBTz87cxj8NOAdXdT1xmbNgknlh0Yv8= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jon TURNEY To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: testsuite: Fix TEST_RETURN for 64-bit X-Act-Checkin: newlib-cygwin X-Git-Author: Jon Turney X-Git-Refname: refs/heads/master X-Git-Oldrev: 6ca056eec9529668e3a843f3da75be6d21cf6df5 X-Git-Newrev: 19b3b814bcba422fa468530a441c0001361aed3c Message-Id: <20220829165441.693AD38582BA@sourceware.org> Date: Mon, 29 Aug 2022 16:54:41 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D19b3b814bcb= a422fa468530a441c0001361aed3c commit 19b3b814bcba422fa468530a441c0001361aed3c Author: Jon Turney Date: Thu Nov 26 15:33:44 2020 +0000 Cygwin: testsuite: Fix TEST_RETURN for 64-bit =20 The result of a function call won't fit in an int if it's e.g. a pointe= r. Diff: --- winsup/testsuite/libltp/include/usctest.h | 6 +++--- winsup/testsuite/libltp/lib/parse_opts.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/winsup/testsuite/libltp/include/usctest.h b/winsup/testsuite/l= ibltp/include/usctest.h index 6a095db1c..fef349d04 100644 --- a/winsup/testsuite/libltp/include/usctest.h +++ b/winsup/testsuite/libltp/include/usctest.h @@ -159,7 +159,7 @@ struct usc_errno_t { **********************************************************************/ #ifdef _USC_LIB_ =20 -extern int TEST_RETURN; +extern long TEST_RETURN; extern int TEST_ERRNO; =20 #else @@ -173,7 +173,7 @@ extern struct usc_errno_t TEST_VALID_ENO[USC_MAX_ERRNO]; * Globals for returning the return code and errno from the system call * test macros. ***********************************************************************/ -extern int TEST_RETURN; +extern long TEST_RETURN; extern int TEST_ERRNO; =20 /*********************************************************************** @@ -210,7 +210,7 @@ extern void STD_opts_help(); * SCALL =3D system call and parameters to execute * ***********************************************************************/ -#define TEST(SCALL) TEST_RETURN =3D (unsigned) SCALL; TEST_ERRNO=3Derrno; +#define TEST(SCALL) TEST_RETURN =3D SCALL; TEST_ERRNO=3Derrno; =20 /*********************************************************************** * TEST_VOID: calls a system call diff --git a/winsup/testsuite/libltp/lib/parse_opts.c b/winsup/testsuite/li= bltp/lib/parse_opts.c index 0282a0976..1f41bfdd2 100644 --- a/winsup/testsuite/libltp/lib/parse_opts.c +++ b/winsup/testsuite/libltp/lib/parse_opts.c @@ -110,7 +110,7 @@ struct usc_errno_t TEST_VALID_ENO[USC_MAX_ERRNO]; * Globals for returning the return code and errno from the system call * test macros. ***********************************************************************/ -int TEST_RETURN; +long TEST_RETURN; int TEST_ERRNO; =20 /***********************************************************************