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

Commitf667747

Browse files
committed
Put back AC_REQUIRE([AC_STRUCT_TM]).
The BSD-ish members of the buildfarm all seem to think removing thiswas a bad idea. It looks to me like it resulted in omitting the systemheader inclusion necessary to detect the fields of struct tm correctly.
1 parente42a21b commitf667747

File tree

3 files changed

+67
-1
lines changed

3 files changed

+67
-1
lines changed

‎config/c-library.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ fi])# PGAC_VAR_INT_TIMEZONE
3030
# This is the same as the standard macro AC_STRUCT_TIMEZONE, except that
3131
# tzname[] is checked for regardless of whether we find tm_zone.
3232
AC_DEFUN([PGAC_STRUCT_TIMEZONE],
33-
[AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
33+
[AC_REQUIRE([AC_STRUCT_TM])dnl
34+
AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include <sys/types.h>
3435
#include <$ac_cv_struct_tm>
3536
])
3637
if test "$ac_cv_member_struct_tm_tm_zone" = yes; then

‎configure

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15430,6 +15430,68 @@ _ACEOF
1543015430

1543115431
fi
1543215432
fi
15433+
{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15434+
$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
15435+
if test "${ac_cv_struct_tm+set}" = set; then
15436+
$as_echo_n "(cached) " >&6
15437+
else
15438+
cat >conftest.$ac_ext <<_ACEOF
15439+
/* confdefs.h. */
15440+
_ACEOF
15441+
cat confdefs.h >>conftest.$ac_ext
15442+
cat >>conftest.$ac_ext <<_ACEOF
15443+
/* end confdefs.h. */
15444+
#include <sys/types.h>
15445+
#include <time.h>
15446+
15447+
int
15448+
main ()
15449+
{
15450+
struct tm tm;
15451+
int *p = &tm.tm_sec;
15452+
return !p;
15453+
;
15454+
return 0;
15455+
}
15456+
_ACEOF
15457+
rm -f conftest.$ac_objext
15458+
if { (ac_try="$ac_compile"
15459+
case "(($ac_try" in
15460+
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15461+
*) ac_try_echo=$ac_try;;
15462+
esac
15463+
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15464+
$as_echo "$ac_try_echo") >&5
15465+
(eval "$ac_compile") 2>conftest.er1
15466+
ac_status=$?
15467+
grep -v '^ *+' conftest.er1 >conftest.err
15468+
rm -f conftest.er1
15469+
cat conftest.err >&5
15470+
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
15471+
(exit $ac_status); } && {
15472+
test -z "$ac_c_werror_flag" ||
15473+
test ! -s conftest.err
15474+
} && test -s conftest.$ac_objext; then
15475+
ac_cv_struct_tm=time.h
15476+
else
15477+
$as_echo "$as_me: failed program was:" >&5
15478+
sed 's/^/| /' conftest.$ac_ext >&5
15479+
15480+
ac_cv_struct_tm=sys/time.h
15481+
fi
15482+
15483+
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15484+
fi
15485+
{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
15486+
$as_echo "$ac_cv_struct_tm" >&6; }
15487+
if test $ac_cv_struct_tm = sys/time.h; then
15488+
15489+
cat >>confdefs.h <<\_ACEOF
15490+
#define TM_IN_SYS_TIME 1
15491+
_ACEOF
15492+
15493+
fi
15494+
1543315495
{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
1543415496
$as_echo_n "checking for struct tm.tm_zone... " >&6; }
1543515497
if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then

‎src/include/pg_config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,9 @@
720720
/* Define to 1 if strerror_r() returns a int. */
721721
#undef STRERROR_R_INT
722722

723+
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
724+
#undef TM_IN_SYS_TIME
725+
723726
/* Define to the appropriate snprintf format for unsigned 64-bit ints. */
724727
#undef UINT64_FORMAT
725728

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp