You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2002/10/13 05:34:32 UTC
cvs commit: apr/file_io/os2 dir.c filestat.c open.c pipe.c readwrite.c seek.c
wrowe 2002/10/12 20:34:32
Modified: dso/os2 dso.c
file_io/os2 dir.c filestat.c open.c pipe.c readwrite.c
seek.c
Log:
Prepare to eliminate a platform specific
#define APR_OS2_STATUS(e) (APR_FROM_OS_ERROR(e))
for the platform agnostic APR_FROM_OS_ERROR() macro.
Revision Changes Path
1.26 +3 -3 apr/dso/os2/dso.c
Index: dso.c
===================================================================
RCS file: /home/cvs/apr/dso/os2/dso.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- dso.c 13 Mar 2002 20:39:09 -0000 1.25
+++ dso.c 13 Oct 2002 03:34:32 -0000 1.26
@@ -73,7 +73,7 @@
if (rc == 0)
dso->handle = 0;
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
@@ -89,9 +89,9 @@
(*res_handle)->failed_module = NULL;
if ((rc = DosLoadModule(failed_module, sizeof(failed_module), path, &handle)) != 0) {
- (*res_handle)->load_error = APR_OS2_STATUS(rc);
+ (*res_handle)->load_error = APR_FROM_OS_ERROR(rc);
(*res_handle)->failed_module = apr_pstrdup(ctx, failed_module);
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
(*res_handle)->handle = handle;
1.32 +4 -4 apr/file_io/os2/dir.c
Index: dir.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/dir.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- dir.c 11 Jun 2002 10:35:20 -0000 1.31
+++ dir.c 13 Oct 2002 03:34:32 -0000 1.32
@@ -101,7 +101,7 @@
}
}
- return APR_OS2_STATUS(rv);
+ return APR_FROM_OS_ERROR(rv);
}
@@ -154,7 +154,7 @@
thedir->validentry = FALSE;
if (rv)
- return APR_OS2_STATUS(rv);
+ return APR_FROM_OS_ERROR(rv);
return APR_ENOENT;
}
@@ -170,7 +170,7 @@
APR_DECLARE(apr_status_t) apr_dir_make(const char *path, apr_fileperms_t perm, apr_pool_t *pool)
{
- return APR_OS2_STATUS(DosCreateDir(path, NULL));
+ return APR_FROM_OS_ERROR(DosCreateDir(path, NULL));
}
@@ -185,7 +185,7 @@
APR_DECLARE(apr_status_t) apr_dir_remove(const char *path, apr_pool_t *pool)
{
- return APR_OS2_STATUS(DosDeleteDir(path));
+ return APR_FROM_OS_ERROR(DosDeleteDir(path));
}
1.29 +3 -3 apr/file_io/os2/filestat.c
Index: filestat.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/filestat.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- filestat.c 13 Mar 2002 20:39:10 -0000 1.28
+++ filestat.c 13 Oct 2002 03:34:32 -0000 1.29
@@ -112,7 +112,7 @@
return APR_SUCCESS;
}
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
@@ -142,7 +142,7 @@
finfo->protection = 0;
finfo->filetype = APR_NOFILE;
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
APR_DECLARE(apr_status_t) apr_file_perms_set(const char *fname, apr_fileperms_t perms)
@@ -187,7 +187,7 @@
return APR_SUCCESS;
}
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
1.54 +5 -5 apr/file_io/os2/open.c
Index: open.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/open.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- open.c 16 Jul 2002 17:55:01 -0000 1.53
+++ open.c 13 Oct 2002 03:34:32 -0000 1.54
@@ -135,7 +135,7 @@
}
if (rv != 0)
- return APR_OS2_STATUS(rv);
+ return APR_FROM_OS_ERROR(rv);
dafile->isopen = TRUE;
dafile->fname = apr_pstrdup(pool, fname);
@@ -167,10 +167,10 @@
status = APR_SUCCESS;
if (file->flags & APR_DELONCLOSE) {
- status = APR_OS2_STATUS(DosDelete(file->fname));
+ status = APR_FROM_OS_ERROR(DosDelete(file->fname));
}
} else {
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
}
@@ -185,7 +185,7 @@
APR_DECLARE(apr_status_t) apr_file_remove(const char *path, apr_pool_t *pool)
{
ULONG rc = DosDelete(path);
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
@@ -203,7 +203,7 @@
}
}
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
1.36 +7 -7 apr/file_io/os2/pipe.c
Index: pipe.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/pipe.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- pipe.c 20 Mar 2002 08:54:42 -0000 1.35
+++ pipe.c 13 Oct 2002 03:34:32 -0000 1.36
@@ -72,13 +72,13 @@
rc = DosCreateNPipe(pipename, filedes, NP_ACCESS_INBOUND, NP_NOWAIT|1, 4096, 4096, 0);
if (rc)
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
rc = DosConnectNPipe(filedes[0]);
if (rc && rc != ERROR_PIPE_NOT_CONNECTED) {
DosClose(filedes[0]);
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
rc = DosOpen (pipename, filedes+1, &action, 0, FILE_NORMAL,
@@ -88,7 +88,7 @@
if (rc) {
DosClose(filedes[0]);
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
(*in) = (apr_file_t *)apr_palloc(pool, sizeof(apr_file_t));
@@ -97,7 +97,7 @@
if (rc) {
DosClose(filedes[0]);
DosClose(filedes[1]);
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
rc = DosSetNPipeSem(filedes[0], (HSEM)(*in)->pipeSem, 1);
@@ -110,7 +110,7 @@
DosClose(filedes[0]);
DosClose(filedes[1]);
DosCloseEventSem((*in)->pipeSem);
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
(*in)->pool = pool;
@@ -157,13 +157,13 @@
if (thepipe->timeout >= 0) {
if (thepipe->blocking != BLK_OFF) {
thepipe->blocking = BLK_OFF;
- return APR_OS2_STATUS(DosSetNPHState(thepipe->filedes, NP_NOWAIT));
+ return APR_FROM_OS_ERROR(DosSetNPHState(thepipe->filedes, NP_NOWAIT));
}
}
else if (thepipe->timeout == -1) {
if (thepipe->blocking != BLK_ON) {
thepipe->blocking = BLK_ON;
- return APR_OS2_STATUS(DosSetNPHState(thepipe->filedes, NP_WAIT));
+ return APR_FROM_OS_ERROR(DosSetNPHState(thepipe->filedes, NP_WAIT));
}
}
}
1.52 +7 -7 apr/file_io/os2/readwrite.c
Index: readwrite.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/readwrite.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- readwrite.c 10 Jul 2002 06:01:12 -0000 1.51
+++ readwrite.c 13 Oct 2002 03:34:32 -0000 1.52
@@ -117,7 +117,7 @@
return APR_EOF;
}
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
} else {
if (thefile->pipe)
DosResetEventSem(thefile->pipeSem, &rc);
@@ -133,7 +133,7 @@
if (rc) {
*nbytes = 0;
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
*nbytes = bytesread;
@@ -187,7 +187,7 @@
}
apr_thread_mutex_unlock(thefile->mutex);
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
} else {
if (thefile->flags & APR_APPEND) {
FILELOCK all = { 0, 0x7fffffff };
@@ -209,7 +209,7 @@
if (rc) {
*nbytes = 0;
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
*nbytes = byteswritten;
@@ -249,7 +249,7 @@
rc = DosWrite(thefile->filedes, &ch, 1, &byteswritten);
if (rc) {
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
return APR_SUCCESS;
@@ -313,7 +313,7 @@
thefile->bufpos = 0;
}
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
} else {
/* There isn't anything to do if we aren't buffering the output
* so just return success.
@@ -385,5 +385,5 @@
if (rc == ERROR_TIMEOUT)
return APR_TIMEUP;
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
1.22 +3 -3 apr/file_io/os2/seek.c
Index: seek.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/seek.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- seek.c 19 Jun 2002 19:51:04 -0000 1.21
+++ seek.c 13 Oct 2002 03:34:32 -0000 1.22
@@ -80,7 +80,7 @@
thefile->bufpos = thefile->dataRead = 0;
}
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
@@ -130,7 +130,7 @@
break;
}
- return APR_OS2_STATUS(DosSetFilePtr(thefile->filedes, *offset, where, (ULONG *)offset));
+ return APR_FROM_OS_ERROR(DosSetFilePtr(thefile->filedes, *offset, where, (ULONG *)offset));
}
}
@@ -141,7 +141,7 @@
int rc = DosSetFileSize(fp->filedes, offset);
if (rc != 0) {
- return APR_OS2_STATUS(rc);
+ return APR_FROM_OS_ERROR(rc);
}
if (fp->buffered) {