wrowe 01/04/05 02:08:48
Modified: . CHANGES
include apr_optional.h
hooks apr_hooks.c
Log:
Fix the win32 GP fault from the 2.0.16 release candidate. Hook calling
convention was ignored due to the casts in apr_optional.h.
Revision Changes Path
1.6 +3 -0 apr-util/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/apr-util/CHANGES,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CHANGES 2001/04/03 00:23:20 1.5
+++ CHANGES 2001/04/05 09:08:48 1.6
@@ -1,5 +1,8 @@
Changes with APR-util b1
+ *) Repair calling convention for apr_register_optional_fn to
+ eliminate GP fault on Win32. [William Rowe]
+
*) Substantial changes to correct linkage and declarations for
generic hooks on dso architectures. [Ben Laurie, Will Rowe]
1.6 +7 -3 apr-util/include/apr_optional.h
Index: apr_optional.h
===================================================================
RCS file: /home/cvs/apr-util/include/apr_optional.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- apr_optional.h 2001/04/03 00:22:08 1.5
+++ apr_optional.h 2001/04/05 09:08:48 1.6
@@ -69,6 +69,7 @@
/**
* The type of an optional function.
* @param name The name of the function
+ * @deffunc APR_OPTIONAL_FN_TYPE(name)
*/
#define APR_OPTIONAL_FN_TYPE(name) apr_OFN_##name##_t
@@ -79,7 +80,7 @@
* @param args The function arguments (including brackets)
*/
#define APR_DECLARE_OPTIONAL_FN(ret,name,args) \
-typedef ret APR_OPTIONAL_FN_TYPE(name) args
+typedef ret (APR_OPTIONAL_FN_TYPE(name)) args
/* XXX: This doesn't belong here, then!
* Private function! DO NOT USE!
@@ -87,7 +88,8 @@
typedef void (apr_opt_fn_t)(void);
-APU_DECLARE(void) apr_register_optional_fn(const char *szName, apr_opt_fn_t
*pfn);
+APU_DECLARE_NONSTD(void) apr_register_optional_fn(const char *szName,
+ apr_opt_fn_t *pfn);
/**
@@ -95,9 +97,11 @@
* name. Like all global functions, the name must be unique. Note that,
* confusingly but correctly, the function itself can be static!
* @param name The name of the function
+ * @deffunc void APR_REGISTER_OPTIONAL_FN(name)
*/
#define APR_REGISTER_OPTIONAL_FN(name) \
- ((void (*)(const char *,APR_OPTIONAL_FN_TYPE(name)
*))&apr_register_optional_fn)(#name,name)
+ (((void (*)(const char *, APR_OPTIONAL_FN_TYPE(name) *)) \
+ &apr_register_optional_fn)(#name,name))
/* Private function! DO NOT USE! */
APU_DECLARE(apr_opt_fn_t *) apr_retrieve_optional_fn(const char *szName);
1.39 +2 -2 apr-util/hooks/apr_hooks.c
Index: apr_hooks.c
===================================================================
RCS file: /home/cvs/apr-util/hooks/apr_hooks.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- apr_hooks.c 2001/04/03 00:22:11 1.38
+++ apr_hooks.c 2001/04/05 09:08:48 1.39
@@ -339,8 +339,8 @@
return
(void(*)(void))apr_hash_get(s_phOptionalFunctions,szName,strlen(szName));
}
-APU_DECLARE(void) apr_register_optional_fn(const char *szName,
- apr_opt_fn_t *pfn)
+APU_DECLARE_NONSTD(void) apr_register_optional_fn(const char *szName,
+ apr_opt_fn_t *pfn)
{
if(!s_phOptionalFunctions)
s_phOptionalFunctions=apr_hash_make(apr_global_hook_pool);