libCom: Fix VxWorks localtime_r() and gmtime_r() wrappers

Wind River changed the return value between VxWorks 6.8 and 6.9.
This commit is contained in:
Andrew Johnson
2013-06-07 14:35:45 -05:00
parent ee9c0ba409
commit 863e8fdd3b
2 changed files with 21 additions and 11 deletions

View File

@@ -48,17 +48,23 @@ MAIN(epicsTimeTest)
const int wasteTime = 100000;
const int nTimes = 10;
testPlan(16 + nTimes * 18);
testPlan(12 + nTimes * 18);
{
try {
const epicsTimeStamp epochTS = {0, 0};
epicsTime epochET = epochTS;
struct gm_tm_nano_sec epicsEpoch = epochET;
testOk1(epicsEpoch.ansi_tm.tm_sec == 0);
testOk1(epicsEpoch.ansi_tm.tm_min == 0);
testOk1(epicsEpoch.ansi_tm.tm_hour == 0);
testOk1(epicsEpoch.ansi_tm.tm_yday == 0);
testOk1(epicsEpoch.ansi_tm.tm_year == 90);
testOk(epicsEpoch.ansi_tm.tm_sec == 0 &&
epicsEpoch.ansi_tm.tm_min == 0 &&
epicsEpoch.ansi_tm.tm_hour == 0 &&
epicsEpoch.ansi_tm.tm_yday == 0 &&
epicsEpoch.ansi_tm.tm_year == 90,
"epicsTime_gmtime() for EPICS epoch");
}
catch ( ... ) {
testFail("epicsTime_gmtime() failed");
testAbort("Can't continue, check your OS!");
}
{ // badNanosecTest