OSDN Git Service

* winsup.api/ltp/access01.c: Avoid compilation error if X_OK
authorduda <duda>
Sat, 10 Mar 2001 16:45:27 +0000 (16:45 +0000)
committerduda <duda>
Sat, 10 Mar 2001 16:45:27 +0000 (16:45 +0000)
isn't declared as a constant.

winsup/testsuite/ChangeLog
winsup/testsuite/winsup.api/ltp/access01.c

index af6e7d6..f2922ef 100644 (file)
@@ -1,3 +1,8 @@
+2001-03-10  Egor Duda  <deo@logos-m.ru>
+
+       * winsup.api/ltp/access01.c: Avoid compilation error if X_OK
+       isn't declared as a constant.
+
 2001-03-09  Egor Duda  <deo@logos-m.ru>
 
        * config/default.exp: Remove unneeded debugging output.
index aaf50cf..e003805 100644 (file)
@@ -137,25 +137,25 @@ extern int Tst_count;             /* Test Case counter for tst_* routines */
 
 char Fname[255];
 
-static struct test_case_t {
-    char *file;
-    int mode;
-    char *string;
-    int experrno;
-} Test_cases[] = {
-    { Fname, F_OK,  "F_OK", 0 },
-    { Fname, X_OK,  "X_OK", 0 },
-    { Fname, W_OK,  "W_OK", 0 },
-    { Fname, R_OK,  "R_OK", 0 },
-};
-
-int Ntc = sizeof(Test_cases) / sizeof(struct test_case_t);
 
 /***********************************************************************
  * Main
  ***********************************************************************/
 int main(int ac, char **av)
 {
+    struct test_case_t {
+        char *file;
+        unsigned mode;
+        const char *string;
+        int experrno;
+    } Test_cases[] = {
+        { Fname, F_OK,  "F_OK", 0 },
+        { Fname, X_OK,  "X_OK", 0 },
+        { Fname, W_OK,  "W_OK", 0 },
+        { Fname, R_OK,  "R_OK", 0 },
+    };
+
+    int Ntc = sizeof(Test_cases) / sizeof(struct test_case_t);
     int lc;            /* loop counter */
     const char *msg;           /* message returned from parse_opts */
     int tc;