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:
authorChristopher Faylor <me@cgf.cx>2003-01-24 04:51:39 +0300
committerChristopher Faylor <me@cgf.cx>2003-01-24 04:51:39 +0300
commitb831fc4446e34fbcf513bcb44956e2d654f2b401 (patch)
tree453ae73d9f8d88fef4e6cd4899bd0691c23adfb5 /winsup/testsuite
parent8e61c0495ee7f1df6909cae2ffb4d32d40240d00 (diff)
* libltp/include/usctest.h: Add externs to some variables that need it.
* winsup.api/ltp/mmap05.c (main): Make file_content volatile to avoid optimization glitch.
Diffstat (limited to 'winsup/testsuite')
-rw-r--r--winsup/testsuite/ChangeLog6
-rw-r--r--winsup/testsuite/libltp/include/usctest.h8
-rw-r--r--winsup/testsuite/winsup.api/ltp/mmap05.c2
3 files changed, 11 insertions, 5 deletions
diff --git a/winsup/testsuite/ChangeLog b/winsup/testsuite/ChangeLog
index 8791f832a..f07a4cb85 100644
--- a/winsup/testsuite/ChangeLog
+++ b/winsup/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2003-01-23 Christopher Faylor <cgf@redhat.com>
+ * libltp/include/usctest.h: Add externs to some variables that need it.
+ * winsup.api/ltp/mmap05.c (main): Make file_content volatile to avoid
+ optimization glitch.
+
+2003-01-23 Christopher Faylor <cgf@redhat.com>
+
* winsup.api/mmaptest03.c (main): Mark variables as volatile to avoid
optimization induced problems.
diff --git a/winsup/testsuite/libltp/include/usctest.h b/winsup/testsuite/libltp/include/usctest.h
index ef2d032d7..6a095db1c 100644
--- a/winsup/testsuite/libltp/include/usctest.h
+++ b/winsup/testsuite/libltp/include/usctest.h
@@ -167,19 +167,19 @@ extern int TEST_ERRNO;
* Global array of bit masks to indicate errnos that are expected.
* Bits set by TEST_EXP_ENOS() macro and used by TEST_CLEANUP() macro.
***********************************************************************/
-struct usc_errno_t TEST_VALID_ENO[USC_MAX_ERRNO];
+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.
***********************************************************************/
-int TEST_RETURN;
-int TEST_ERRNO;
+extern int TEST_RETURN;
+extern int TEST_ERRNO;
/***********************************************************************
* temporary variables for determining max and min times in TEST macro
***********************************************************************/
-long btime, etime, tmptime;
+extern long btime, etime, tmptime;
#endif /* _USC_LIB_ */
diff --git a/winsup/testsuite/winsup.api/ltp/mmap05.c b/winsup/testsuite/winsup.api/ltp/mmap05.c
index f42adf0b7..3a7783df8 100644
--- a/winsup/testsuite/winsup.api/ltp/mmap05.c
+++ b/winsup/testsuite/winsup.api/ltp/mmap05.c
@@ -104,7 +104,7 @@ main(int ac, char **av)
{
int lc; /* loop counter */
const char *msg; /* message returned from parse_opts */
- char file_content; /* tempfile content */
+ volatile char file_content; /* tempfile content */
/* Parse standard options given to run the test. */
msg = parse_opts(ac, av, (option_t *) NULL, NULL);