On 17.09.2009 08:10, William A. Rowe, Jr. wrote:
> [email protected] wrote:
>> Author: rjung
>> Date: Thu Sep 17 05:45:18 2009
>> New Revision: 816061
>>
>> URL: http://svn.apache.org/viewvc?rev=816061&view=rev
>> Log:
>> Fix
>> - implicit declaration of function 'fchmod'
>> - 'S_I[RWX](USR|GRP|OTH)' undeclared
> 
> Good catch, but...
> 
>> +#ifdef HAVE_FCHMOD
>> +#ifdef HAVE_SYS_STAT_H
>> +#include <sys/stat.h>
>> +#endif
>> +#endif
> 
> Grrr... this should *never* occur.  The HAVE_tests should not be
> layered.  What is your question here?  (And this goes for your
> commit to ftp_util.c as well.)  Is it FCHMOD or STAT_H?  Is it WIN32
> or STAT_H?

In case you are using fchmod() and we do have sys/stat.h we should
include it (ftp_commands.c). For ftp_util.c again I need sys/stat.h on
Solaris, but the symbols we need to define (S_IRUSR etc.) are only used
in the file, if we are not on WIN32. So for WIN32 we don't need to
include the file.

> Including a system header should be harmless, so you should be
> dropping the overarching conditions.

So what do you suggest? Simply dropping one of the ifdef?
Is there any direct relation between HAVE_FCHMOD and HAVE_SYS_STAT_H?
The same for !WIN32 and HAVE_SYS_STAT_H?

Regards,

Rainer

Reply via email to