You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-dev@httpd.apache.org by Randy Kobes <ra...@theoryx5.uwinnipeg.ca> on 2004/06/05 19:34:52 UTC

[apreq-2] APREQ_DECLARE_PARSER on Win32

Win32 gets confused with the APREQ_DECLARE_PARSER(f) define
in src/apreq_params.h - I think this is related to __stdcall
appearing in

#define APREQ_DECLARE(d) __declspec(dllexport) d __stdcall

of src/apreq.h. If one uses
===========================================================
Index: src/apreq_params.h
===================================================================
RCS file: /home/cvs/httpd-apreq-2/src/apreq_params.h,v
retrieving revision 1.28
diff -u -r1.28 apreq_params.h
--- src/apreq_params.h	4 Jun 2004 22:02:11 -0000	1.28
+++ src/apreq_params.h	5 Jun 2004 17:28:49 -0000
@@ -232,14 +232,24 @@
 /**
  * Declares a API parser.
  */
+#ifndef WIN32
 #define APREQ_DECLARE_PARSER(f) APREQ_DECLARE(apr_status_t) \
                                 (f) APREQ_PARSER_ARGS
+#else
+#define APREQ_DECLARE_PARSER(f) APREQ_DECLARE_NONSTD(apr_status_t) \
+                                (f) APREQ_PARSER_ARGS
+#endif

 /**
  * Declares an API hook.
  */
+#ifndef WIN32
 #define APREQ_DECLARE_HOOK(f)   APREQ_DECLARE(apr_status_t) \
                                 (f) APREQ_HOOK_ARGS
+#else
+#define APREQ_DECLARE_HOOK(f)   APREQ_DECLARE_NONSTD(apr_status_t) \
+                                (f) APREQ_HOOK_ARGS
+#endif

 /**
  * Singly linked list of hooks.
======================================================================
so as to use APREQ_DECLARE_NONSTD:

#define APREQ_DECLARE(d) __declspec(dllexport) d

(ie, APREQ_DECLARE without __stdcall) then things build OK
and all tests pass.

-- 
best regards,
randy

Re: [apreq-2] APREQ_DECLARE_PARSER on Win32

Posted by Joe Schaefer <jo...@sunstarsys.com>.
Randy Kobes <ra...@theoryx5.uwinnipeg.ca> writes:

[...]

> If one uses
> ===========================================================
> Index: src/apreq_params.h
> ===================================================================
> RCS file: /home/cvs/httpd-apreq-2/src/apreq_params.h,v
> retrieving revision 1.28
> diff -u -r1.28 apreq_params.h
> --- src/apreq_params.h	4 Jun 2004 22:02:11 -0000	1.28
> +++ src/apreq_params.h	5 Jun 2004 17:28:49 -0000
> @@ -232,14 +232,24 @@
>  /**
>   * Declares a API parser.
>   */
> +#ifndef WIN32
>  #define APREQ_DECLARE_PARSER(f) APREQ_DECLARE(apr_status_t) \
>                                  (f) APREQ_PARSER_ARGS
> +#else
> +#define APREQ_DECLARE_PARSER(f) APREQ_DECLARE_NONSTD(apr_status_t) \
> +                                (f) APREQ_PARSER_ARGS
> +#endif
> 
>  /**
>   * Declares an API hook.
>   */
> +#ifndef WIN32
>  #define APREQ_DECLARE_HOOK(f)   APREQ_DECLARE(apr_status_t) \
>                                  (f) APREQ_HOOK_ARGS
> +#else
> +#define APREQ_DECLARE_HOOK(f)   APREQ_DECLARE_NONSTD(apr_status_t) \
> +                                (f) APREQ_HOOK_ARGS
> +#endif
> 
>  /**
>   * Singly linked list of hooks.
> ======================================================================

[...]

> (ie, APREQ_DECLARE without __stdcall) then things build OK
> and all tests pass.

+1 - please apply.

-- 
Joe Schaefer