summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2022-02-24 15:24:13 +1300
committerStefan Metzmacher <metze@samba.org>2022-03-01 18:07:50 +0000
commit9eb27f296ae2b797803fffbb7f4cb34d8eb06f34 (patch)
tree776e5569408e5b6f9724a3fc03ab5ce955e049b4 /buildtools
parent9936038fae72fb440864be543e9afd500444d502 (diff)
downloadsamba-9eb27f296ae2b797803fffbb7f4cb34d8eb06f34.tar.gz
third_party/heimdal_build: Determine whether time_t is signed
Without this, Heimdal will assume time_t is unsigned, and a wrong assumption will cause 'infinite' ticket lifetimes to be reckoned as from the past, and thus requests will fail with KDC_ERR_NEVER_VALID. This is an adaptation to Heimdal: commit 9ae9902249732237aa1711591604a6adf24963fe Author: Nicolas Williams <nico@twosigma.com> Date: Tue Feb 15 17:01:00 2022 -0600 cf: Check if time_t is signed BUG: https://bugzilla.samba.org/show_bug.cgi?id=14995 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Mar 1 18:07:50 UTC 2022 on sn-devel-184
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_autoconf.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 8b499825230..78927d85193 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -344,6 +344,23 @@ def CHECK_SIZEOF(conf, vars, headers=None, define=None, critical=True):
return ret
@conf
+def CHECK_SIGN(conf, v, headers=None):
+ '''check the sign of a type'''
+ define_name = v.upper().replace(' ', '_')
+ for op, signed in [('<', 'signed'),
+ ('>', 'unsigned')]:
+ if CHECK_CODE(conf,
+ f'static int test_array[1 - 2 * !((({v})-1) {op} 0)];',
+ define=f'{define_name}_{signed.upper()}',
+ quote=False,
+ headers=headers,
+ local_include=False,
+ msg=f"Checking if '{v}' is {signed}"):
+ return True
+
+ return False
+
+@conf
def CHECK_VALUEOF(conf, v, headers=None, define=None):
'''check the value of a variable/define'''
ret = True