diff options
Diffstat (limited to 'buildtools/wafsamba/samba_autoconf.py')
-rw-r--r-- | buildtools/wafsamba/samba_autoconf.py | 17 |
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 |