apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Simpler solution to moving apr_ino_t from apr_file_info.h to apr.h?
Date Sun, 14 Oct 2007 20:44:37 GMT
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

Mime
View raw message