Hi,
On 2013-05-13 Michael Davidsaver wrote:
>
> It looks like a call to localtime_r() is failing. Unfortunately I'm not
> certain what would cause this.
What version of VxWorks is being used here?
Wind River changed the return values for localtime_r() and gmtime_r() between
VxWorks 6.8 and 6.9 to match the Posix standard, but unfortunately this breaks
our src/libCom/osi/os/vxWorks/osdTime.cpp code for 6.9. I have an uncommitted
change in my 3.14 tree (attached) which ignores the return value from these
routines.
Unfortunately this change is not sufficient to get the epicsTime subsystem
working properly on VxWorks 6.9, there's something else still not right which
I have not yet found, so I don't recommend using anything later than VxWorks
6.8 at this stage. If anyone else finds some other change to get this working
on VxWorks 6.9 I would be grateful for any pointers.
- Andrew
--
It is difficult to get a man to understand something, when his salary
depends upon his not understanding it. -- Upton Sinclair
=== modified file 'src/libCom/osi/os/vxWorks/osdTime.cpp'
--- src/libCom/osi/os/vxWorks/osdTime.cpp 2009-05-07 19:35:34 +0000
+++ src/libCom/osi/os/vxWorks/osdTime.cpp 2013-04-02 22:29:26 +0000
@@ -67,14 +67,16 @@
}
-// vxWorks localtime_r interface does not match POSIX standards
+// vxWorks localtime_r returns different things in different versions
int epicsTime_localtime(const time_t *clock, struct tm *result)
{
- return localtime_r(clock, result) == OK ? epicsTimeOK : epicsTimeERROR;
+ localtime_r(clock, result);
+ return epicsTimeOK;
}
-// vxWorks gmtime_r interface does not match POSIX standards
+// vxWorks gmtime_r returns different things in different versions
int epicsTime_gmtime ( const time_t *pAnsiTime, struct tm *pTM )
{
- return gmtime_r(pAnsiTime, pTM) == OK ? epicsTimeOK : epicsTimeERROR;
+ gmtime_r(pAnsiTime, pTM);
+ return epicsTimeOK;
}
- Replies:
- Re: vxWorks localtime_r fails? (was epicsTimeGetEvent failed) Michael Davidsaver
- References:
- Re: Re: epicsTimeGetEvent failed Geon-Yeong Mun
- vxWorks localtime_r fails? (was epicsTimeGetEvent failed) Michael Davidsaver
- Navigate by Date:
- Prev:
vxWorks localtime_r fails? (was epicsTimeGetEvent failed) Michael Davidsaver
- Next:
Re: vxWorks localtime_r fails? (was epicsTimeGetEvent failed) Michael Davidsaver
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
vxWorks localtime_r fails? (was epicsTimeGetEvent failed) Michael Davidsaver
- Next:
Re: vxWorks localtime_r fails? (was epicsTimeGetEvent failed) Michael Davidsaver
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
<2013>
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|