>>>>> "MS" == Michael Sperber [Mr Preprocessor]
>>>>> <sperber@informatik.uni-tuebingen.de> writes:
MS> - errno is not guaranteed to be an lvalue.
ISO/IEC 9899:1990 (E) says (section 7.1.4) it ``expands to a
modifiable lvalue'' and it ``may be set to nonzero by a library
function call whether or not there is an error, provided the use of
errno is not documented in the description of the function in this
International Standard.''
MS> In fact, several Unices define errno to be a macro for a
MS> function call.
[Including GNU/Linux, where it's `(*__errno_location ())'.] Emacs,
for instance, sets errno and still runs on them.
See the footnote in that section of ISO C (or Harbison & Steele, for
instance) concerning zeroing it.
MS> - The ANSI standard indicates that a -1 return value is the sole and
MS> sufficient indicator of an error with time.
ISO C says just: ``The value (time_t)-1 is returned if the calendar
time is not available.''
[I don't have POSIX.1 beside me.]
|