Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc120f4b

Browse files
committed
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...
1 parent39e98d9 commitc120f4b

File tree

4 files changed

+48
-9
lines changed

4 files changed

+48
-9
lines changed

‎config/c-library.m4

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Macros that test various C library quirks
2-
# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.18 2003/04/12 23:25:42 tgl Exp $
2+
# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.19 2003/05/22 16:39:26 tgl Exp $
33

44

55
# PGAC_VAR_INT_TIMEZONE
@@ -18,6 +18,38 @@ if test x"$pgac_cv_var_int_timezone" = xyes ; then
1818
fi])# PGAC_VAR_INT_TIMEZONE
1919

2020

21+
# PGAC_STRUCT_TIMEZONE
22+
# ------------------
23+
# Figure out how to get the current timezone. If `struct tm' has a
24+
# `tm_zone' member, define `HAVE_TM_ZONE'. Also, if the
25+
# external array `tzname' is found, define `HAVE_TZNAME'.
26+
# This is the same as the standard macro AC_STRUCT_TIMEZONE, except that
27+
# tzname[] is checked for regardless of whether we find tm_zone.
28+
AC_DEFUN([PGAC_STRUCT_TIMEZONE],
29+
[AC_REQUIRE([AC_STRUCT_TM])dnl
30+
AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
31+
#include <$ac_cv_struct_tm>
32+
])
33+
if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
34+
AC_DEFINE(HAVE_TM_ZONE,1,
35+
[Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
36+
`HAVE_STRUCT_TM_TM_ZONE' instead.])
37+
fi
38+
AC_CACHE_CHECK(fortzname,ac_cv_var_tzname,
39+
[AC_TRY_LINK(
40+
[#include <time.h>
41+
#ifndef tzname /* For SGI. */
42+
extern char *tzname[]; /* RS6000 and others reject char **tzname. */
43+
#endif
44+
],
45+
[atoi(*tzname);],ac_cv_var_tzname=yes,ac_cv_var_tzname=no)])
46+
if test $ac_cv_var_tzname = yes; then
47+
AC_DEFINE(HAVE_TZNAME,1,
48+
[Define to 1 if you have the external array `tzname'.])
49+
fi
50+
])# PGAC_STRUCT_TIMEZONE
51+
52+
2153
# PGAC_FUNC_GETTIMEOFDAY_1ARG
2254
# ---------------------------
2355
# Check if gettimeofday() has only one arguments. (Normal is two.)

‎configure

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9413,8 +9413,8 @@ cat >>confdefs.h <<\_ACEOF
94139413
#define HAVE_TM_ZONE 1
94149414
_ACEOF
94159415
9416-
else
9417-
echo"$as_me:$LINENO: checking for tzname">&5
9416+
fi
9417+
echo"$as_me:$LINENO: checking for tzname">&5
94189418
echo$ECHO_N"checking for tzname...$ECHO_C">&6
94199419
iftest"${ac_cv_var_tzname+set}" =set;then
94209420
echo$ECHO_N"(cached)$ECHO_C">&6
@@ -9463,13 +9463,12 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
94639463
fi
94649464
echo"$as_me:$LINENO: result:$ac_cv_var_tzname">&5
94659465
echo"${ECHO_T}$ac_cv_var_tzname">&6
9466-
iftest$ac_cv_var_tzname = yes;then
9466+
iftest$ac_cv_var_tzname = yes;then
94679467
94689468
cat>>confdefs.h<<\_ACEOF
94699469
#define HAVE_TZNAME 1
94709470
_ACEOF
94719471
9472-
fi
94739472
fi
94749473
94759474
echo"$as_me:$LINENO: checking for union semun">&5

‎configure.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $Header: /cvsroot/pgsql/configure.in,v 1.252 2003/05/16 01:57:51 momjian Exp $
2+
dnl $Header: /cvsroot/pgsql/configure.in,v 1.253 2003/05/22 16:39:28 tgl Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -735,7 +735,7 @@ AC_C_STRINGIZE
735735
PGAC_C_SIGNED
736736
AC_C_VOLATILE
737737
PGAC_C_FUNCNAME_SUPPORT
738-
AC_STRUCT_TIMEZONE
738+
PGAC_STRUCT_TIMEZONE
739739
PGAC_UNION_SEMUN
740740
PGAC_STRUCT_SOCKADDR_UN
741741
PGAC_STRUCT_ADDRINFO

‎src/include/pg_config.h.in

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
/* Define to 1 if you have the `class' function. */
5656
#undef HAVE_CLASS
5757

58+
/* Define to 1 if you have the `crypt' function. */
59+
#undef HAVE_CRYPT
60+
5861
/* Define to 1 if you have the <crypt.h> header file. */
5962
#undef HAVE_CRYPT_H
6063

@@ -121,6 +124,9 @@
121124
/* Define to 1 if you have the `gethostname' function. */
122125
#undef HAVE_GETHOSTNAME
123126

127+
/* Define to 1 if you have the `getopt' function. */
128+
#undef HAVE_GETOPT
129+
124130
/* Define to 1 if you have the <getopt.h> header file. */
125131
#undef HAVE_GETOPT_H
126132

@@ -250,6 +256,9 @@
250256
/* Define to 1 if you have the `util' library (-lutil). */
251257
#undef HAVE_LIBUTIL
252258

259+
/* Define to 1 if you have the `wsock32' library (-lwsock32). */
260+
#undef HAVE_LIBWSOCK32
261+
253262
/* Define to 1 if you have the `z' library (-lz). */
254263
#undef HAVE_LIBZ
255264

@@ -460,8 +469,7 @@
460469
`HAVE_STRUCT_TM_TM_ZONE' instead. */
461470
#undef HAVE_TM_ZONE
462471

463-
/* Define to 1 if you don't have `tm_zone' but do have the external array
464-
`tzname'. */
472+
/* Define to 1 if you have the external array `tzname'. */
465473
#undef HAVE_TZNAME
466474

467475
/* Define to 1 if the system has the type `uint64'. */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp