enhanced strftime %z check

This commit is contained in:
hyung-hwan 2018-10-14 10:37:15 +00:00
parent 7001dfa037
commit af67e44cb0
2 changed files with 2 additions and 2 deletions

2
configure vendored
View File

@ -18705,7 +18705,7 @@ else
char buf[100]; char buf[100];
time_t t = 0; time_t t = 0;
strftime (buf, sizeof(buf), "%z", gmtime(&t)); strftime (buf, sizeof(buf), "%z", gmtime(&t));
return strcmp(buf, "%z") == 0? 1: 0; return (strcmp(buf, "%z") == 0 || strcmp(buf, "z") == 0)? 1: 0;
} }
_ACEOF _ACEOF
if ac_fn_c_try_run "$LINENO"; then : if ac_fn_c_try_run "$LINENO"; then :

View File

@ -232,7 +232,7 @@ AC_TRY_RUN(
char buf[100]; char buf[100];
time_t t = 0; time_t t = 0;
strftime (buf, sizeof(buf), "%z", gmtime(&t)); strftime (buf, sizeof(buf), "%z", gmtime(&t));
return strcmp(buf, "%z") == 0? 1: 0; return (strcmp(buf, "%z") == 0 || strcmp(buf, "z") == 0)? 1: 0;
}], }],
[ [
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)