Experimental Physics and
| |||||||||||||||||
|
I think that WIN32 does provide this routine -- at least my quick check with google seems to imply this. Ok, I didn't look. The vxWorks case is a little trickier. I suppose that someone out there actually uses the IOC shell rather than the vxWorks shell. I don't see how that's relevent (the iocsh is moving into libCom and has to link on all architectures; we use it here on all our vxWorks IOCs). The change you presented just inserts a kludge into the epicsEnvSet() command. Just adding a tzset() command for those architectures that provide and need that routine would be preferable. What's' your feeling on weak references? Very wrong for this purpose. We know at compile time whether this architecture uses tzset(), and using a weak reference just postpones the check until runtime (apart from the fact that they're not portable - not all the binary formats we build even support weak references). How about an epicsTzset() macro in some os-dependent header. This would do nothing on vxWorks and expand to tzset() on all others. That still doesn't remove the fact that you'd be adding code that has nothing to do with actually setting an environment variable (other than the fact that the routine you're calling takes its arguments from the global environment) to the epicsEnvSet() command. One solution to this would be to add a command that sets up the local timezone information. We could then make the same command work across all platforms, should that be seen to be desirable. I think that's a bit of an over-kill solution though, and I'd much prefer just adding the tzset() command - we could use an OSD header file to signal whether it should be included or not. I'll let you know when I've committed my move of the iocsh files. - Andrew -- The right to be heard does not automatically include the right to be taken seriously. -- Hubert H. Humphrey
| ||||||||||||||||
ANJ, 10 Nov 2011 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |