]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Move time_t check to it's own macro 10010/head
authorOtto <otto.moerbeek@open-xchange.com>
Wed, 10 Feb 2021 07:21:28 +0000 (08:21 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Wed, 10 Feb 2021 07:21:28 +0000 (08:21 +0100)
configure.ac
m4/pdns_check_time_t.m4 [new file with mode: 0644]
pdns/dnsdistdist/configure.ac
pdns/dnsdistdist/m4/pdns_check_time_t.m4 [new symlink]
pdns/recursordist/configure.ac
pdns/recursordist/m4/pdns_check_time_t.m4 [new symlink]

index 9d225cfc6304ea2669fcb69daed4520985c4f9a0..4732e8c92339f92c8e1e4b912a6a6f518350a9f3 100644 (file)
@@ -26,11 +26,7 @@ AC_PROG_CC
 AC_PROG_CXX
 AC_LANG([C++])
 
-AX_COMPILE_CHECK_SIZEOF(time_t)
-AS_IF([test $ac_size -lt 8], [AC_MSG_ERROR([size of time_t is $ac_size, which is not large enough to fix the y2k38 bug])])
-AX_CHECK_SIGN([time_t], [:], [AC_MSG_ERROR([time_t is unsigned, PowerDNS code relies on it being signed])], [
-  #include <sys/types.h>
-])
+PDNS_CHECK_TIME_T
 PDNS_CHECK_BISON
 PDNS_CHECK_FLEX
 
diff --git a/m4/pdns_check_time_t.m4 b/m4/pdns_check_time_t.m4
new file mode 100644 (file)
index 0000000..c3d274b
--- /dev/null
@@ -0,0 +1,7 @@
+AC_DEFUN([PDNS_CHECK_TIME_T], [
+AX_COMPILE_CHECK_SIZEOF(time_t)
+AS_IF([test $ac_size -lt 8], [AC_MSG_ERROR([size of time_t is $ac_size, which is not large enough to fix the y2k38 bug])])
+AX_CHECK_SIGN([time_t], [:], [AC_MSG_ERROR([time_t is unsigned, PowerDNS code relies on it being signed])], [
+  #include <sys/types.h>
+])
+])
index bcc4db07e600a947c6cbe175f3628e4fae69fc91..de716b9dd18644a6a7c86598e7554174a8bfc772 100644 (file)
@@ -9,11 +9,7 @@ AC_PROG_CC
 AC_PROG_CXX
 AC_LANG([C++])
 
-AX_COMPILE_CHECK_SIZEOF(time_t)
-AS_IF([test $ac_size -lt 8], [AC_MSG_ERROR([size of time_t is $ac_size, which is not large enough to fix the y2k38 bug])])
-AX_CHECK_SIGN([time_t], [:], [AC_MSG_ERROR([time_t is unsigned, PowerDNS code relies on it being signed])], [
-  #include <sys/types.h>
-])
+PDNS_CHECK_TIME_T
 
 AC_DEFINE([DNSDIST], [1],
   [This is dnsdist]
diff --git a/pdns/dnsdistdist/m4/pdns_check_time_t.m4 b/pdns/dnsdistdist/m4/pdns_check_time_t.m4
new file mode 120000 (symlink)
index 0000000..599d0e6
--- /dev/null
@@ -0,0 +1 @@
+../../../m4/pdns_check_time_t.m4
\ No newline at end of file
index 7ed55d09c716fe9e4727781a4fa5d269401d8a99..ca6088bfc6435f6e8c146fb2c92add9f63825a84 100644 (file)
@@ -25,11 +25,7 @@ AC_PROG_CC
 AC_PROG_CXX
 AC_LANG([C++])
 
-AX_COMPILE_CHECK_SIZEOF(time_t)
-AS_IF([test $ac_size -lt 8], [AC_MSG_ERROR([size of time_t is $ac_size, which is not large enough to fix the y2k38 bug])])
-AX_CHECK_SIGN([time_t], [:], [AC_MSG_ERROR([time_t is unsigned, PowerDNS code relies on it being signed])], [
-  #include <sys/types.h>
-])
+PDNS_CHECK_TIME_T
 
 AC_DEFINE([RECURSOR], [1],
   [This is the PowerDNS Recursor]
diff --git a/pdns/recursordist/m4/pdns_check_time_t.m4 b/pdns/recursordist/m4/pdns_check_time_t.m4
new file mode 120000 (symlink)
index 0000000..599d0e6
--- /dev/null
@@ -0,0 +1 @@
+../../../m4/pdns_check_time_t.m4
\ No newline at end of file