wrowe 01/07/18 12:32:29
Modified: file_io/os2 filedup.c
file_io/win32 filedup.c
include apr_inherit.h
include/arch/unix inherit.h
Log:
Clean up APR_INHERIT - it's now a private flag.
Revision Changes Path
1.22 +2 -1 apr/file_io/os2/filedup.c
Index: filedup.c
===================================================================
RCS file: /home/cvs/apr/file_io/os2/filedup.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- filedup.c 2001/02/16 04:15:35 1.21
+++ filedup.c 2001/07/18 19:32:29 1.22
@@ -57,6 +57,7 @@
#include "apr_lib.h"
#include "apr_strings.h"
#include <string.h>
+#include "inherit.h"
apr_status_t apr_file_dup(apr_file_t **new_file, apr_file_t *old_file,
apr_pool_t *p)
{
@@ -85,7 +86,7 @@
dup_file->fname = apr_pstrdup(dup_file->cntxt, old_file->fname);
dup_file->buffered = old_file->buffered;
dup_file->isopen = old_file->isopen;
- dup_file->flags = old_file->flags;
+ dup_file->flags = old_file->flags & ~APR_INHERIT;
/* TODO - dup pipes correctly */
dup_file->pipe = old_file->pipe;
1.34 +4 -1 apr/file_io/win32/filedup.c
Index: filedup.c
===================================================================
RCS file: /home/cvs/apr/file_io/win32/filedup.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- filedup.c 2001/07/16 20:46:23 1.33
+++ filedup.c 2001/07/18 19:32:29 1.34
@@ -57,6 +57,7 @@
#include "apr_general.h"
#include "apr_strings.h"
#include <string.h>
+#include "inherit.h"
APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file,
apr_file_t *old_file, apr_pool_t *p)
@@ -81,6 +82,8 @@
}
} else {
HANDLE hFile = (*new_file)->filehand;
+ /* XXX: need to dup the handle!!!
+ */
/* dup2 is not supported with native Windows handles. We
* can, however, emulate dup2 for the standard i/o handles.
*/
@@ -103,7 +106,7 @@
return APR_ENOTIMPL;
}
- (*new_file)->flags = old_file->flags;
+ (*new_file)->flags = old_file->flags & ~APR_INHERIT;
(*new_file)->cntxt = old_file->cntxt;
(*new_file)->fname = apr_pstrdup(old_file->cntxt, old_file->fname);
(*new_file)->append = old_file->append;
1.7 +0 -2 apr/include/apr_inherit.h
Index: apr_inherit.h
===================================================================
RCS file: /home/cvs/apr/include/apr_inherit.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- apr_inherit.h 2001/07/18 17:23:38 1.6
+++ apr_inherit.h 2001/07/18 19:32:29 1.7
@@ -59,8 +59,6 @@
extern "C" {
#endif /* __cplusplus */
-#define APR_INHERIT (2^24) /* Outside of conflicts with other bits */
-
#define APR_DECLARE_SET_INHERIT(name) \
APR_DECLARE(void) apr_##name##_set_inherit(apr_##name##_t *name)
1.3 +2 -0 apr/include/arch/unix/inherit.h
Index: inherit.h
===================================================================
RCS file: /home/cvs/apr/include/arch/unix/inherit.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- inherit.h 2001/07/16 23:35:14 1.2
+++ inherit.h 2001/07/18 19:32:29 1.3
@@ -57,6 +57,8 @@
#include "apr_inherit.h"
+#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) \
{ \