apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject svn commit: r930224 - in /apr/apr/trunk: include/ locks/os2/ network_io/os2/ shmem/os2/ threadproc/os2/ threadproc/unix/
Date Fri, 02 Apr 2010 10:10:01 GMT
Author: bjh
Date: Fri Apr  2 10:10:01 2010
New Revision: 930224

URL: http://svn.apache.org/viewvc?rev=930224&view=rev
Log:
OS/2: Remove all remaining uses of APR_OS2_STATUS macro which has been
superceded by the more general APR_FROM_OS_ERROR.

Modified:
    apr/apr/trunk/include/apr_errno.h
    apr/apr/trunk/locks/os2/thread_mutex.c
    apr/apr/trunk/network_io/os2/os2calls.c
    apr/apr/trunk/network_io/os2/sendrecv.c
    apr/apr/trunk/network_io/os2/sockets.c
    apr/apr/trunk/network_io/os2/sockopt.c
    apr/apr/trunk/shmem/os2/shm.c
    apr/apr/trunk/threadproc/os2/proc.c
    apr/apr/trunk/threadproc/os2/thread.c
    apr/apr/trunk/threadproc/os2/threadpriv.c
    apr/apr/trunk/threadproc/unix/signals.c

Modified: apr/apr/trunk/include/apr_errno.h
URL: http://svn.apache.org/viewvc/apr/apr/trunk/include/apr_errno.h?rev=930224&r1=930223&r2=930224&view=diff
==============================================================================
--- apr/apr/trunk/include/apr_errno.h (original)
+++ apr/apr/trunk/include/apr_errno.h Fri Apr  2 10:10:01 2010
@@ -855,10 +855,6 @@ APR_DECLARE(char *) apr_strerror(apr_sta
 #define apr_get_netos_error()   (APR_FROM_OS_ERROR(errno))
 #define apr_set_netos_error(e)  (errno = APR_TO_OS_ERROR(e))
 
-/* And this needs to be greped away for good:
- */
-#define APR_OS2_STATUS(e) (APR_FROM_OS_ERROR(e))
-
 /* These can't sit in a private header, so in spite of the extra size, 
  * they need to be made available here.
  */

Modified: apr/apr/trunk/locks/os2/thread_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/os2/thread_mutex.c?rev=930224&r1=930223&r2=930224&view=diff
==============================================================================
--- apr/apr/trunk/locks/os2/thread_mutex.c (original)
+++ apr/apr/trunk/locks/os2/thread_mutex.c Fri Apr  2 10:10:01 2010
@@ -50,7 +50,7 @@ APR_DECLARE(apr_status_t) apr_thread_mut
     if (!rc)
         apr_pool_cleanup_register(pool, new_mutex, thread_mutex_cleanup, apr_pool_cleanup_null);
 
-    return APR_OS2_STATUS(rc);
+    return APR_FROM_OS_ERROR(rc);
 }
 
 
@@ -58,7 +58,7 @@ APR_DECLARE(apr_status_t) apr_thread_mut
 APR_DECLARE(apr_status_t) apr_thread_mutex_lock(apr_thread_mutex_t *mutex)
 {
     ULONG rc = DosRequestMutexSem(mutex->hMutex, SEM_INDEFINITE_WAIT);
-    return APR_OS2_STATUS(rc);
+    return APR_FROM_OS_ERROR(rc);
 }
 
 
@@ -66,7 +66,7 @@ APR_DECLARE(apr_status_t) apr_thread_mut
 APR_DECLARE(apr_status_t) apr_thread_mutex_trylock(apr_thread_mutex_t *mutex)
 {
     ULONG rc = DosRequestMutexSem(mutex->hMutex, SEM_IMMEDIATE_RETURN);
-    return APR_OS2_STATUS(rc);
+    return APR_FROM_OS_ERROR(rc);
 }
 
 
@@ -74,7 +74,7 @@ APR_DECLARE(apr_status_t) apr_thread_mut
 APR_DECLARE(apr_status_t) apr_thread_mutex_unlock(apr_thread_mutex_t *mutex)
 {
     ULONG rc = DosReleaseMutexSem(mutex->hMutex);
-    return APR_OS2_STATUS(rc);
+    return APR_FROM_OS_ERROR(rc);
 }
 
 

Modified: apr/apr/trunk/network_io/os2/os2calls.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/network_io/os2/os2calls.c?rev=930224&r1=930223&r2=930224&view=diff
==============================================================================
--- apr/apr/trunk/network_io/os2/os2calls.c (original)
+++ apr/apr/trunk/network_io/os2/os2calls.c Fri Apr  2 10:10:01 2010
@@ -55,7 +55,7 @@ static int os2_fn_link()
         rc = DosLoadModule(errorstr, sizeof(errorstr), "SO32DLL", &hSO32DLL);
 
         if (rc)
