[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: minor timezone fix for autoconf.texi
From: |
Akim Demaille |
Subject: |
Re: minor timezone fix for autoconf.texi |
Date: |
18 Sep 2002 10:00:21 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) |
| | A note from Akim about coreutils/lib/tempname.c prompted me to find a
| | minor problem in the documentation about AC_HEADER_TIME. `struct
| | timezone' is completely obsolete now, so we shouldn't be suggesting it
| | to Autoconf users.
| |
| | 2002-09-13 Paul Eggert <address@hidden>
| |
| | * doc/autoconf.texi (Particular Headers): Remove obsolete
| | reference to `struct timezone' in the description of
| | AC_HEADER_TIME.
| |
| | --- autoconf.texi.~1.676.~ 2002-09-13 10:42:07.000000000 -0700
| | +++ autoconf.texi 2002-09-13 10:44:55.175241000 -0700
| | @@ -4372,7 +4372,7 @@ define @code{TIME_WITH_SYS_TIME}. On so
| | @file{sys/time.h} includes @file{time.h}, but @file{time.h} is not
| | protected against multiple inclusion, so programs should not explicitly
| | include both files. This macro is useful in programs that use, for
| | -example, @code{struct timeval} or @code{struct timezone} as well as
| | +example, @code{struct timeval} as well as
| | @code{struct tm}. It is best used in conjunction with
| | @code{HAVE_SYS_TIME_H}, which can be checked for using
| | @code{AC_CHECK_HEADERS(sys/time.h)}.
|
| So I believe we should apply the following, right?
|
| Index: ChangeLog
| from Akim Demaille <address@hidden>
|
| * lib/autoscan/identifiers (tm_zone): Remove.
|
| Index: lib/autoscan/identifiers
| ===================================================================
| RCS file: /cvsroot/autoconf/autoconf/lib/autoscan/identifiers,v
| retrieving revision 1.8
| diff -u -u -r1.8 identifiers
| --- lib/autoscan/identifiers 20 Apr 2002 06:09:02 -0000 1.8
| +++ lib/autoscan/identifiers 16 Sep 2002 08:31:37 -0000
| @@ -51,7 +51,6 @@
| st_blksize AC_CHECK_MEMBERS([struct stat.st_blksize])
| st_blocks AC_STRUCT_ST_BLOCKS
| st_rdev AC_CHECK_MEMBERS([struct stat.st_rdev])
| -tm_zone AC_STRUCT_TIMEZONE
|
| # Local Variables:
| # mode: shell-script
Forget about this: I was confused by the name: AC_STRUCT_TIMEZONE is
actually AC_STRUCT_TM_TM_ZONE.
# AC_STRUCT_TIMEZONE
# ------------------
# Figure out how to get the current timezone. If `struct tm' has a
# `tm_zone' member, define `HAVE_TM_ZONE'. Otherwise, if the
# external array `tzname' is found, define `HAVE_TZNAME'.
AC_DEFUN([AC_STRUCT_TIMEZONE],
[AC_REQUIRE([AC_STRUCT_TM])dnl
AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
#include <$ac_cv_struct_tm>
])
if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
AC_DEFINE(HAVE_TM_ZONE, 1,
[Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
`HAVE_STRUCT_TM_TM_ZONE' instead.])
else
AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
[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)])
if test $ac_cv_var_tzname = yes; then
AC_DEFINE(HAVE_TZNAME, 1,
[Define to 1 if you don't have `tm_zone' but do have the external
array `tzname'.])
fi
fi
])# AC_STRUCT_TIMEZONE