added strftime %z check into configure.ac

This commit is contained in:
hyunghwan.chung
2017-04-28 23:25:21 +00:00
parent 3a072e9d7c
commit e2a7646b75
5 changed files with 80 additions and 13 deletions

View File

@ -660,10 +660,10 @@ if (mask & MOO_LOG_GC) return; /* don't show gc logs */
}
#else
tmp = localtime_r (&now, &tm);
#if defined(__sun) && defined(__SVR4) /* TODO: better check on support of %z */
tslen = strftime (ts, sizeof(ts), "%Y-%m-%d %H:%M:%S %Z ", tmp);
#else
#if defined(HAVE_STRFTIME_SMALL_Z)
tslen = strftime (ts, sizeof(ts), "%Y-%m-%d %H:%M:%S %z ", tmp);
#else
tslen = strftime (ts, sizeof(ts), "%Y-%m-%d %H:%M:%S %Z ", tmp);
#endif
if (tslen == 0)
{