-            return APR_OS2_STATUS(rc);
+            return APR_FROM_OS_ERROR(rc);
 
         rc = DosQueryProcAddr(hSO32DLL, 0, "SOCKET", &apr_os2_socket);
 
@@ -114,7 +114,7 @@ static int os2_fn_link()
             rc = DosQueryProcAddr(hSO32DLL, 0, "RECVFROM", &apr_os2_recvfrom);
 
         if (rc)
-            return APR_OS2_STATUS(rc);
+            return APR_FROM_OS_ERROR(rc);
     }
 
     DosExitCritSec();

Modified: apr/apr/trunk/network_io/os2/sendrecv.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/network_io/os2/sendrecv.c?rev=930224&r1=930223&r2=930224&view=diff
==============================================================================
--- apr/apr/trunk/network_io/os2/sendrecv.c (original)
+++ apr/apr/trunk/network_io/os2/sendrecv.c Fri Apr  2 10:10:01 2010
@@ -46,7 +46,7 @@ APR_DECLARE(apr_status_t) apr_socket_sen
                 if (err == SOCEINTR)
                     continue;
 
-                return APR_OS2_STATUS(err);
+                return APR_FROM_OS_ERROR(err);
             }
         }
 
@@ -56,7 +56,7 @@ APR_DECLARE(apr_status_t) apr_socket_sen
 
     if (err) {
         *len = 0;
-        return APR_OS2_STATUS(err);
+        return APR_FROM_OS_ERROR(err);
     }
 
     (*len) = rv;
@@ -86,7 +86,7 @@ APR_DECLARE(apr_status_t) apr_socket_rec
                 if (err == SOCEINTR)
                     continue;
 
-                return APR_OS2_STATUS(err);
+                return APR_FROM_OS_ERROR(err);
             }
         }
 
@@ -96,7 +96,7 @@ APR_DECLARE(apr_status_t) apr_socket_rec
 
     if (err) {
         *len = 0;
-        return APR_OS2_STATUS(err);
+        return APR_FROM_OS_ERROR(err);
     }
 
     (*len) = rv;
@@ -137,7 +137,7 @@ APR_DECLARE(apr_status_t) apr_socket_sen
                 if (err == SOCEINTR)
                     continue;
 
-                return APR_OS2_STATUS(err);
+                return APR_FROM_OS_ERROR(err);
             }
         }
 
@@ -147,7 +147,7 @@ APR_DECLARE(apr_status_t) apr_socket_sen
 
     if (err) {
         *len = 0;
-        return APR_OS2_STATUS(err);
+        return APR_FROM_OS_ERROR(err);
     }
 
     *len = rv;

Modified: apr/apr/trunk/network_io/os2/sockets.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/network_io/os2/sockets.c?rev=930224&r1=930223&r2=930224&view=diff
==============================================================================
--- apr/apr/trunk/network_io/os2/sockets.c (original)
+++ apr/apr/trunk/network_io/os2/sockets.c Fri Apr  2 10:10:01 2010
@@ -43,7 +43,7 @@ static apr_status_t socket_cleanup(void 
         return APR_SUCCESS;
     }
     else {
-        return APR_OS2_STATUS(sock_errno());
+        return APR_FROM_OS_ERROR(sock_errno());
     }
 }
 
@@ -109,7 +109,7 @@ APR_DECLARE(apr_status_t) apr_socket_cre
 #endif
 
     if ((*new)->socketdes < 0) {
-        return APR_OS2_STATUS(sock_errno());
+        return APR_FROM_OS_ERROR(sock_errno());
     }
     set_socket_vars(*new, family, type, oprotocol);
 
@@ -128,7 +128,7 @@ APR_DECLARE(apr_status_t) apr_socket_shu
         return APR_SUCCESS;
     }
     else {
-        return APR_OS2_STATUS(sock_errno());
+        return APR_FROM_OS_ERROR(sock_errno());
     }
 }
 
@@ -144,7 +144,7 @@ APR_DECLARE(apr_status_t) apr_socket_bin
     if (bind(sock->socketdes, 
              (struct sockaddr *)&sa->sa,
              sa->salen) == -1)
-        return APR_OS2_STATUS(sock_errno());
+        return APR_FROM_OS_ERROR(sock_errno());
     else {
         sock->local_addr = sa;
         /* XXX IPv6 - this assumes sin_port and sin6_port at same offset */
@@ -159,7 +159,7 @@ APR_DECLARE(apr_status_t) apr_socket_lis
                                             apr_int32_t backlog)
 {
     if (listen(sock->socketdes, backlog) == -1)
-        return APR_OS2_STATUS(sock_errno());
+        return APR_FROM_OS_ERROR(sock_errno());
     else
         return APR_SUCCESS;
 }
@@ -179,7 +179,7 @@ APR_DECLARE(apr_status_t) apr_socket_acc
                                &(*new)->remote_addr->salen);
 
     if ((*new)->socketdes < 0) {
-        return APR_OS2_STATUS(sock_errno());
+        return APR_FROM_OS_ERROR(sock_errno());
     }
 
     *(*new)->local_addr = *sock->local_addr;
@@ -202,7 +202,7 @@ APR_DECLARE(apr_status_t) apr_socket_con
     if ((connect(sock->socketdes, (struct sockaddr *)&sa->sa.sin, 
                  sa->salen) < 0) &&
         (sock_errno() != SOCEINPROGRESS)) {
-        return APR_OS2_STATUS(sock_errno());
+        return APR_FROM_OS_ERROR(sock_errno());
     }
     else {
         int namelen = sizeof(sock->local_addr->sa.sin);

Modified: apr/apr/trunk/network_io/os2/sockopt.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/network_io/os2/sockopt.c?rev=930224&r1=930223&r2=930224&view=diff
==============================================================================
--- apr/apr/trunk/network_io/os2/sockopt.c (original)
+++ apr/apr/trunk/network_io/os2/sockopt.c Fri Apr  2 10:10:01 2010
@@ -50,27 +50,27 @@ APR_DECLARE(apr_status_t) apr_socket_opt
 
     if (opt & APR_SO_KEEPALIVE) {
         if (setsockopt(sock->socketdes, SOL_SOCKET, SO_KEEPALIVE, (void *)&one, sizeof(int))
== -1) {
-            return APR_OS2_STATUS(sock_errno());
+            return APR_FROM_OS_ERROR(sock_errno());
         }
     }
     if (opt & APR_SO_DEBUG) {
         if (setsockopt(sock->socketdes, SOL_SOCKET, SO_DEBUG, (void *)&one, sizeof(int))
== -1) {
-            return APR_OS2_STATUS(sock_errno());
+            return APR_FROM_OS_ERROR(sock_errno());
         }
     }
     if (opt & APR_SO_REUSEADDR) {
         if (setsockopt(sock->socketdes, SOL_SOCKET, SO_REUSEADDR, (void *)&one, sizeof(int))
== -1) {
-            return APR_OS2_STATUS(sock_errno());
+            return APR_FROM_OS_ERROR(sock_errno());
         }
     }
     if (opt & APR_SO_SNDBUF) {
         if (setsockopt(sock->socketdes, SOL_SOCKET, SO_SNDBUF, (void *)&on, sizeof(int))
== -1) {
-            return APR_OS2_STATUS(sock_errno());
+            return APR_FROM_OS_ERROR(sock_errno());
         }
     }
     if (opt & APR_SO_NONBLOCK) {
         if (ioctl(sock->socketdes, FIONBIO, (caddr_t)&one, sizeof(one)) == -1) {
-            return APR_OS2_STATUS(sock_errno());
+            return APR_FROM_OS_ERROR(sock_errno());
         } else {
             sock->nonblock = one;
         }
@@ -79,12 +79,12 @@ APR_DECLARE(apr_status_t) apr_socket_opt
         li.l_onoff = on;
         li.l_linger = APR_MAX_SECS_TO_LINGER;
         if (setsockopt(sock->socketdes, SOL_SOCKET, SO_LINGER, (char *) &li, sizeof(struct
linger)) == -1) {
-            return APR_OS2_STATUS(sock_errno());
+            return APR_FROM_OS_ERROR(sock_errno());
         }
     }
     if (opt & APR_TCP_NODELAY) {
         if (setsockopt(sock->socketdes, IPPROTO_TCP, TCP_NODELAY, (void *)&on, sizeof(int))
== -1) {
-            return APR_OS2_STATUS(sock_errno());
+            return APR_FROM_OS_ERROR(sock_errno());
         }
     }
     return APR_SUCCESS;
@@ -115,7 +115,7 @@ APR_DECLARE(apr_status_t) apr_socket_atm
     int oobmark;
 
     if (ioctl(sock->socketdes, SIOCATMARK, (void*)&oobmark, sizeof(oobmark)) <
0) {
-        return APR_OS2_STATUS(sock_errno());
+        return APR_FROM_OS_ERROR(sock_errno());
     }
 
     *atmark = (oobmark != 0);
@@ -129,7 +129,7 @@ APR_DECLARE(apr_status_t) apr_gethostnam
 {
     if (gethostname(buf, len) == -1) {
         buf[0] = '\0';
-        return APR_OS2_STATUS(sock_errno());
+        return APR_FROM_OS_ERROR(sock_errno());
     }
     else if (!memchr(buf, '\0', len)) { /* buffer too small */
         buf[0] = '\0';

Modified: apr/apr/trunk/shmem/os2/shm.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/shmem/os2/shm.c?rev=930224&r1=930223&r2=930224&view=diff
==============================================================================
--- apr/apr/trunk/shmem/os2/shm.c (original)
+++ apr/apr/trunk/shmem/os2/shm.c Fri Apr  2 10:10:01 2010
@@ -49,7 +49,7 @@ APR_DECLARE(apr_status_t) apr_shm_create
     rc = DosAllocSharedMem(&(newm->memblock), name, reqsize, flags);
 
     if (rc) {
-        return APR_OS2_STATUS(rc);
+        return APR_FROM_OS_ERROR(rc);
     }
 
     *m = newm;

Modified: apr/apr/trunk/threadproc/os2/proc.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/os2/proc.c?rev=930224&r1=930223&r2=930224&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/os2/proc.c (original)
+++ apr/apr/trunk/threadproc/os2/proc.c Fri Apr  2 10:10:01 2010
@@ -619,7 +619,7 @@ APR_DECLARE(apr_status_t) apr_proc_wait_
         return APR_CHILD_NOTDONE;
     }
 
-    return APR_OS2_STATUS(rc);
+    return APR_FROM_OS_ERROR(rc);
 } 
 
 
@@ -640,7 +640,7 @@ APR_DECLARE(apr_status_t) apr_proc_wait(
         return APR_CHILD_NOTDONE;
     }
 
-    return APR_OS2_STATUS(rc);
+    return APR_FROM_OS_ERROR(rc);
 } 
 
 

