Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 80978 invoked by uid 500); 8 Jun 2002 22:32:12 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 80967 invoked from network); 8 Jun 2002 22:32:12 -0000 Date: 8 Jun 2002 22:32:12 -0000 Message-ID: <20020608223212.826.qmail@icarus.apache.org> From: wrowe@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/include/arch/win32 inherit.h X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N wrowe 2002/06/08 15:32:12 Modified: file_io/os2 open.c file_io/unix filedup.c open.c file_io/win32 open.c network_io/os2 sockets.c network_io/unix sockets.c network_io/win32 sockets.c include apr_file_io.h apr_inherit.h apr_network_io.h include/arch/unix inherit.h include/arch/win32 inherit.h Log: Last for today (compiles clean on Win32, hope the same for the rest of our builds.) Clean up inherit_[un]set and simplify win32 discrepancy with inherit.h Revision Changes Path 1.52 +2 -2 apr/file_io/os2/open.c Index: open.c =================================================================== RCS file: /home/cvs/apr/file_io/os2/open.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- open.c 20 Mar 2002 08:54:42 -0000 1.51 +++ open.c 8 Jun 2002 22:32:11 -0000 1.52 @@ -267,7 +267,7 @@ APR_POOL_IMPLEMENT_ACCESSOR(file); -APR_IMPLEMENT_SET_INHERIT(file, flags, pool, apr_file_cleanup) +APR_IMPLEMENT_INHERIT_SET(file, flags, pool, apr_file_cleanup) -APR_IMPLEMENT_UNSET_INHERIT(file, flags, pool, apr_file_cleanup) +APR_IMPLEMENT_INHERIT_UNSET(file, flags, pool, apr_file_cleanup) 1.48 +1 -1 apr/file_io/unix/filedup.c Index: filedup.c =================================================================== RCS file: /home/cvs/apr/file_io/unix/filedup.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- filedup.c 20 Mar 2002 08:54:42 -0000 1.47 +++ filedup.c 8 Jun 2002 22:32:11 -0000 1.48 @@ -113,7 +113,7 @@ (*new_file)->ungetchar = old_file->ungetchar; /* apr_file_dup() clears the inherit attribute, user must call - * apr_file_set_inherit() again on the dupped handle, as necessary. + * apr_file_inherit_set() again on the dupped handle, as necessary. */ (*new_file)->flags = old_file->flags & ~APR_INHERIT; 1.97 +2 -2 apr/file_io/unix/open.c Index: open.c =================================================================== RCS file: /home/cvs/apr/file_io/unix/open.c,v retrieving revision 1.96 retrieving revision 1.97 diff -u -r1.96 -r1.97 --- open.c 31 May 2002 16:18:37 -0000 1.96 +++ open.c 8 Jun 2002 22:32:11 -0000 1.97 @@ -272,8 +272,8 @@ return apr_os_file_put(thefile, &fd, 0, pool); } -APR_IMPLEMENT_SET_INHERIT(file, flags, pool, apr_unix_file_cleanup) +APR_IMPLEMENT_INHERIT_SET(file, flags, pool, apr_unix_file_cleanup) -APR_IMPLEMENT_UNSET_INHERIT(file, flags, pool, apr_unix_file_cleanup) +APR_IMPLEMENT_INHERIT_UNSET(file, flags, pool, apr_unix_file_cleanup) APR_POOL_IMPLEMENT_ACCESSOR(file) 1.105 +4 -7 apr/file_io/win32/open.c Index: open.c =================================================================== RCS file: /home/cvs/apr/file_io/win32/open.c,v retrieving revision 1.104 retrieving revision 1.105 diff -u -r1.104 -r1.105 --- open.c 4 Jun 2002 02:49:51 -0000 1.104 +++ open.c 8 Jun 2002 22:32:11 -0000 1.105 @@ -68,6 +68,7 @@ #include #endif #include "misc.h" +#include "inherit.h" #if APR_HAS_UNICODE_FS apr_status_t utf8_to_unicode_path(apr_wchar_t* retstr, apr_size_t retlen, @@ -605,10 +606,6 @@ APR_POOL_IMPLEMENT_ACCESSOR(file); -APR_DECLARE_SET_INHERIT(file) { - return; -} - -APR_DECLARE_UNSET_INHERIT(file) { - return; -} +APR_IMPLEMENT_INHERIT_SET(file, flags, pool, file_cleanup) + +APR_IMPLEMENT_INHERIT_UNSET(file, flags, pool, file_cleanup) 1.55 +2 -2 apr/network_io/os2/sockets.c Index: sockets.c =================================================================== RCS file: /home/cvs/apr/network_io/os2/sockets.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- sockets.c 14 Apr 2002 08:33:52 -0000 1.54 +++ sockets.c 8 Jun 2002 22:32:11 -0000 1.55 @@ -296,6 +296,6 @@ return APR_SUCCESS; } -APR_IMPLEMENT_SET_INHERIT(socket, inherit, cntxt, socket_cleanup) +APR_IMPLEMENT_INHERIT_SET(socket, inherit, cntxt, socket_cleanup) -APR_IMPLEMENT_UNSET_INHERIT(socket, inherit, cntxt, socket_cleanup) +APR_IMPLEMENT_INHERIT_UNSET(socket, inherit, cntxt, socket_cleanup) 1.99 +2 -2 apr/network_io/unix/sockets.c Index: sockets.c =================================================================== RCS file: /home/cvs/apr/network_io/unix/sockets.c,v retrieving revision 1.98 retrieving revision 1.99 diff -u -r1.98 -r1.99 --- sockets.c 16 Apr 2002 20:25:57 -0000 1.98 +++ sockets.c 8 Jun 2002 22:32:11 -0000 1.99 @@ -371,6 +371,6 @@ return APR_SUCCESS; } -APR_IMPLEMENT_SET_INHERIT(socket, inherit, cntxt, socket_cleanup) +APR_IMPLEMENT_INHERIT_SET(socket, inherit, cntxt, socket_cleanup) -APR_IMPLEMENT_UNSET_INHERIT(socket, inherit, cntxt, socket_cleanup) +APR_IMPLEMENT_INHERIT_UNSET(socket, inherit, cntxt, socket_cleanup) 1.78 +3 -6 apr/network_io/win32/sockets.c Index: sockets.c =================================================================== RCS file: /home/cvs/apr/network_io/win32/sockets.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -r1.77 -r1.78 --- sockets.c 7 Jun 2002 21:17:19 -0000 1.77 +++ sockets.c 8 Jun 2002 22:32:11 -0000 1.78 @@ -58,6 +58,7 @@ #include "apr_lib.h" #include "apr_portable.h" #include +#include "inherit.h" static char generic_inaddr_any[16] = {0}; /* big enough for IPv4 or IPv6 */ @@ -423,10 +424,6 @@ return APR_SUCCESS; } -APR_DECLARE_SET_INHERIT(socket) { - return; -} +APR_IMPLEMENT_INHERIT_SET(socket, inherit, cntxt, socket_cleanup) -APR_DECLARE_UNSET_INHERIT(socket) { - return; -} +APR_IMPLEMENT_INHERIT_UNSET(socket, inherit, cntxt, socket_cleanup) 1.126 +9 -3 apr/include/apr_file_io.h Index: apr_file_io.h =================================================================== RCS file: /home/cvs/apr/include/apr_file_io.h,v retrieving revision 1.125 retrieving revision 1.126 diff -u -r1.125 -r1.126 --- apr_file_io.h 31 May 2002 22:28:40 -0000 1.125 +++ apr_file_io.h 8 Jun 2002 22:32:11 -0000 1.126 @@ -118,11 +118,11 @@ /** @} */ /** - * @defgroup APR_file_set_attributes File Attribute Flags + * @defgroup APR_file_attrs_set File Attribute Flags * @{ */ -/* flags for apr_file_set_attributes */ +/* flags for apr_file_attrs_set */ #define APR_FILE_ATTR_READONLY 0x01 /**< File is read-only */ #define APR_FILE_ATTR_EXECUTABLE 0x02 /**< File is executable */ /** @} */ @@ -666,12 +666,18 @@ * @param file The file to enable inheritance. * */ -APR_DECLARE(void) apr_file_set_inherit(apr_file_t *file); +APR_DECLARE(void) apr_file_inherit_set(apr_file_t *file); /** * Unset a file from being inherited by child processes. * @param file The file to disable inheritance. */ +APR_DECLARE(void) apr_file_inherit_unset(apr_file_t *file); + +/** @deprecated @see apr_file_inherit_set */ +APR_DECLARE(void) apr_file_set_inherit(apr_file_t *file); + +/** @deprecated @see apr_file_inherit_unset */ APR_DECLARE(void) apr_file_unset_inherit(apr_file_t *file); /** 1.10 +6 -5 apr/include/apr_inherit.h Index: apr_inherit.h =================================================================== RCS file: /home/cvs/apr/include/apr_inherit.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- apr_inherit.h 13 Mar 2002 20:39:14 -0000 1.9 +++ apr_inherit.h 8 Jun 2002 22:32:11 -0000 1.10 @@ -70,17 +70,18 @@ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ + /** * @param name Set Inheritance for this Socket/File Handle */ -#define APR_DECLARE_SET_INHERIT(name) \ - APR_DECLARE(void) apr_##name##_set_inherit(apr_##name##_t *name) +#define APR_DECLARE_INHERIT_SET(name) \ + APR_DECLARE(void) apr_##name##_inherit_set(apr_##name##_t *name) + /** * @param name Unset Inheritance for this Socket/File Handle */ - -#define APR_DECLARE_UNSET_INHERIT(name) \ - APR_DECLARE(void) apr_##name##_unset_inherit(apr_##name##_t *name) +#define APR_DECLARE_INHERIT_UNSET(name) \ + APR_DECLARE(void) apr_##name##_inherit_unset(apr_##name##_t *name) #ifdef __cplusplus } 1.121 +7 -1 apr/include/apr_network_io.h Index: apr_network_io.h =================================================================== RCS file: /home/cvs/apr/include/apr_network_io.h,v retrieving revision 1.120 retrieving revision 1.121 diff -u -r1.120 -r1.121 --- apr_network_io.h 11 Apr 2002 01:30:45 -0000 1.120 +++ apr_network_io.h 8 Jun 2002 22:32:11 -0000 1.121 @@ -811,13 +811,19 @@ * Set a socket to be inherited by child processes. * @param socket The socket to enable inheritance. */ +APR_DECLARE(void) apr_socket_inherit_set(apr_socket_t *skt); + +/** @deprecated @see apr_socket_inherit_set */ APR_DECLARE(void) apr_socket_set_inherit(apr_socket_t *skt); /** * Unset a socket from being inherited by child processes. * @param socket The socket to disable inheritance. */ -APR_DECLARE(void) apr_socket_unset_inherit(apr_socket_t *skt); +APR_DECLARE(void) apr_socket_inherit_unset(apr_socket_t *skt); + +/** @deprecated @see apr_socket_inherit_set */ +APR_DECLARE(void) apr_socket_set_inherit(apr_socket_t *skt); #ifdef __cplusplus } 1.10 +14 -4 apr/include/arch/unix/inherit.h Index: inherit.h =================================================================== RCS file: /home/cvs/apr/include/arch/unix/inherit.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- inherit.h 13 Mar 2002 20:39:18 -0000 1.9 +++ inherit.h 8 Jun 2002 22:32:11 -0000 1.10 @@ -59,24 +59,34 @@ #define APR_INHERIT (2^24) /* Must not conflicts with other bits */ -#define APR_IMPLEMENT_SET_INHERIT(name, flag, pool, cleanup) \ -void apr_##name##_set_inherit(apr_##name##_t *name) \ +#define APR_IMPLEMENT_INHERIT_SET(name, flag, pool, cleanup) \ +void apr_##name##_inherit_set(apr_##name##_t *name) \ { \ if (!(name->flag & APR_INHERIT)) { \ name->flag |= APR_INHERIT; \ apr_pool_child_cleanup_set(name->pool, (void *)name, \ cleanup, apr_pool_cleanup_null); \ } \ +} \ +/* Deprecated */ \ +void apr_##name##_set_inherit(apr_##name##_t *name) \ +{ \ + apr_##name##_inherit_set(name); \ } -#define APR_IMPLEMENT_UNSET_INHERIT(name, flag, pool, cleanup) \ -void apr_##name##_unset_inherit(apr_##name##_t *name) \ +#define APR_IMPLEMENT_INHERIT_UNSET(name, flag, pool, cleanup) \ +void apr_##name##_inherit_unset(apr_##name##_t *name) \ { \ if (name->flag & APR_INHERIT) { \ name->flag &= ~APR_INHERIT; \ apr_pool_child_cleanup_set(name->pool, (void *)name, \ cleanup, cleanup); \ } \ +} \ +/* Deprecated */ \ +void apr_##name##_unset_inherit(apr_##name##_t *name) \ +{ \ + apr_##name##_inherit_unset(name); \ } #endif /* ! INHERIT_H */ 1.2 +8 -16 apr/include/arch/win32/inherit.h Index: inherit.h =================================================================== RCS file: /home/cvs/apr/include/arch/win32/inherit.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- inherit.h 8 Jun 2002 22:19:51 -0000 1.1 +++ inherit.h 8 Jun 2002 22:32:11 -0000 1.2 @@ -60,33 +60,25 @@ #define APR_INHERIT (2^24) /* Must not conflicts with other bits */ #define APR_IMPLEMENT_INHERIT_SET(name, flag, pool, cleanup) \ -void apr_##name##_inherit_set(apr_##name##_t *name) \ +APR_DECLARE(void) apr_##name##_inherit_set(apr_##name##_t *name) \ { \ - if (!(name->flag & APR_INHERIT)) { \ - name->flag |= APR_INHERIT; \ - apr_pool_child_cleanup_set(name->pool, (void *)name, \ - cleanup, apr_pool_cleanup_null); \ - } \ + return; \ } \ /* Deprecated */ \ -void apr_##name##_set_inherit(apr_##name##_t *name) \ +APR_DECLARE(void) apr_##name##_set_inherit(apr_##name##_t *name) \ { \ - apr_##name##_inherit_set(apr_##name##_t *name) \ + apr_##name##_inherit_set(name); \ } #define APR_IMPLEMENT_INHERIT_UNSET(name, flag, pool, cleanup) \ -void apr_##name##_inherit_unset(apr_##name##_t *name) \ +APR_DECLARE(void) apr_##name##_inherit_unset(apr_##name##_t *name) \ { \ - if (name->flag & APR_INHERIT) { \ - name->flag &= ~APR_INHERIT; \ - apr_pool_child_cleanup_set(name->pool, (void *)name, \ - cleanup, cleanup); \ - } \ + return; \ } \ /* Deprecated */ \ -void apr_##name##_unset_inherit(apr_##name##_t *name) \ +APR_DECLARE(void) apr_##name##_unset_inherit(apr_##name##_t *name) \ { \ - apr_##name##_inherit_unset(apr_##name##_t *name) \ + apr_##name##_inherit_unset(name); \ } #endif /* ! INHERIT_H */