apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucian Adrian Grijincu" <lucian.griji...@gmail.com>
Subject Re: Simpler solution to moving apr_ino_t from apr_file_info.h to apr.h?
Date Sun, 14 Oct 2007 23:34:46 GMT
On 10/14/07, William A. Rowe, Jr. <wrowe@rowe-clan.net> wrote:
> Attached patch avoids the only remaining argument to moving the typedef
> over to apr.h, that a developer would trip over a module authored to apr 1.2.12
> and discover it won't compile on apr 1.2.0.
>
> Of course apr_* is our namespace, so a developer using such symbols is already
> rolling the dice.
>
> Example patch attached.
>
> Simple test case;
>
> #include <apr.h>
> #include <apr_general.h>
>
> int main(int argc, const char * const * argv, const char * const *env)
> {
>      apr_ino_t dont_do_this;
> }
>
> Results in
>
> /bin/sh /local0/asf/build/apr-1.2/libtool --silent --mode=compile gcc -g -O2 -pthread
  -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT
> -D_GNU_SOURCE -D_LARGEFILE64_SOURCE   -I../include -I./../include  -o testapp.lo -c testapp.c
&& touch testapp.lo
> testapp.c: In function 'main':
> testapp.c:6: error: 'apr_unknown_apr_ino_t__must_include_apr_file_io_h' undeclared (first
use in this function)
> testapp.c:6: error: (Each undeclared identifier is reported only once
> testapp.c:6: error: for each function it appears in.)
> testapp.c:6: error: expected ';' before 'dont_do_this'
>
>
> I really think that would be sufficient to enforce our versioning policy, no?
>
> Bill
>
>

The biggest advantage your method (quite an impressive one, nicely
done!) has is that it can place apr_ino_t in a more proper place, not
at the end of the apr.h header as mine did. I'm all in for this patch.

--
Lucian.

Mime
View raw message