diff options
-rw-r--r-- | include/apr_inherit.h | 6 | ||||
-rw-r--r-- | include/arch/unix/inherit.h | 26 | ||||
-rw-r--r-- | include/arch/win32/inherit.h | 28 |
3 files changed, 32 insertions, 28 deletions
diff --git a/include/apr_inherit.h b/include/apr_inherit.h index 1865a65f7..d8e77ad04 100644 --- a/include/apr_inherit.h +++ b/include/apr_inherit.h @@ -75,13 +75,15 @@ extern "C" { * @param name Set Inheritance for this Socket/File Handle */ #define APR_DECLARE_INHERIT_SET(name) \ - APR_DECLARE(apr_status_t) apr_##name##_inherit_set(apr_##name##_t *name) + APR_DECLARE(apr_status_t) apr_##name##_inherit_set( \ + apr_##name##_t *the##name) /** * @param name Unset Inheritance for this Socket/File Handle */ #define APR_DECLARE_INHERIT_UNSET(name) \ - APR_DECLARE(apr_status_t) apr_##name##_inherit_unset(apr_##name##_t *name) + APR_DECLARE(apr_status_t) apr_##name##_inherit_unset( \ + apr_##name##_t *the##name) #ifdef __cplusplus } diff --git a/include/arch/unix/inherit.h b/include/arch/unix/inherit.h index 3ec4e370c..acf5f8c58 100644 --- a/include/arch/unix/inherit.h +++ b/include/arch/unix/inherit.h @@ -60,35 +60,37 @@ #define APR_INHERIT (1 << 24) /* Must not conflict with other bits */ #define APR_IMPLEMENT_INHERIT_SET(name, flag, pool, cleanup) \ -apr_status_t apr_##name##_inherit_set(apr_##name##_t *name) \ +apr_status_t apr_##name##_inherit_set(apr_##name##_t *the##name) \ { \ - if (!(name->flag & APR_INHERIT)) { \ - name->flag |= APR_INHERIT; \ - apr_pool_child_cleanup_set(name->pool, (void *)name, \ + if (!(the##name->flag & APR_INHERIT)) { \ + the##name->flag |= APR_INHERIT; \ + apr_pool_child_cleanup_set(the##name->pool, \ + (void *)the##name, \ cleanup, apr_pool_cleanup_null); \ } \ return APR_SUCCESS; \ } \ /* Deprecated */ \ -void apr_##name##_set_inherit(apr_##name##_t *name) \ +void apr_##name##_set_inherit(apr_##name##_t *the##name) \ { \ - apr_##name##_inherit_set(name); \ + apr_##name##_inherit_set(the##name); \ } #define APR_IMPLEMENT_INHERIT_UNSET(name, flag, pool, cleanup) \ -apr_status_t apr_##name##_inherit_unset(apr_##name##_t *name) \ +apr_status_t apr_##name##_inherit_unset(apr_##name##_t *the##name) \ { \ - if (name->flag & APR_INHERIT) { \ - name->flag &= ~APR_INHERIT; \ - apr_pool_child_cleanup_set(name->pool, (void *)name, \ + if (the##name->flag & APR_INHERIT) { \ + the##name->flag &= ~APR_INHERIT; \ + apr_pool_child_cleanup_set(the##name->pool, \ + (void *)the##name, \ cleanup, cleanup); \ } \ return APR_SUCCESS; \ } \ /* Deprecated */ \ -void apr_##name##_unset_inherit(apr_##name##_t *name) \ +void apr_##name##_unset_inherit(apr_##name##_t *the##name) \ { \ - apr_##name##_inherit_unset(name); \ + apr_##name##_inherit_unset(the##name); \ } #endif /* ! INHERIT_H */ diff --git a/include/arch/win32/inherit.h b/include/arch/win32/inherit.h index 32ec740c4..83744c1e3 100644 --- a/include/arch/win32/inherit.h +++ b/include/arch/win32/inherit.h @@ -60,11 +60,11 @@ #define APR_INHERIT (1 << 24) /* Must not conflict with other bits */ #define APR_IMPLEMENT_INHERIT_SET(name, flag, pool, cleanup) \ -APR_DECLARE(apr_status_t) apr_##name##_inherit_set(apr_##name##_t *name) \ +APR_DECLARE(apr_status_t) apr_##name##_inherit_set(apr_##name##_t *the##name) \ { \ IF_WIN_OS_IS_UNICODE \ { \ - if (!SetHandleInformation(name->filehand, \ + if (!SetHandleInformation(the##name->filehand, \ HANDLE_FLAG_INHERIT, \ HANDLE_FLAG_INHERIT)) \ return apr_get_os_error(); \ @@ -72,46 +72,46 @@ APR_DECLARE(apr_status_t) apr_##name##_inherit_set(apr_##name##_t *name) \ ELSE_WIN_OS_IS_ANSI \ { \ HANDLE temp, hproc = GetCurrentProcess(); \ - if (!DuplicateHandle(hproc, name->filehand, \ + if (!DuplicateHandle(hproc, the##name->filehand, \ hproc, &temp, 0, TRUE, \ DUPLICATE_SAME_ACCESS)) \ return apr_get_os_error(); \ - CloseHandle(name->filehand); \ - name->filehand = temp; \ + CloseHandle(the##name->filehand); \ + the##name->filehand = temp; \ } \ return APR_SUCCESS; \ } \ /* Deprecated */ \ -APR_DECLARE(void) apr_##name##_set_inherit(apr_##name##_t *name) \ +APR_DECLARE(void) apr_##name##_set_inherit(apr_##name##_t *the##name) \ { \ - apr_##name##_inherit_set(name); \ + apr_##name##_inherit_set(the##name); \ } #define APR_IMPLEMENT_INHERIT_UNSET(name, flag, pool, cleanup) \ -APR_DECLARE(apr_status_t) apr_##name##_inherit_unset(apr_##name##_t *name) \ +APR_DECLARE(apr_status_t) apr_##name##_inherit_unset(apr_##name##_t *the##name)\ { \ IF_WIN_OS_IS_UNICODE \ { \ - if (!SetHandleInformation(name->filehand, \ + if (!SetHandleInformation(the##name->filehand, \ HANDLE_FLAG_INHERIT, 0)) \ return apr_get_os_error(); \ } \ ELSE_WIN_OS_IS_ANSI \ { \ HANDLE temp, hproc = GetCurrentProcess(); \ - if (!DuplicateHandle(hproc, name->filehand, \ + if (!DuplicateHandle(hproc, the##name->filehand, \ hproc, &temp, 0, FALSE, \ DUPLICATE_SAME_ACCESS)) \ return apr_get_os_error(); \ - CloseHandle(name->filehand); \ - name->filehand = temp; \ + CloseHandle(the##name->filehand); \ + the##name->filehand = temp; \ } \ return APR_SUCCESS; \ } \ /* Deprecated */ \ -APR_DECLARE(void) apr_##name##_unset_inherit(apr_##name##_t *name) \ +APR_DECLARE(void) apr_##name##_unset_inherit(apr_##name##_t *the##name) \ { \ - apr_##name##_inherit_unset(name); \ + apr_##name##_inherit_unset(the##name); \ } #endif /* ! INHERIT_H */ |