Hi everyone, Frank Küster <[EMAIL PROTECTED]> wrote:
> Is there an easy way to find out which of the preprocessor conditional > branches we're in? I'm speaking of > > +#ifdef HAVE_TM_GMTOFF /* Preferred way to get time zone offset */ > + tz_offset = bd_time->tm_gmtoff; > +#else > +#ifdef HAVE_TIMEZONE /* Plan B --- use external variable 'timezone' > + /* (may not provide correct offset for daylight > savings time) */ > + tz_offset = - timezone; > +#else /* Last resort --- without more information, set > offset to zero */ > + tz_offset = 0l; > +#endif /* HAVE_TIMEZONE */ > +#endif /* HAVE_TM_GMTOFF */ Such macros (HAVE_FOOBAR) are usually defined in header files that are generated when running ./configure (script which is usually generated from configure.in by autoconf), and usually called config.h. In my last build of tetex-bin (3.0-28), these macros are defined as follows in texk/dvipdfm/config.h: /* define if struct tm has tm_gmtoff as a member */ #define HAVE_TM_GMTOFF 1 /* define if <time.h> has timezone as an external variable */ #define HAVE_TIMEZONE 1 -- Florent