[X2Go-Commits] [nx-libs] 01/03: nxcomp/configure.ac: add check for ::ctime_s.
git-admin at x2go.org
git-admin at x2go.org
Tue Jan 9 01:09:27 CET 2018
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit df8908b9dc0a4583c4b426cbbe47249cd895e16a
Author: Mihai Moldovan <ionic at ionic.de>
Date: Sat Dec 30 09:25:26 2017 +0100
nxcomp/configure.ac: add check for ::ctime_s.
---
nxcomp/configure.ac | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/nxcomp/configure.ac b/nxcomp/configure.ac
index 12c3b50..b7350a4 100644
--- a/nxcomp/configure.ac
+++ b/nxcomp/configure.ac
@@ -94,6 +94,23 @@ std::tm tm = *std::localtime(&t);
[Use std::put_time to format times, must be made available by the compiler if turned on.])],
[AC_MSG_RESULT([no])])
+# Check if ::ctime_s is available.
+AC_MSG_CHECKING([if ::ctime_s is available])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[
+#define __STDC_WANT_LIB_EXT1__ 1
+#include <ctime>
+]],
+[[
+time_t res = time(NULL);
+char str[26] = { };
+::ctime_s(str, sizeof(str), &res);
+]])],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_CTIME_S, [1],
+ [Use ::ctime_s to format times, must be made available by the compiler if turned on.])],
+ [AC_MSG_RESULT([no])])
+
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[enable to get info session log output (disabled by default)])],
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list