tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH 1/6] fix ambiguous errno treating after mktime()



    Date:        Mon, 1 Sep 2008 04:38:17 +0000
    From:        David Holland <dholland-tech%netbsd.org@localhost>
    Message-ID:  <20080901043817.GA8483%netbsd.org@localhost>

  | Principle of least surprise?

Only until the same code runs on some other system which doesn't
bother with needless errno preservation, and exhibits odd behaviour.

It really is best all around to understand the rules right from the start,
rather than having them hidden from you by someone trying to save you
from having to face reality.

kre

ps: it is actually quite hard to preserve errno, as it isn't guaranteed to
be an Lvalue, it is quite possible on some systems there's no (reputable)
way to assign a value to it, so while obtaining its value to save it is
easy, replacing it after some operation that might have changed it that
you would prefer to hide is not nearly so easy.



Home | Main Index | Thread Index | Old Index