It solves our problem for today. +1.
----- Original Message -----
From: "Brian Havard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 25, 2001 11:13 AM
Subject: Re: make_exports.awk vs APR_DECLARE_* macros
> On Wed, 25 Jul 2001 08:36:56 -0700, Ryan Bloom wrote:
>
> >On Tuesday 24 July 2001 22:45, William A. Rowe, Jr. wrote:
> >> Good point. And folks, this is a 2.0.22-dev showstopper :(
> >>
> >> Ryan, you invented both constructs. Thoughts?
> >
> >First, apr_file_set_inherit isn't in the exports file, because we explicitly don't
>put it there.
> >The problem is that the function only exists when a macro is evaluated, so if we
>use the
> >awk script, then we try to create a line like:
> >
> >void *ap_hack_apr_set_##type##_inherit = apr_set_##name##_inherit
> >
> >This is obviosly wrong. No amount of mucking with APR_DECLARE_* will resolve this.
> >
> >I guess I am having a hard time seeing any way to resolve this problem.
>
> I worked around it with the change in the patch below. There are others, of
> course, but this gets all current modules building again. The other option
> is to have make_exports.awk know how to do the same transform but to do
> that it would require full knowledge of ALL such macros.
>
> Maybe we could pass the .h files through the CPP before feeding them to
> make_exports.awk? Probably not practical but might be worth a try.
>
>
> Index: apr_file_io.h
> ===================================================================
> RCS file: /usr/local/cvs/apr/include/apr_file_io.h,v
> retrieving revision 1.105
> diff -u -r1.105 apr_file_io.h
> --- apr_file_io.h 2001/07/18 19:12:41 1.105
> +++ apr_file_io.h 2001/07/25 16:01:34
> @@ -575,14 +576,14 @@
> * @param file The file to enable inheritance.
> * @deffunc void apr_file_set_inherit(apr_file_t *file)
> */
> -APR_DECLARE_SET_INHERIT(file);
> +APR_DECLARE(void) apr_file_set_inherit(apr_file_t *file);
>
> /**
> * Unset a file from being inherited by child processes.
> * @param file The file to disable inheritance.
> * @deffunc void apr_file_unset_inherit(apr_file_t *file)
> */
> -APR_DECLARE_UNSET_INHERIT(file);
> +APR_DECLARE(void) apr_file_unset_inherit(apr_file_t *file);
>
> #ifdef __cplusplus
> }
>
>
> >> ----- Original Message -----
> >> From: "Brian Havard" <[EMAIL PROTECTED]>
> >> To: "Apache Developers Mailing List" <[EMAIL PROTECTED]>
> >> Sent: Tuesday, July 24, 2001 9:43 PM
> >> Subject: make_exports.awk vs APR_DECLARE_* macros
> >>
> >> > A problem I have with the current code is that apr_file_set_inherit()
> >> > isn't included in the exports list because its declaration isn't of the
> >> > usual form. We need to either make make_exports.awk aware of the various
> >> > APR_DECLARE_* macros or ditch them altogether & declare them normally. I
> >> > vote the latter, we write the standard form in the comment above it
> >> > anyway...
>
> --
> ______________________________________________________________________________
> | Brian Havard | "He is not the messiah! |
> | [EMAIL PROTECTED] | He's a very naughty boy!" - Life of Brian |
> ------------------------------------------------------------------------------
>
>