Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-11-26 18:33:44 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2022-08-29 19:53:44 +0300
commit19b3b814bcba422fa468530a441c0001361aed3c (patch)
tree5c426b4f07d9c11d9ce63dd59332ebc75bb3b631 /winsup/testsuite
parent6ca056eec9529668e3a843f3da75be6d21cf6df5 (diff)
Cygwin: testsuite: Fix TEST_RETURN for 64-bit
The result of a function call won't fit in an int if it's e.g. a pointer.
Diffstat (limited to 'winsup/testsuite')
-rw-r--r--winsup/testsuite/libltp/include/usctest.h6
-rw-r--r--winsup/testsuite/libltp/lib/parse_opts.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/winsup/testsuite/libltp/include/usctest.h b/winsup/testsuite/libltp/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_
-extern int TEST_RETURN;
+extern long TEST_RETURN;
extern int TEST_ERRNO;
#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;
/***********************************************************************
@@ -210,7 +210,7 @@ extern void STD_opts_help();
* SCALL = system call and parameters to execute
*
***********************************************************************/
-#define TEST(SCALL) TEST_RETURN = (unsigned) SCALL; TEST_ERRNO=errno;
+#define TEST(SCALL) TEST_RETURN = SCALL; TEST_ERRNO=errno;
/***********************************************************************
* TEST_VOID: calls a system call
diff --git a/winsup/testsuite/libltp/lib/parse_opts.c b/winsup/testsuite/libltp/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;
/***********************************************************************