Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 52769 invoked from network); 14 Oct 2007 20:45:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Oct 2007 20:45:10 -0000 Received: (qmail 55441 invoked by uid 500); 14 Oct 2007 20:44:57 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 55395 invoked by uid 500); 14 Oct 2007 20:44:56 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 55384 invoked by uid 99); 14 Oct 2007 20:44:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Oct 2007 13:44:56 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.202.165.39] (HELO smtpauth14.prod.mesa1.secureserver.net) (64.202.165.39) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 14 Oct 2007 20:44:59 +0000 Received: (qmail 12270 invoked from network); 14 Oct 2007 20:44:38 -0000 Received: from unknown (24.15.193.17) by smtpauth14.prod.mesa1.secureserver.net (64.202.165.39) with ESMTP; 14 Oct 2007 20:44:37 -0000 Message-ID: <47127FB5.40408@rowe-clan.net> Date: Sun, 14 Oct 2007 15:44:37 -0500 From: "William A. Rowe, Jr." User-Agent: Thunderbird 2.0.0.5 (X11/20070727) MIME-Version: 1.0 To: APR Developer List Subject: Simpler solution to moving apr_ino_t from apr_file_info.h to apr.h? Content-Type: multipart/mixed; boundary="------------060209000208060303040201" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------060209000208060303040201 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 #include 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 --------------060209000208060303040201 Content-Type: text/x-patch; name="ino_move.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ino_move.patch" Index: include/apr.h.in =================================================================== --- include/apr.h.in (revision 584469) +++ include/apr.h.in (working copy) @@ -273,6 +273,12 @@ typedef @off_t_value@ apr_off_t; typedef @socklen_t_value@ apr_socklen_t; +typedef @ino_t_value@ apr_ino_t; +/* Because users can't count on apr_ino_t here for the duration of 1.2.x, + * we'll #define it out, until they've included apr_file_info.h + */ +#define apr_ino_t apr_unknown_apr_ino_t__must_include_apr_file_io_h + #define APR_SIZEOF_VOIDP @voidp_size@ /* Are we big endian? */ Index: include/apr.hw =================================================================== --- include/apr.hw (revision 584469) +++ include/apr.hw (working copy) @@ -346,6 +346,12 @@ #endif typedef int apr_socklen_t; +typedef apr_uint64_t apr_ino_t; +/* Because users can't count on apr_ino_t here for the duration of 1.2.x, + * we'll #define it out, until they've included apr_file_info.h + */ +#define apr_ino_t apr_unknown_apr_ino_t__must_include_apr_file_io_h + /* Are we big endian? */ /* XXX: Fatal assumption on Alpha platforms */ #define APR_IS_BIGENDIAN 0 Index: include/apr.hnw =================================================================== --- include/apr.hnw (revision 584469) +++ include/apr.hnw (working copy) @@ -256,6 +256,12 @@ typedef size_t apr_socklen_t; #endif +typedef apr_uint64_t apr_ino_t; +/* Because users can't count on apr_ino_t here for the duration of 1.2.x, + * we'll #define it out, until they've included apr_file_info.h + */ +#define apr_ino_t apr_unknown_apr_ino_t__must_include_apr_file_io_h + /* Are we big endian? */ /* XXX: Fatal assumption on Alpha platforms */ #define APR_IS_BIGENDIAN 0 Index: include/apr_file_info.h =================================================================== --- include/apr_file_info.h (revision 584469) +++ include/apr_file_info.h (working copy) @@ -114,6 +114,8 @@ /** @} */ +/* For APR 1.2.x, re-expose apr_ino_t once we arrive here, see apr.h.in */ +#undef apr_ino_t /** * Structure for referencing directories. @@ -125,16 +127,10 @@ typedef apr_int32_t apr_fileperms_t; #if (defined WIN32) || (defined NETWARE) /** - * Structure for determining the inode of the file. - */ -typedef apr_uint64_t apr_ino_t; -/** * Structure for determining the device the file is on. */ typedef apr_uint32_t apr_dev_t; #else -/** The inode of the file. */ -typedef ino_t apr_ino_t; /** * Structure for determining the device the file is on. */ --------------060209000208060303040201--