On 18 Aug 2003 at 3:40, Waldek Hebisch wrote: [...]
make[2]: Entering directory `/home/dave/cygwin/gcc-build/gcc/p/rts' /home/dave/cygwin/gcc-build/gcc/xgcc -B/home/dave/cygwin/gcc-build/gcc/ -B/home/dave/xcygwin-gcc-3.3.1-bin-2.14-pascal/i686-pc-cygwin/bin/ -B/home/dave/xcygwin-gcc-3.3.1-bin-2.14-pascal/i686-pc-cygwin/lib/ -isystem /home/dave/xcygwin-gcc-3.3.1-bin-2.14-pascal/i686-pc-cygwin/include -c -I. -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -g -O2 /home/dave/cygwin/gcc-3.3.1/gcc/p/rts/rts.c /home/dave/cygwin/gcc-3.3.1/gcc/p/rts/rts.c:239: error: `timezone' redeclared as different kind of symbol /home/dave/xcygwin-gcc-3.3.1-bin-2.14-pascal/i686-pc-cygwin/include/ti me.h:117: error: previous declaration of `timezone'
I looked into time.h coming from cygwin. In line 107 it defines timezone as a function. However it has variable `_timezone'. I changed line 1001 in `rts.c' replacing `timezone' by `_timezone'. Then I was able to build gpc for cygwin. I have build only pascal and c and the failed later since I used older version of native gpc, but that change should get you past the error.
[....]
This is the patch that I used ...
*** gcc/p/rts/rts.c.orig Wed Apr 16 02:58:46 2003 --- gcc/p/rts/rts.c Mon Aug 18 01:38:16 2003 *************** *** 191,196 **** --- 191,201 ---- #include <os-hacks.h> #endif
+ #ifdef __CYGWIN__ + #undef timezone + #define timezone ((long int) _timezone) + #endif + #if defined (HAVE_ERRNO) && !defined (errno) && !defined (ERRNO_DECLARED) extern int errno; #endif
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/