DragonFly BSD
DragonFly users List (threaded) for 2006-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Using #undef correctly?


From: walt <wa1ter@xxxxxxxxxxxxx>
Date: Thu, 21 Sep 2006 13:07:15 -0700

I'm trying to build the latest pkgsrc evolution, which fails:

e-timezone-dialog.c:83: error: 'timezone' redeclared as different kind of symbol
/usr/include/time.h:148: error: previous declaration of 'timezone' was here
e-timezone-dialog.c:83: error: 'timezone' redeclared as different kind of symbol
/usr/include/time.h:148: error: previous declaration of 'timezone' was here

That's not a cut-n-paste error -- those messages do appear twice, dunno why.

Here is the code:

#ifndef G_OS_WIN32 /* Declared properly in time.h already */
extern char *tzname[2];
#undef timezone             <------ I added this line!
extern long timezone;
extern int daylight;
#endif

DragonFly defines 'timezone' as a character string in <time.h> but linux
expect the number of seconds west of UTC (hence the long).

I'm not trying for a definitive fix here, I'm just puzzled why my added
'#undef' failed to change anything.

Cluestick, please?




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]