Real simple program:
#include <time.h>
main()
{
timezone;
}
The compile error I'm getting:
error: 'timezone' was not declared in this scope
On my Ubuntu machine this program compiles just fine using the standard time.h
that looks just like this. You can find lines that look related to defining timezone
...
275 /* Defined in localtime.c. */
278 extern long int __timezone; /* Seconds west of UTC. */
290 # if defined __USE_SVID || defined __USE_XOPEN
292 extern long int timezone;
293 # endif
Now the slightly more complex part where I get the error. I'm trying to build this program with Xilinx ISE to run on an embedded ARM chip. Xilinx provides all the standard C and C++ libraries and headers, such as time.h
. But the Xilinx provided time.h
doesn't seem to define timezone
properly. This is the only line related to timezone
:
extern __IMPORT long _timezone;
I'm not completely sure what to make of that. An explanation would be apprecatied. It seems awfully bizarre that a standard library would be implement improperly, even a specialized version optimized for an ARM chip. Does anyone know how to solve this problem?