wrowe 01/07/16 13:49:57
Modified: file_io/unix open.c
include apr_inherit.h
network_io/unix sockets.c
Added: include/arch/unix inherit.h
Log:
Split public from private declaration for INHERIT stuff
Revision Changes Path
1.79 +1 -0 apr/file_io/unix/open.c
Index: open.c
===================================================================
RCS file: /home/cvs/apr/file_io/unix/open.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- open.c 2001/07/16 20:44:16 1.78
+++ open.c 2001/07/16 20:49:56 1.79
@@ -55,6 +55,7 @@
#include "fileio.h"
#include "apr_strings.h"
#include "apr_portable.h"
+#include "inherit.h"
apr_status_t apr_unix_file_cleanup(void *thefile)
{
1.5 +0 -20 apr/include/apr_inherit.h
Index: apr_inherit.h
===================================================================
RCS file: /home/cvs/apr/include/apr_inherit.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- apr_inherit.h 2001/07/16 20:36:57 1.4
+++ apr_inherit.h 2001/07/16 20:49:56 1.5
@@ -65,28 +65,8 @@
#define APR_DECLARE_SET_INHERIT(name) \
void apr_##name##_set_inherit(apr_##name##_t *name)
-#define APR_IMPLEMENT_SET_INHERIT(name, flag, pool, cleanup) \
-void apr_##name##_set_inherit(apr_##name##_t *name) \
-{ \
- if (!(name->flag & APR_INHERIT)) { \
- name->flag |= APR_INHERIT; \
- apr_pool_cleanup_register(name->pool, (void *)name, \
- NULL, cleanup); \
- } \
-}
-
#define APR_DECLARE_UNSET_INHERIT(name) \
void apr_##name##_unset_inherit(apr_##name##_t *name)
-
-#define APR_IMPLEMENT_UNSET_INHERIT(name, flag, pool, cleanup) \
-void apr_##name##_unset_inherit(apr_##name##_t *name) \
-{ \
- if (name->flag & APR_INHERIT) { \
- name->flag &= ~APR_INHERIT; \
- apr_pool_cleanup_kill(name->pool, (void *)name, \
- NULL, cleanup); \
- } \
-}
#ifdef __cplusplus
}
1.1 apr/include/arch/unix/inherit.h
Index: inherit.h
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
#ifndef INHERIT_H
#define INHERIT_H
#include "apr_inherit.h"
#define APR_IMPLEMENT_SET_INHERIT(name, flag, pool, cleanup) \
void apr_##name##_set_inherit(apr_##name##_t *name) \
{ \
if (!(name->flag & APR_INHERIT)) { \
name->flag |= APR_INHERIT; \
apr_pool_cleanup_register(name->pool, (void *)name, \
NULL, cleanup); \
} \
}
#define APR_IMPLEMENT_UNSET_INHERIT(name, flag, pool, cleanup) \
void apr_##name##_unset_inherit(apr_##name##_t *name) \
{ \
if (name->flag & APR_INHERIT) { \
name->flag &= ~APR_INHERIT; \
apr_pool_cleanup_kill(name->pool, (void *)name, \
NULL, cleanup); \
} \
}
#endif /* ! INHERIT_H */
1.81 +1 -1 apr/network_io/unix/sockets.c
Index: sockets.c
===================================================================
RCS file: /home/cvs/apr/network_io/unix/sockets.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- sockets.c 2001/07/16 20:36:59 1.80
+++ sockets.c 2001/07/16 20:49:57 1.81
@@ -55,7 +55,7 @@
#include "networkio.h"
#include "apr_network_io.h"
#include "apr_portable.h"
-#include "apr_inherit.h"
+#include "inherit.h"
static apr_status_t socket_cleanup(void *sock)
{