Hello Andrew, so you do not want to support Linux because it is not 100% Posix? Neither all those other Unix derivatives that will indicate an error in gettimeofday?
Best regards Heinrich Schuchardt http://www.xypron.de Am 08.07.13 um 06:51 schrieb Andrew Makhorin > 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 > > > > > > > > _______________________________________________ Bug-glpk mailing list Bug-glpk@gnu.org https://lists.gnu.org/mailman/listinfo/bug-glpk