Russ Allbery writes:
> [AC_TRY_LINK(
> [#include <time.h>
> #ifndef tzname /* For SGI. */
> extern char *tzname[]; /* RS6000 and others reject char **tzname. */
> #endif
> ],
> [atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
>
> The atoi() makes no sense.
I suspect that just writing `tzname;' would cause some dumb compilers to
complain.
> Also, what's the autoconf standard for results concerning the presence or
> absence of external variables? Right now, this macro (which is oddly
> named) sets HAVE_TZNAME if tzname is available. This intrudes on the
> result space for functions; a similar macro checking for the existence of
> the external variable timezone would define HAVE_TIMEZONE, but that's
> ambiguous as there's also a *function* timezone() available on BSD hosts.
Actually, there is no namespace for functions. There is just HAVE_<thing>,
for any <thing>. Consider checking for the C++ header <string> vs the
class `string'.
> The macros I'm currently using for INN set HAVE_VAR_TIMEZONE and
> HAVE_VAR_TZNAME instead, which seemed at least somewhat better.
I'm using HAVE_INT_TIMEZONE for this particular case, but I agree that
your idea would be reasonable.
> FWIW, here are the macros I'm currently using (they're in autoconf 2.13
> style, not in autoconf 2.50 style; I'm anxiously awaiting the release of
> the latter and then intend to completely overhaul INN's configure.in and
> update the style of all of our macros, as well as submit the most useful
> ones to the macro repository).
Better timezone'ish macros would be appreciated.
--
Peter Eisentraut Sernanders v�g 10:115
[EMAIL PROTECTED] 75262 Uppsala
http://yi.org/peter-e/ Sweden