This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 1.3.2 bug on NT 4: localtime() & timestring() set errno on success




Kurt Roeckx wrote:
> 
> On Tue, Jul 24, 2001 at 11:41:26AM -0700, Larisa A Stephan wrote:
> > I notice that localtime() and timestring() tend to set errno to 0x2 even
> > though they succeed (return a non-NULL pointer).  I THINK this is a bug,
> > but maybe someone can correct me.  I checked the archives and found one
> > mention of this issue, but no one followed up to tell the guy he was nuts,
> > so maybe it is really a bug.
> 
> They themself are no system calls, but probably do call system
> calls.  Any of the system calls it might have called could have
> change errno.

In days of yore, it was unsafe to examine errno's value unless an error
had been indicated. As Kurt says above, any system call can alter errno.

Cheers

Don Sharp

> 
> My guess is that it's trying to open some file, but didn't find
> it.
> 
> Kurt
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]