OSDN Git Service

* libltp/include/usctest.h: Add externs to some variables that need it.
authorcgf <cgf>
Fri, 24 Jan 2003 01:51:39 +0000 (01:51 +0000)
committercgf <cgf>
Fri, 24 Jan 2003 01:51:39 +0000 (01:51 +0000)
* winsup.api/ltp/mmap05.c (main): Make file_content volatile to avoid
optimization glitch.

winsup/testsuite/ChangeLog
winsup/testsuite/libltp/include/usctest.h
winsup/testsuite/winsup.api/ltp/mmap05.c

index 8791f83..f07a4cb 100644 (file)
@@ -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.
 
index ef2d032..6a095db 100644 (file)
@@ -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_ */
 
index f42adf0..3a7783d 100644 (file)
@@ -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);