Return-Path: Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 38631 invoked by uid 1092); 1 Dec 2000 06:37:46 -0000 Date: 1 Dec 2000 06:37:46 -0000 Message-ID: <20001201063746.38630.qmail@locus.apache.org> From: rbb@locus.apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/include apr_file_io.h apr_xlate.h rbb 00/11/30 22:37:46 Modified: include apr_file_io.h apr_xlate.h Log: This is basically a small header re-org, it doesn't really change anything, just how we report it. There are two classes of changes, both of which are required by the script that generates the export list. 1) Always specify what we have instead of what we don't have. This just means that I changed a #if !APR_HAS_XLATE to #if APR_HAS_XLATE It is easier for the exports script if all of APR is specified the same way. 2) Wrap functions that aren't actually defined with APR_NOT_DONE_YET. This class of changes comes about because we have some functions that have prototypes in the headers, but no implementation. I just put #if APR_NOT_DONE_YET and #endif around those prototypes so that our exports script doesn't try to link against them. There is a comment explaining this in the code, and this can be removed once the functions actually exist. Revision Changes Path 1.77 +8 -1 apr/include/apr_file_io.h Index: apr_file_io.h =================================================================== RCS file: /home/cvs/apr/include/apr_file_io.h,v retrieving revision 1.76 retrieving revision 1.77 diff -u -r1.76 -r1.77 --- apr_file_io.h 2000/11/29 07:37:41 1.76 +++ apr_file_io.h 2000/12/01 06:37:45 1.77 @@ -246,7 +246,13 @@ * @param child_name May be absolute, in which case trusted_name is ignored * unless APR_CHILD_RELATIVE is tested. */ - +/* This is a hack, because none of these functions actually exist yet. The + * problem is that we generate our exports from the header files, so we are + * trying to export these functions, but they don't exist, so we can't link. + * This just makes sure that we don't try to link these functions until + * they actually exist. + */ +#ifdef APR_NOT_DONE_YET apr_status_t apr_make_canonical_name(apr_canon_t **new_name, const apr_canon_t *trusted_name, const char *child_name, @@ -292,6 +298,7 @@ * isn't an adaquately complete root for UNC paths. */ apr_status_t apr_is_virtualroot(apr_canon_t **path, int elements); +#endif /** * Open the specified file. 1.9 +29 -27 apr/include/apr_xlate.h Index: apr_xlate.h =================================================================== RCS file: /home/cvs/apr/include/apr_xlate.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- apr_xlate.h 2000/11/26 03:00:05 1.8 +++ apr_xlate.h 2000/12/01 06:37:45 1.9 @@ -74,33 +74,7 @@ * APR_ENOTIMPL at run-time. */ -#if ! APR_HAS_XLATE - -typedef void apr_xlate_t; - -/* For platforms where we don't bother with translating between charsets, - * these are macros which always return failure. - */ - -#define apr_xlate_open(convset, topage, frompage, pool) APR_ENOTIMPL - -#define apr_xlate_get_sb(convset, onoff) APR_ENOTIMPL - -#define apr_xlate_conv_buffer(convset, inbuf, inbytes_left, outbuf, \ - outbytes_left) APR_ENOTIMPL - -#define apr_xlate_conv_byte(convset, inchar) (-1) - -/* The purpose of apr_xlate_conv_char is to translate one character - * at a time. This needs to be written carefully so that it works - * with double-byte character sets. - */ -#define apr_xlate_conv_char(convset, inchar, outchar) APR_ENOTIMPL - -#define apr_xlate_close(convset) APR_ENOTIMPL - -#else /* ! APR_HAS_XLATE */ - +#if APR_HAS_XLATE typedef struct apr_xlate_t apr_xlate_t; /** @@ -154,6 +128,8 @@ apr_size_t *inbytes_left, char *outbuf, apr_size_t *outbytes_left); +/* See the comment in apr_file_io.h about this hack */ +#ifdef APR_NOT_DONE_YET /** * The purpose of apr_xlate_conv_char is to translate one character * at a time. This needs to be written carefully so that it works @@ -164,6 +140,7 @@ * @param outchar The converted character */ apr_status_t apr_xlate_conv_char(apr_xlate_t *convset, char inchar, char outchar); +#endif /** * Convert a single-byte character from one charset to another. @@ -180,6 +157,31 @@ * @param convset The codepage translation handle to close */ apr_status_t apr_xlate_close(apr_xlate_t *convset); + +#else + +typedef void apr_xlate_t; + +/* For platforms where we don't bother with translating between charsets, + * these are macros which always return failure. + */ + +#define apr_xlate_open(convset, topage, frompage, pool) APR_ENOTIMPL + +#define apr_xlate_get_sb(convset, onoff) APR_ENOTIMPL + +#define apr_xlate_conv_buffer(convset, inbuf, inbytes_left, outbuf, \ + outbytes_left) APR_ENOTIMPL + +#define apr_xlate_conv_byte(convset, inchar) (-1) + +/* The purpose of apr_xlate_conv_char is to translate one character + * at a time. This needs to be written carefully so that it works + * with double-byte character sets. + */ +#define apr_xlate_conv_char(convset, inchar, outchar) APR_ENOTIMPL + +#define apr_xlate_close(convset) APR_ENOTIMPL #endif /* ! APR_HAS_XLATE */