Re: [xml] libxml2.xmlIO.awn.1.patch



> 2006-09-06 Andrew W. Nosenko <andrew w nosenko gmail com <mailto:andrew w nosenko gmail com>>
> [...]
> Some words about removed '#define stat _stat':
> 1. this define is just wrong because replaces declarations like
>     struct stat stat_buff;
> by
>     struct _stat stat_buff;
> and we have either compilation error (if no 'struct _stat' exists) or
> unpredictable behavior because of no guarantee that these two
> structures are compatible.
>
As a matter of fact, complete replacement of 'stat' on '_stat' was
proposed, both for function and for structure.
I assumed, that 'struct _stat' is always used as argument
for _stat(). At least, in tested libraries it just so.
Can you tell, where were problems with compilation?

The replacement was convenient, because there is no
variant of _wstat(), using 'struct stat' as argument.

Without macro 'stat' it should to add more #ifdef / #else.

> 2. existence of the non-standard function _stat() is not a reason for
> replacing by it the standard function stat() that exists also
> (please, pay attention that this is '#else' part of the
>  '#ifndef HAVE_STAT' condition).
>
If they are equivalent, why not?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]