Sorry if this is feeling like fetch me a rock, I was offering suggestions.
-1 to the code committed this week if there is no APR_NOTBUFFERED flag
to apr_sdbm_open(), period.
So, how to infer APR_BUFFERED? Since apr_dbm_open doesn't pass APR_SHARELOCK
it can safely pass APR_BUFFERED from its sdbm open delegate function.
Otherwise, for callers of apr_sdbm_open, honor APR_BUFFERED and let's
just update apr_sdbm_open.
Justin Erenkrantz wrote:
> On 2/28/07, William A. Rowe, Jr. <[EMAIL PROTECTED]> wrote:
>> Sounds great. Let's move this hack to apr_dbm_open's delegate for
>> apr_sdbm_open, and simply ensure apr_sdbm_open honors the APR_BUFFERED
>> flag.
>>
>> If this is moved to apr_dbm_, and this flag true for any SDBM that isn't
>> APR_SHARELOCK'ed, then you'll turn my -.99 to a +1.
>
> Is below acceptable to you? I'm getting tired of playing fetch me a
> rock here.... -- justin
>
> Index: dbm/sdbm/sdbm.c
> ===================================================================
> --- dbm/sdbm/sdbm.c (revision 513019)
> +++ dbm/sdbm/sdbm.c (working copy)
> @@ -103,7 +103,6 @@
> */
> if (!(flags & APR_WRITE)) {
> db->flags |= SDBM_RDONLY;
> - flags |= APR_BUFFERED;
> }
>
> /*
> Index: dbm/apr_dbm_sdbm.c
> ===================================================================
> --- dbm/apr_dbm_sdbm.c (revision 513019)
> +++ dbm/apr_dbm_sdbm.c (working copy)
> @@ -54,7 +54,7 @@
> #define APR_DBM_NEXTKEY(f, k, nk) apr_sdbm_nextkey(f, &(nk))
> #define APR_DBM_FREEDPTR(dptr) NOOP_FUNCTION
> -#define APR_DBM_DBMODE_RO APR_READ
> +#define APR_DBM_DBMODE_RO (APR_READ | APR_BUFFERED)
> #define APR_DBM_DBMODE_RW (APR_READ | APR_WRITE)
> #define APR_DBM_DBMODE_RWCREATE (APR_READ | APR_WRITE | APR_CREATE)
> #define APR_DBM_DBMODE_RWTRUNC (APR_READ | APR_WRITE | APR_CREATE | \
>
>