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:
authorEgor Duda <deo@logos-m.ru>2001-03-10 19:45:28 +0300
committerEgor Duda <deo@logos-m.ru>2001-03-10 19:45:28 +0300
commit766de5ad55dc0233ac7a558c48d4d8e29761e76f (patch)
treecdc77b908f4df9f611577d5a0f3807fb8b3dde8d
parent85057d174fa888d8c91bcb0e7e9f273c2fbad275 (diff)
* winsup.api/ltp/access01.c: Avoid compilation error if X_OK
isn't declared as a constant.
-rw-r--r--winsup/testsuite/ChangeLog5
-rw-r--r--winsup/testsuite/winsup.api/ltp/access01.c26
2 files changed, 18 insertions, 13 deletions
diff --git a/winsup/testsuite/ChangeLog b/winsup/testsuite/ChangeLog
index af6e7d65a..f2922ef1c 100644
--- a/winsup/testsuite/ChangeLog
+++ b/winsup/testsuite/ChangeLog
@@ -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.
diff --git a/winsup/testsuite/winsup.api/ltp/access01.c b/winsup/testsuite/winsup.api/ltp/access01.c
index aaf50cf32..e003805a0 100644
--- a/winsup/testsuite/winsup.api/ltp/access01.c
+++ b/winsup/testsuite/winsup.api/ltp/access01.c
@@ -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;