Adjust configure so that extern tzname[] will be checked for
independently of whether the struct tm tm_zone member exists. Also run autoheader, which seems not to have been done lately; it added about three more things to pg_config.h.in than I was expecting...
This commit is contained in:
parent
39e98d9563
commit
c120f4ba0a
@ -1,5 +1,5 @@
|
||||
# Macros that test various C library quirks
|
||||
# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.18 2003/04/12 23:25:42 tgl Exp $
|
||||
# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.19 2003/05/22 16:39:26 tgl Exp $
|
||||
|
||||
|
||||
# PGAC_VAR_INT_TIMEZONE
|
||||
@ -18,6 +18,38 @@ if test x"$pgac_cv_var_int_timezone" = xyes ; then
|
||||
fi])# PGAC_VAR_INT_TIMEZONE
|
||||
|
||||
|
||||
# PGAC_STRUCT_TIMEZONE
|
||||
# ------------------
|
||||
# Figure out how to get the current timezone. If `struct tm' has a
|
||||
# `tm_zone' member, define `HAVE_TM_ZONE'. Also, if the
|
||||
# external array `tzname' is found, define `HAVE_TZNAME'.
|
||||
# This is the same as the standard macro AC_STRUCT_TIMEZONE, except that
|
||||
# tzname[] is checked for regardless of whether we find tm_zone.
|
||||
AC_DEFUN([PGAC_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.])
|
||||
fi
|
||||
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 have the external array `tzname'.])
|
||||
fi
|
||||
])# PGAC_STRUCT_TIMEZONE
|
||||
|
||||
|
||||
# PGAC_FUNC_GETTIMEOFDAY_1ARG
|
||||
# ---------------------------
|
||||
# Check if gettimeofday() has only one arguments. (Normal is two.)
|
||||
|
7
configure
vendored
7
configure
vendored
@ -9413,8 +9413,8 @@ cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_TM_ZONE 1
|
||||
_ACEOF
|
||||
|
||||
else
|
||||
echo "$as_me:$LINENO: checking for tzname" >&5
|
||||
fi
|
||||
echo "$as_me:$LINENO: checking for tzname" >&5
|
||||
echo $ECHO_N "checking for tzname... $ECHO_C" >&6
|
||||
if test "${ac_cv_var_tzname+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
@ -9463,13 +9463,12 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
|
||||
echo "${ECHO_T}$ac_cv_var_tzname" >&6
|
||||
if test $ac_cv_var_tzname = yes; then
|
||||
if test $ac_cv_var_tzname = yes; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_TZNAME 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$as_me:$LINENO: checking for union semun" >&5
|
||||
|
@ -1,5 +1,5 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl $Header: /cvsroot/pgsql/configure.in,v 1.252 2003/05/16 01:57:51 momjian Exp $
|
||||
dnl $Header: /cvsroot/pgsql/configure.in,v 1.253 2003/05/22 16:39:28 tgl Exp $
|
||||
dnl
|
||||
dnl Developers, please strive to achieve this order:
|
||||
dnl
|
||||
@ -735,7 +735,7 @@ AC_C_STRINGIZE
|
||||
PGAC_C_SIGNED
|
||||
AC_C_VOLATILE
|
||||
PGAC_C_FUNCNAME_SUPPORT
|
||||
AC_STRUCT_TIMEZONE
|
||||
PGAC_STRUCT_TIMEZONE
|
||||
PGAC_UNION_SEMUN
|
||||
PGAC_STRUCT_SOCKADDR_UN
|
||||
PGAC_STRUCT_ADDRINFO
|
||||
|
@ -55,6 +55,9 @@
|
||||
/* Define to 1 if you have the `class' function. */
|
||||
#undef HAVE_CLASS
|
||||
|
||||
/* Define to 1 if you have the `crypt' function. */
|
||||
#undef HAVE_CRYPT
|
||||
|
||||
/* Define to 1 if you have the <crypt.h> header file. */
|
||||
#undef HAVE_CRYPT_H
|
||||
|
||||
@ -121,6 +124,9 @@
|
||||
/* Define to 1 if you have the `gethostname' function. */
|
||||
#undef HAVE_GETHOSTNAME
|
||||
|
||||
/* Define to 1 if you have the `getopt' function. */
|
||||
#undef HAVE_GETOPT
|
||||
|
||||
/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#undef HAVE_GETOPT_H
|
||||
|
||||
@ -250,6 +256,9 @@
|
||||
/* Define to 1 if you have the `util' library (-lutil). */
|
||||
#undef HAVE_LIBUTIL
|
||||
|
||||
/* Define to 1 if you have the `wsock32' library (-lwsock32). */
|
||||
#undef HAVE_LIBWSOCK32
|
||||
|
||||
/* Define to 1 if you have the `z' library (-lz). */
|
||||
#undef HAVE_LIBZ
|
||||
|
||||
@ -460,8 +469,7 @@
|
||||
`HAVE_STRUCT_TM_TM_ZONE' instead. */
|
||||
#undef HAVE_TM_ZONE
|
||||
|
||||
/* Define to 1 if you don't have `tm_zone' but do have the external array
|
||||
`tzname'. */
|
||||
/* Define to 1 if you have the external array `tzname'. */
|
||||
#undef HAVE_TZNAME
|
||||
|
||||
/* Define to 1 if the system has the type `uint64'. */
|
||||
|
Loading…
Reference in New Issue
Block a user