[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: windows build failure
From: |
Paul Eggert |
Subject: |
Re: windows build failure |
Date: |
Tue, 22 Feb 2011 01:40:24 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 |
On 02/22/2011 12:57 AM, Eli Zaretskii wrote:
> the artificial definition to zero in sys_stat.in.h
> is only fine if one ignores the de-facto practice of testing for
> S_IFLNK or S_ISLNK to guard code elsewhere that cannot be compiled or
> run on platforms without symlinks
No, the idea is that normal code should not use #ifdef S_IFLNK.
It should instead use "if (S_ISLNK (...)) ...".
On hosts that don't have symbolic links, this "if"
gets optimized away to nothing, so it's just as fast
as the #ifdef.
Using plain "if" tends to lead to code that is
easier to maintain than using "#ifdef", in cases
like these. Among other things, trivial typos
inside the then-part are detected even when compiling
on platforms that lack the feature in question.
Large chunks of GNU code have been written using this style,
in programs such as coreutils, and it typically works well.
- windows build failure, (continued)
- windows build failure, Sean Sieger, 2011/02/21
- Re: windows build failure, Sean Sieger, 2011/02/21
- Re: windows build failure, Christoph, 2011/02/21
- Re: windows build failure, Paul Eggert, 2011/02/21
- Re: windows build failure, Eli Zaretskii, 2011/02/21
- Re: windows build failure, Paul Eggert, 2011/02/21
- Re: windows build failure, Eli Zaretskii, 2011/02/22
- Re: windows build failure,
Paul Eggert <=
- Re: windows build failure, Eli Zaretskii, 2011/02/22
- Re: windows build failure, Paul Eggert, 2011/02/22
- Re: windows build failure, Eli Zaretskii, 2011/02/23
- Re: windows build failure, Eli Zaretskii, 2011/02/23
- Re: windows build failure, Paul Eggert, 2011/02/25
- Re: Remove S_IFLNK (was: windows build failure), Eli Zaretskii, 2011/02/26
- Re: Remove S_IFLNK, Stefan Monnier, 2011/02/26
- Re: Remove S_IFLNK, Paul Eggert, 2011/02/26
- Re: Remove S_IFLNK, Eli Zaretskii, 2011/02/27