apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r917838 - in /apr/apr/trunk/test: sendfile.c testbuckets.c testdir.c testdup.c testfile.c testfileinfo.c testflock.c testldap.c testmmap.c testproc.c testxml.c tryread.c
Date Tue, 02 Mar 2010 01:28:53 GMT
Author: minfrin
Date: Tue Mar  2 01:28:52 2010
New Revision: 917838

URL: http://svn.apache.org/viewvc?rev=917838&view=rev
Log:
Use the APR_FOPEN_* constants instead of the deprecated APR_* constants
within code inside the test suite.

Modified:
    apr/apr/trunk/test/sendfile.c
    apr/apr/trunk/test/testbuckets.c
    apr/apr/trunk/test/testdir.c
    apr/apr/trunk/test/testdup.c
    apr/apr/trunk/test/testfile.c
    apr/apr/trunk/test/testfileinfo.c
    apr/apr/trunk/test/testflock.c
    apr/apr/trunk/test/testldap.c
    apr/apr/trunk/test/testmmap.c
    apr/apr/trunk/test/testproc.c
    apr/apr/trunk/test/testxml.c
    apr/apr/trunk/test/tryread.c

Modified: apr/apr/trunk/test/sendfile.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/sendfile.c?rev=917838&r1=917837&r2=917838&view=diff
==============================================================================
--- apr/apr/trunk/test/sendfile.c (original)
+++ apr/apr/trunk/test/sendfile.c Tue Mar  2 01:28:52 2010
@@ -109,7 +109,7 @@
 
     printf("Creating a test file...\n");
     rv = apr_file_open(&f, fname, 
-                 APR_CREATE | APR_WRITE | APR_TRUNCATE | APR_BUFFERED,
+                 APR_FOPEN_CREATE | APR_FOPEN_WRITE | APR_FOPEN_TRUNCATE | APR_FOPEN_BUFFERED,
                  APR_UREAD | APR_UWRITE, p);
     if (rv) {
         fprintf(stderr, "apr_file_open()->%d/%s\n",
@@ -188,7 +188,7 @@
     apr_setup(&p, &sock, &family);
     create_testfile(p, TESTFILE);
 
-    rv = apr_file_open(&f, TESTFILE, APR_READ, 0, p);
+    rv = apr_file_open(&f, TESTFILE, APR_FOPEN_READ, 0, p);
     if (rv != APR_SUCCESS) {
         fprintf(stderr, "apr_file_open()->%d/%s\n",
                 rv,

Modified: apr/apr/trunk/test/testbuckets.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testbuckets.c?rev=917838&r1=917837&r2=917838&view=diff
==============================================================================
--- apr/apr/trunk/test/testbuckets.c (original)
+++ apr/apr/trunk/test/testbuckets.c Tue Mar  2 01:28:52 2010
@@ -368,7 +368,7 @@
 
     ABTS_ASSERT(tc, "create test file",
                 apr_file_open(&f, fname,
-                              APR_READ|APR_WRITE|APR_TRUNCATE|APR_CREATE,
+                              APR_FOPEN_READ|APR_FOPEN_WRITE|APR_FOPEN_TRUNCATE|APR_FOPEN_CREATE,
                               APR_OS_DEFAULT, p) == APR_SUCCESS);
     
     ABTS_ASSERT(tc, "write test file contents",

Modified: apr/apr/trunk/test/testdir.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testdir.c?rev=917838&r1=917837&r2=917838&view=diff
==============================================================================
--- apr/apr/trunk/test/testdir.c (original)
+++ apr/apr/trunk/test/testdir.c Tue Mar  2 01:28:52 2010
@@ -180,7 +180,7 @@
     rv = apr_dir_make("dir2", APR_OS_DEFAULT, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     rv = apr_file_open(&thefile, "dir1/file1",
-                       APR_READ | APR_WRITE | APR_CREATE, APR_OS_DEFAULT, p);
+                       APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE, APR_OS_DEFAULT,
p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     rv = apr_file_close(thefile);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);

Modified: apr/apr/trunk/test/testdup.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testdup.c?rev=917838&r1=917837&r2=917838&view=diff
==============================================================================
--- apr/apr/trunk/test/testdup.c (original)
+++ apr/apr/trunk/test/testdup.c Tue Mar  2 01:28:52 2010
@@ -34,8 +34,8 @@
 
     /* First, create a new file, empty... */
     rv = apr_file_open(&file1, FILEPATH "testdup.file", 
-                       APR_READ | APR_WRITE | APR_CREATE |
-                       APR_DELONCLOSE, APR_OS_DEFAULT, p);
+                       APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE |
+                       APR_FOPEN_DELONCLOSE, APR_OS_DEFAULT, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     ABTS_PTR_NOTNULL(tc, file1);
 
@@ -65,8 +65,8 @@
 
     /* First, create a new file, empty... */
     rv = apr_file_open(&file1, FILEPATH "testdup.readwrite.file", 
-                       APR_READ | APR_WRITE | APR_CREATE |
-                       APR_DELONCLOSE, APR_OS_DEFAULT, p);
+                       APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE |
+                       APR_FOPEN_DELONCLOSE, APR_OS_DEFAULT, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     ABTS_PTR_NOTNULL(tc, file1);
 
@@ -106,8 +106,8 @@
     apr_status_t rv;
 
     rv = apr_file_open(&testfile, FILEPATH "testdup2.file", 
-                       APR_READ | APR_WRITE | APR_CREATE |
-                       APR_DELONCLOSE, APR_OS_DEFAULT, p);
+                       APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE |
+                       APR_FOPEN_DELONCLOSE, APR_OS_DEFAULT, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     ABTS_PTR_NOTNULL(tc, testfile);
 
@@ -143,8 +143,8 @@
     apr_off_t fpos;
 
     rv = apr_file_open(&testfile, FILEPATH "testdup2.readwrite.file", 
-                       APR_READ | APR_WRITE | APR_CREATE |
-                       APR_DELONCLOSE, APR_OS_DEFAULT, p);
+                       APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE |
+                       APR_FOPEN_DELONCLOSE, APR_OS_DEFAULT, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     ABTS_PTR_NOTNULL(tc, testfile);
 

Modified: apr/apr/trunk/test/testfile.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testfile.c?rev=917838&r1=917837&r2=917838&view=diff
==============================================================================
--- apr/apr/trunk/test/testfile.c (original)
+++ apr/apr/trunk/test/testfile.c Tue Mar  2 01:28:52 2010
@@ -38,7 +38,7 @@
     apr_file_t *thefile = NULL;
 
     rv = apr_file_open(&thefile, FILENAME,
-                       APR_CREATE | APR_EXCL, 
+                       APR_FOPEN_CREATE | APR_FOPEN_EXCL,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     ABTS_TRUE(tc, rv != APR_SUCCESS);
     ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_EACCES(rv));
@@ -51,7 +51,7 @@
     apr_file_t *thefile = NULL;
 
     rv = apr_file_open(&thefile, FILENAME,
-                       APR_CREATE | APR_EXCL | APR_WRITE, 
+                       APR_FOPEN_CREATE | APR_FOPEN_EXCL | APR_FOPEN_WRITE,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     ABTS_TRUE(tc, rv != APR_SUCCESS);
     ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_EEXIST(rv));
@@ -64,7 +64,7 @@
     apr_file_t *filetest = NULL;
 
     rv = apr_file_open(&filetest, FILENAME, 
-                       APR_READ, 
+                       APR_FOPEN_READ,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     ABTS_PTR_NOTNULL(tc, filetest);
@@ -96,7 +96,7 @@
     apr_file_t *filetest = NULL;
     
     rv = apr_file_open(&filetest, FILENAME, 
-                       APR_READ, 
+                       APR_FOPEN_READ,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
 
     APR_ASSERT_SUCCESS(tc, "Opening test file " FILENAME, rv);
@@ -115,7 +115,7 @@
     char *str = NULL;
     apr_file_t *filetest;
     
-    rv = apr_file_open(&filetest, FILENAME, APR_READ, APR_OS_DEFAULT, p);
+    rv = apr_file_open(&filetest, FILENAME, APR_FOPEN_READ, APR_OS_DEFAULT, p);
     APR_ASSERT_SUCCESS(tc, "Opening test file " FILENAME, rv);
 
     rv = apr_file_read(filetest, str, &nbytes);
@@ -132,7 +132,7 @@
     apr_file_t *filetest = NULL;
     
     rv = apr_file_open(&filetest, FILENAME, 
-                       APR_READ, 
+                       APR_FOPEN_READ,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     APR_ASSERT_SUCCESS(tc, "Opening test file " FILENAME, rv);
 
@@ -151,7 +151,7 @@
     apr_file_t *filetest = NULL;
     
     rv = apr_file_open(&filetest, FILENAME, 
-                       APR_READ, 
+                       APR_FOPEN_READ,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     APR_ASSERT_SUCCESS(tc, "Opening test file " FILENAME, rv);
 
@@ -170,7 +170,7 @@
     rv = apr_file_remove(FILENAME, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
-    rv = apr_file_open(&filetest, FILENAME, APR_READ, 
+    rv = apr_file_open(&filetest, FILENAME, APR_FOPEN_READ,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_ENOENT(rv));
 }
@@ -182,7 +182,7 @@
 
     filetest = NULL;
     rv = apr_file_open(&filetest, FILENAME, 
-                       APR_WRITE, 
+                       APR_FOPEN_WRITE,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_ENOENT(rv));
     ABTS_PTR_EQUAL(tc, NULL, filetest);
@@ -195,7 +195,7 @@
 
     filetest = NULL;
     rv = apr_file_open(&filetest, FILENAME, 
-                       APR_WRITE | APR_CREATE, 
+                       APR_FOPEN_WRITE | APR_FOPEN_CREATE,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
@@ -209,7 +209,7 @@
     apr_file_t *filetest = NULL;
 
     rv = apr_file_open(&filetest, FILENAME, 
-                       APR_WRITE | APR_CREATE, 
+                       APR_FOPEN_WRITE | APR_FOPEN_CREATE,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
@@ -226,7 +226,7 @@
 
     filetest = NULL;
     rv = apr_file_open(&filetest, FILENAME, 
-                       APR_READ | APR_WRITE, 
+                       APR_FOPEN_READ | APR_FOPEN_WRITE,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     ABTS_PTR_NOTNULL(tc, filetest);
@@ -243,7 +243,7 @@
     apr_file_t *filetest = NULL;
 
     rv = apr_file_open(&filetest, FILENAME, 
-                       APR_READ, 
+                       APR_FOPEN_READ,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     APR_ASSERT_SUCCESS(tc, "Open test file " FILENAME, rv);
 
@@ -267,7 +267,7 @@
     /* Test for regression of sign error bug with SEEK_END and
        buffered files. */
     rv = apr_file_open(&filetest, FILENAME,
-                       APR_READ | APR_BUFFERED,
+                       APR_FOPEN_READ | APR_FOPEN_BUFFERED,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     APR_ASSERT_SUCCESS(tc, "Open test file " FILENAME, rv);
 
@@ -292,7 +292,7 @@
     apr_file_t *filetest = NULL;
 
     rv = apr_file_open(&filetest, FILENAME, 
-                       APR_WRITE, 
+                       APR_FOPEN_WRITE,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
@@ -310,7 +310,7 @@
     apr_file_t *filetest = NULL;
 
     rv = apr_file_open(&filetest, FILENAME, 
-                       APR_WRITE, 
+                       APR_FOPEN_WRITE,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
@@ -333,7 +333,7 @@
     apr_file_t *filetest = NULL;
 
     rv = apr_file_open(&filetest, FILENAME, 
-                       APR_WRITE, 
+                       APR_FOPEN_WRITE,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
@@ -351,7 +351,7 @@
     char   * buffer;
 
     rv = apr_file_open(&filetest, FILENAME, 
-                       APR_WRITE | APR_BUFFERED, 
+                       APR_FOPEN_WRITE | APR_FOPEN_BUFFERED,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
@@ -379,7 +379,7 @@
     apr_status_t rv;
     char ch;
 
-    rv = apr_file_open(&f, FILENAME, APR_READ, 0, p);
+    rv = apr_file_open(&f, FILENAME, APR_FOPEN_READ, 0, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     apr_file_getc(&ch, f);
@@ -394,7 +394,7 @@
     apr_status_t rv;
     char ch;
 
-    rv = apr_file_open(&f, FILENAME, APR_READ, 0, p);
+    rv = apr_file_open(&f, FILENAME, APR_FOPEN_READ, 0, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     apr_file_getc(&ch, f);
@@ -417,7 +417,7 @@
     apr_status_t rv;
     char *str = apr_palloc(p, 256);
 
-    rv = apr_file_open(&f, FILENAME, APR_READ, 0, p);
+    rv = apr_file_open(&f, FILENAME, APR_FOPEN_READ, 0, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     rv = apr_file_gets(str, 256, f);
@@ -440,7 +440,7 @@
     char *str = apr_palloc(p, 256);
 
     /* This will deadlock gets before the r524355 fix. */
-    rv = apr_file_open(&f, FILENAME, APR_READ|APR_BUFFERED|APR_XTHREAD, 0, p);
+    rv = apr_file_open(&f, FILENAME, APR_FOPEN_READ|APR_FOPEN_BUFFERED|APR_FOPEN_XTHREAD,
0, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     rv = apr_file_gets(str, 256, f);
@@ -466,7 +466,7 @@
     /* Create a test file with known content.
      */
     rv = apr_file_open(&f, "data/created_file", 
-                       APR_CREATE | APR_WRITE | APR_TRUNCATE, 
+                       APR_FOPEN_CREATE | APR_FOPEN_WRITE | APR_FOPEN_TRUNCATE,
                        APR_UREAD | APR_UWRITE, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
@@ -481,7 +481,7 @@
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     f = NULL;
-    rv = apr_file_open(&f, "data/created_file", APR_READ, 0, p);
+    rv = apr_file_open(&f, "data/created_file", APR_FOPEN_READ, 0, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     nbytes = sizeof buf;
@@ -511,7 +511,7 @@
     const char *fname = "data/modneg.dat";
 
     rv = apr_file_open(&f, fname, 
-                       APR_CREATE | APR_WRITE, APR_UREAD | APR_UWRITE, p);
+                       APR_FOPEN_CREATE | APR_FOPEN_WRITE, APR_UREAD | APR_UWRITE, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     s = "body56789\n";
@@ -545,7 +545,7 @@
     rv = apr_file_close(f);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
-    rv = apr_file_open(&f, fname, APR_READ, 0, p);
+    rv = apr_file_open(&f, fname, APR_FOPEN_READ, 0, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     rv = apr_file_gets(buf, 11, f);
@@ -589,7 +589,7 @@
     apr_file_t *f;
 
     APR_ASSERT_SUCCESS(tc, "open file",
-                       apr_file_open(&f, fname, APR_READ|APR_BUFFERED,
+                       apr_file_open(&f, fname, APR_FOPEN_READ|APR_FOPEN_BUFFERED,
                                      0, p));
     APR_ASSERT_SUCCESS(tc, "read from file",
                        apr_file_read_full(f, actual, expectlen, NULL));
@@ -610,7 +610,7 @@
 
     APR_ASSERT_SUCCESS(tc, "open file for writing",
                        apr_file_open(&f, fname, 
-                                     APR_WRITE|APR_CREATE|APR_TRUNCATE, 
+                                     APR_FOPEN_WRITE|APR_FOPEN_CREATE|APR_FOPEN_TRUNCATE,
                                      APR_OS_DEFAULT, p));
     
     APR_ASSERT_SUCCESS(tc, "write line to file", 
@@ -633,7 +633,7 @@
 
     APR_ASSERT_SUCCESS(tc, "open file for writing",
                        apr_file_open(&f, fname, 
-                                     APR_WRITE|APR_CREATE|APR_TRUNCATE, 
+                                     APR_FOPEN_WRITE|APR_FOPEN_CREATE|APR_FOPEN_TRUNCATE,
                                      APR_OS_DEFAULT, p));
     
     vec[0].iov_base = LINE1;
@@ -675,7 +675,7 @@
 
     APR_ASSERT_SUCCESS(tc, "open file for writing",
                        apr_file_open(&f, fname, 
-                                     APR_WRITE|APR_CREATE|APR_TRUNCATE, 
+                                     APR_FOPEN_WRITE|APR_FOPEN_CREATE|APR_FOPEN_TRUNCATE,
                                      APR_OS_DEFAULT, p));
     
     vec[0].iov_base = LINE1;
@@ -711,8 +711,8 @@
 
     APR_ASSERT_SUCCESS(tc, "open file for writing",
                        apr_file_open(&f, fname,
-                                     APR_WRITE | APR_CREATE | APR_TRUNCATE |
-                                     APR_BUFFERED, APR_OS_DEFAULT, p));
+                                     APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_TRUNCATE
|
+                                     APR_FOPEN_BUFFERED, APR_OS_DEFAULT, p));
 
     nbytes = strlen(TESTSTR);
     APR_ASSERT_SUCCESS(tc, "buffered write",
@@ -745,7 +745,7 @@
 
     APR_ASSERT_SUCCESS(tc, "open file for writing",
                        apr_file_open(&f, fname,
-                                     APR_WRITE | APR_READ | APR_BUFFERED,
+                                     APR_FOPEN_WRITE | APR_FOPEN_READ | APR_FOPEN_BUFFERED,
                                      APR_OS_DEFAULT, p));
 
     rv = apr_file_read(f, str, &nbytes);
@@ -783,7 +783,7 @@
     apr_file_remove(fname, p);
 
     rv = apr_file_open(&f, fname,
-                       APR_CREATE | APR_WRITE, APR_UREAD | APR_UWRITE, p);
+                       APR_FOPEN_CREATE | APR_FOPEN_WRITE, APR_UREAD | APR_UWRITE, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     
     s = "some data";
@@ -796,7 +796,7 @@
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     rv = apr_file_open(&f, fname,
-                       APR_TRUNCATE | APR_WRITE, APR_UREAD | APR_UWRITE, p);
+                       APR_FOPEN_TRUNCATE | APR_FOPEN_WRITE, APR_UREAD | APR_UWRITE, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     rv = apr_file_close(f);
@@ -821,7 +821,7 @@
 
     APR_ASSERT_SUCCESS(tc, "open test file",
                        apr_file_open(&f, fname,
-                                     APR_CREATE|APR_WRITE,
+                                     APR_FOPEN_CREATE|APR_FOPEN_WRITE,
                                      APR_UREAD|APR_UWRITE, p));
     
 
@@ -854,7 +854,7 @@
 
     APR_ASSERT_SUCCESS(tc, "open test file",
                        apr_file_open(&f, fname,
-                                     APR_CREATE|APR_READ|APR_BUFFERED,
+                                     APR_FOPEN_CREATE|APR_FOPEN_READ|APR_FOPEN_BUFFERED,
                                      APR_UREAD|APR_UWRITE, p));
 
     memset(buf, 'A', sizeof buf);
@@ -884,7 +884,7 @@
 
     APR_ASSERT_SUCCESS(tc, "open test file",
                        apr_file_open(&f, fname,
-                                     APR_CREATE|APR_READ|APR_BUFFERED,
+                                     APR_FOPEN_CREATE|APR_FOPEN_READ|APR_FOPEN_BUFFERED,
                                      APR_UREAD|APR_UWRITE, p));
 
     /* this write should be buffered. */
@@ -923,7 +923,7 @@
     apr_file_t *f;
     const char *fname = "data/testxthread.dat";
     apr_status_t rv;
-    apr_int32_t flags = APR_CREATE|APR_READ|APR_WRITE|APR_APPEND|APR_XTHREAD;
+    apr_int32_t flags = APR_FOPEN_CREATE|APR_FOPEN_READ|APR_FOPEN_WRITE|APR_FOPEN_APPEND|APR_FOPEN_XTHREAD;
     char buf[128] = { 0 };
 
     /* Test for bug 38438, opening file with append + xthread and seeking to 

Modified: apr/apr/trunk/test/testfileinfo.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testfileinfo.c?rev=917838&r1=917837&r2=917838&view=diff
==============================================================================
--- apr/apr/trunk/test/testfileinfo.c (original)
+++ apr/apr/trunk/test/testfileinfo.c Tue Mar  2 01:28:52 2010
@@ -109,7 +109,7 @@
     apr_finfo_t finfo;
     apr_status_t rv;
 
-    rv = apr_file_open(&thefile, FILENAME, APR_READ, APR_OS_DEFAULT, p);
+    rv = apr_file_open(&thefile, FILENAME, APR_FOPEN_READ, APR_OS_DEFAULT, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     rv = apr_file_info_get(&finfo, APR_FINFO_NORM, thefile);
@@ -155,7 +155,7 @@
     apr_finfo_t stat_finfo;
     apr_status_t rv;
 
-    rv = apr_file_open(&thefile, FILENAME, APR_READ, APR_OS_DEFAULT, p);
+    rv = apr_file_open(&thefile, FILENAME, APR_FOPEN_READ, APR_OS_DEFAULT, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     rv = apr_file_info_get(&finfo, APR_FINFO_NORM, thefile);
 
@@ -180,8 +180,8 @@
     apr_size_t bytes;
 
     rv = apr_file_open(&thefile, NEWFILENAME,
-                       APR_READ | APR_WRITE | APR_CREATE | APR_TRUNCATE
-                       | APR_BUFFERED | APR_DELONCLOSE,
+                       APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_TRUNCATE
+                       | APR_FOPEN_BUFFERED | APR_FOPEN_DELONCLOSE,
                        APR_OS_DEFAULT, p);
     APR_ASSERT_SUCCESS(tc, "open file", rv);
 
@@ -213,8 +213,8 @@
      * the epoch.
      */
     rv = apr_file_open(&thefile, NEWFILENAME,
-                       APR_READ | APR_WRITE | APR_CREATE | APR_TRUNCATE
-                       | APR_BUFFERED | APR_DELONCLOSE,
+                       APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_TRUNCATE
+                       | APR_FOPEN_BUFFERED | APR_FOPEN_DELONCLOSE,
                        APR_OS_DEFAULT, p);
     APR_ASSERT_SUCCESS(tc, "open file", rv);
 

Modified: apr/apr/trunk/test/testflock.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testflock.c?rev=917838&r1=917837&r2=917838&view=diff
==============================================================================
--- apr/apr/trunk/test/testflock.c (original)
+++ apr/apr/trunk/test/testflock.c Tue Mar  2 01:28:52 2010
@@ -63,7 +63,7 @@
     apr_status_t rv;
     int code;
     
-    rv = apr_file_open(&file, TESTFILE, APR_WRITE|APR_CREATE, 
+    rv = apr_file_open(&file, TESTFILE, APR_FOPEN_WRITE|APR_FOPEN_CREATE,
                        APR_OS_DEFAULT, p);
     APR_ASSERT_SUCCESS(tc, "Could not create file.", rv);
     ABTS_PTR_NOTNULL(tc, file);

Modified: apr/apr/trunk/test/testldap.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testldap.c?rev=917838&r1=917837&r2=917838&view=diff
==============================================================================
--- apr/apr/trunk/test/testldap.c (original)
+++ apr/apr/trunk/test/testldap.c Tue Mar  2 01:28:52 2010
@@ -80,7 +80,7 @@
 
     ldap_host[0] = '\0';
     rv = apr_file_open(&thefile, FILENAME, 
-                       APR_READ, 
+                       APR_FOPEN_READ,
                        APR_UREAD | APR_UWRITE | APR_GREAD, p);
     if (rv != APR_SUCCESS) {
         return 0;

Modified: apr/apr/trunk/test/testmmap.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testmmap.c?rev=917838&r1=917837&r2=917838&view=diff
==============================================================================
--- apr/apr/trunk/test/testmmap.c (original)
+++ apr/apr/trunk/test/testmmap.c Tue Mar  2 01:28:52 2010
@@ -73,7 +73,7 @@
 {
     apr_status_t rv;
 
-    rv = apr_file_open(&thefile, file1, APR_READ, APR_UREAD | APR_GREAD, p);
+    rv = apr_file_open(&thefile, file1, APR_FOPEN_READ, APR_UREAD | APR_GREAD, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     ABTS_PTR_NOTNULL(tc, thefile);
 }

Modified: apr/apr/trunk/test/testproc.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testproc.c?rev=917838&r1=917837&r2=917838&view=diff
==============================================================================
--- apr/apr/trunk/test/testproc.c (original)
+++ apr/apr/trunk/test/testproc.c Tue Mar  2 01:28:52 2010
@@ -91,15 +91,15 @@
 
     testfile = NULL;
     rv = apr_file_open(&testfile, "data/stdin",
-                       APR_READ | APR_WRITE | APR_CREATE | APR_EXCL,
+                       APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_EXCL,
                        APR_OS_DEFAULT, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     rv = apr_file_open(&testout, "data/stdout",
-                       APR_READ | APR_WRITE | APR_CREATE | APR_EXCL,
+                       APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_EXCL,
                        APR_OS_DEFAULT, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     rv = apr_file_open(&testerr, "data/stderr",
-                       APR_READ | APR_WRITE | APR_CREATE | APR_EXCL,
+                       APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_CREATE | APR_FOPEN_EXCL,
                        APR_OS_DEFAULT, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 

Modified: apr/apr/trunk/test/testxml.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testxml.c?rev=917838&r1=917837&r2=917838&view=diff
==============================================================================
--- apr/apr/trunk/test/testxml.c (original)
+++ apr/apr/trunk/test/testxml.c Tue Mar  2 01:28:52 2010
@@ -28,8 +28,8 @@
     apr_off_t off = 0L;
     char template[] = "data/testxmldummyerrorXXXXXX";
 
-    rv = apr_file_mktemp(fd, template, APR_CREATE | APR_TRUNCATE | APR_DELONCLOSE |
-                         APR_READ | APR_WRITE | APR_EXCL, p);
+    rv = apr_file_mktemp(fd, template, APR_FOPEN_CREATE | APR_FOPEN_TRUNCATE | APR_FOPEN_DELONCLOSE
|
+                         APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_EXCL, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     if (rv != APR_SUCCESS)
@@ -62,8 +62,8 @@
     apr_off_t off = 0L;
     char template[] = "data/testxmldummyXXXXXX";
 
-    rv = apr_file_mktemp(fd, template, APR_CREATE | APR_TRUNCATE | APR_DELONCLOSE |
-                         APR_READ | APR_WRITE | APR_EXCL, p);
+    rv = apr_file_mktemp(fd, template, APR_FOPEN_CREATE | APR_FOPEN_TRUNCATE | APR_FOPEN_DELONCLOSE
|
+                         APR_FOPEN_READ | APR_FOPEN_WRITE | APR_FOPEN_EXCL, p);
     ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
 
     if (rv != APR_SUCCESS)

Modified: apr/apr/trunk/test/tryread.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/tryread.c?rev=917838&r1=917837&r2=917838&view=diff
==============================================================================
--- apr/apr/trunk/test/tryread.c (original)
+++ apr/apr/trunk/test/tryread.c Tue Mar  2 01:28:52 2010
@@ -33,7 +33,7 @@
     apr_initialize();
     apr_pool_create(&p, NULL);
 
-    if (apr_file_open(&file, TESTFILE, APR_WRITE, APR_OS_DEFAULT, p) 
+    if (apr_file_open(&file, TESTFILE, APR_FOPEN_WRITE, APR_OS_DEFAULT, p)
         != APR_SUCCESS) {
         
         exit(UNEXPECTED_ERROR);



Mime
View raw message