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 Re: svn commit: r411890 - /apr/apr-util/trunk/include/apr_ldap_init.h
Date Mon, 05 Jun 2006 22:21:47 GMT
Roy T. Fielding wrote:
> On Jun 5, 2006, at 11:54 AM, bnicholes@apache.org wrote:
> 
>> +/**
>> + * Macro to detect security related return values.
>> + */
>> +#if defined(LDAP_INSUFFICIENT_ACCESS)
>> +#define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_ACCESS
>> +#elif defined(LDAP_INSUFFICIENT_RIGHTS)
>> +#define APU_LDAP_INSUFFICIENT_ACCESS LDAP_INSUFFICIENT_RIGHTS
>> +#endif
> 
> Shouldn't that end with
> 
>   #else
>   #define APU_LDAP_INSUFFICIENT_ACCESS (some reasonable default)
>   #endif
> 
> It seems odd just to leave it undefined.

Actually, aren't we leaving out the possiblity that both symbols exist
with slightly different meanings?

#if defined(LDAP_INSUFFICIENT_RIGHTS) and defined(LDAP_INSUFFICIENT_RIGHTS)
#define APU_LDAP_INSUFFICIENT_ACCESS(rc) ((rc == LDAP_INSUFFICIENT_ACCESS) \
                                        || (rc == LDAP_INSUFFICIENT_RIGHTS)


We made these mistakes before in httpd which is why apr_errno.h is now
the way it is.

Bill

Mime
View raw message