From: Otto Date: Wed, 10 Feb 2021 07:21:28 +0000 (+0100) Subject: Move time_t check to it's own macro X-Git-Tag: rec-4.5.0-alpha2~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12e06ae78c3ddc70ed08b60b715203738adda3ff;p=thirdparty%2Fpdns.git Move time_t check to it's own macro --- diff --git a/configure.ac b/configure.ac index 9d225cfc63..4732e8c923 100644 --- a/configure.ac +++ b/configure.ac @@ -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 -]) +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 index 0000000000..c3d274b7e6 --- /dev/null +++ b/m4/pdns_check_time_t.m4 @@ -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 +]) +]) diff --git a/pdns/dnsdistdist/configure.ac b/pdns/dnsdistdist/configure.ac index bcc4db07e6..de716b9dd1 100644 --- a/pdns/dnsdistdist/configure.ac +++ b/pdns/dnsdistdist/configure.ac @@ -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 -]) +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 index 0000000000..599d0e6c57 --- /dev/null +++ b/pdns/dnsdistdist/m4/pdns_check_time_t.m4 @@ -0,0 +1 @@ +../../../m4/pdns_check_time_t.m4 \ No newline at end of file diff --git a/pdns/recursordist/configure.ac b/pdns/recursordist/configure.ac index 7ed55d09c7..ca6088bfc6 100644 --- a/pdns/recursordist/configure.ac +++ b/pdns/recursordist/configure.ac @@ -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 -]) +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 index 0000000000..599d0e6c57 --- /dev/null +++ b/pdns/recursordist/m4/pdns_check_time_t.m4 @@ -0,0 +1 @@ +../../../m4/pdns_check_time_t.m4 \ No newline at end of file