[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-glpk] Segfault in jday function
From: |
Andrew Makhorin |
Subject: |
Re: [Bug-glpk] Segfault in jday function |
Date: |
Mon, 08 Jul 2013 08:51:34 +0400 |
The POSIX standard says:
RETURN VALUE
The gettimeofday() function shall return 0 and no value shall be
reserved to indicate an error.
ERRORS
No errors are defined.
So I see no need to check the return code. Implementation should not
change the semantics defined by the standard.
> which errors may occur depends on the POSIX system you use, just compare
>
> http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2Fgettod.htm
>
> http://www.manpagez.com/man/2/gettimeofday/
>
> http://illumos.org/man/3C/gettimeofday
>
> Best regards
>
> Heinrich Schuchardt
>
> On 01.07.2013 21:54, Andrew Makhorin wrote:
> > Hi Heinrich,
> >
> >> if gettimeofday fails it returns -1,
> >> if gmtime fails it returns NULL.
> >>
> >> To avoid segmentation faults, please, provide error handling as follows:
> >>
> >
> > Thank you for suggestion.
> >
> > However, under which circumstances gettimeofday may fail? Most likely
> > (as I replied to Jiri) that it was a bug specific to mingw64 version of
> > gettimeofday.
> >
> >
> > Andrew Makhorin
> >
> >