Modified: apr/apr/trunk/threadproc/os2/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/os2/thread.c?rev=930224&r1=930223&r2=930224&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/os2/thread.c (original)
+++ apr/apr/trunk/threadproc/os2/thread.c Fri Apr  2 10:10:01 2010
@@ -152,7 +152,7 @@ APR_DECLARE(apr_status_t) apr_thread_joi
         rc = 0; /* Thread had already terminated */
 
     *retval = thd->exitval;
-    return APR_OS2_STATUS(rc);
+    return APR_FROM_OS_ERROR(rc);
 }
 
 

Modified: apr/apr/trunk/threadproc/os2/threadpriv.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/os2/threadpriv.c?rev=930224&r1=930223&r2=930224&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/os2/threadpriv.c (original)
+++ apr/apr/trunk/threadproc/os2/threadpriv.c Fri Apr  2 10:10:01 2010
@@ -33,7 +33,7 @@ APR_DECLARE(apr_status_t) apr_threadkey_
     }
 
     (*key)->pool = pool;
-    return APR_OS2_STATUS(DosAllocThreadLocalMemory(1, &((*key)->key)));
+    return APR_FROM_OS_ERROR(DosAllocThreadLocalMemory(1, &((*key)->key)));
 }
 
 APR_DECLARE(apr_status_t) apr_threadkey_private_get(void **new, apr_threadkey_t *key)
@@ -50,7 +50,7 @@ APR_DECLARE(apr_status_t) apr_threadkey_
 
 APR_DECLARE(apr_status_t) apr_threadkey_private_delete(apr_threadkey_t *key)
 {
-    return APR_OS2_STATUS(DosFreeThreadLocalMemory(key->key));
+    return APR_FROM_OS_ERROR(DosFreeThreadLocalMemory(key->key));
 }
 
 APR_DECLARE(apr_status_t) apr_threadkey_data_get(void **data, const char *key,

Modified: apr/apr/trunk/threadproc/unix/signals.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/threadproc/unix/signals.c?rev=930224&r1=930223&r2=930224&view=diff
==============================================================================
--- apr/apr/trunk/threadproc/unix/signals.c (original)
+++ apr/apr/trunk/threadproc/unix/signals.c Fri Apr  2 10:10:01 2010
@@ -40,7 +40,7 @@ APR_DECLARE(apr_status_t) apr_proc_kill(
      * call instead
      */
     if (signum == SIGTERM) {
-        return APR_OS2_STATUS(DosSendSignalException(proc->pid,
+        return APR_FROM_OS_ERROR(DosSendSignalException(proc->pid,
                                                      XCPT_SIGNAL_BREAK));
     }
 #endif /* OS2 */



Mime
View raw message