On Jan 24 10:19, Mark Hadfield wrote: > I have worked around the problem with HDF5 and reported the problem to the > maintainers. I expect they will want to support both 1.5.25 and earlier > versions. How long has the POSIX-compliant > form of timezone been available?
The timezone variable has been around since 1997, but it's called _timezone for historical reasons. Prior to 1.5.25 there was a # ifndef timezonevar char *timezone (void); # elif !defined(timezone) # define timezone _timezone # endif #endif /*__STRICT_ANSI__*/ so you have to `#define timezonevar' to get the timezone variable. The problem is that this collides potentially with the definition of struct timezone. 1.5.25 now defines timezone like this: extern long timezone __asm__ ("__timezone"); In theory (and if the code doesn't use the struct timezone) the below code should be portable and should work fine with any version of Cygwin: #ifdef __CYGWIN__ #define timezonevar #endif #include <time.h> [... use timezone variable ...] Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/