[tz] Fwd: tz code 2012-e: Compilation issues on MacOS X 10.8

Ian Abbott abbotti at mev.co.uk
Fri Aug 17 09:33:08 UTC 2012


On 2012-08-05 19:20, Carlo Dapor wrote:
> I built the latest tz code on MacOS X 10.8.
> However, in localtime.c two methods are re-defined
>
>       void tzsetwall (void) - line 1167
>       void tzset (void)       - line 1190
>
> Not sure this is the correct way, I placed an "#if !defined
> (__APPLE__) && !defined (__MACH__)" on lines 1167 and 1190.
> And on lines 1188 and 1233 an "#endif /* ! __APPLE__ && ! __MACH__ */".
>
> For completeness, see the two compilation attempts before this change.
>
> #1
>
> cc -DTZDIR=\"/usr/local/etc/zoneinfo\"    -c -o localtime.o localtime.c
> localtime.c:1167:1: error: static declaration of 'tzsetwall' follows
> non-static declaration
> tzsetwall(void)
> ^
> /usr/include/time.h:150:6: note: previous declaration is here
> void tzsetwall(void);
>       ^
> 1 error generated.
> gmake: *** [localtime.o] Error 1

Does adding -DSTD_INSPIRED to your CFLAGS in the Makefile fix this 
without introducing other problems?

> #2
>
> cc -DTZDIR=\"/usr/local/etc/zoneinfo\"    -c -o localtime.o localtime.c
> localtime.c:1190:1: error: static declaration of 'tzset' follows
> non-static declaration
> tzset(void)
> ^
> /usr/include/time.h:136:6: note: previous declaration is here
> void tzset(void);
>       ^
> 1 error generated.
> gmake: *** [localtime.o] Error 1

That's strange because I see no sign of tzset being declared static in 
tzcode.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-



More information about the tz mailing list