mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
configure: ensure sizeof(int) >= 4
There are multiple places we make this assumption. For example, in source3/lib/tldap.c, we have this line if (ld->msgid == 2147483647) { where ld->msgid is an int. And in librpc/idl/security.idl we have several lines like: const int SEC_MASK_GENERIC = 0xF0000000; In lib/replace/inet_pton.c and inet_ntop.c we have /* * WARNING: Don't even consider trying to compile this on a system where * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. */ but no attempt to enforce that as far as I can see, until now. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jul 11 22:44:15 UTC 2023 on atb-devel-224
This commit is contained in:
parent
230f8db40f
commit
05e2ec1d8b
@ -184,6 +184,10 @@ def configure(conf):
|
||||
conf.CHECK_TYPE('blkcnt_t', 'long', headers='sys/types.h sys/stat.h unistd.h')
|
||||
|
||||
conf.CHECK_SIZEOF('bool char int "long long" long short size_t ssize_t')
|
||||
sizeof_int = conf.env["SIZEOF_INT"]
|
||||
if sizeof_int < 4:
|
||||
conf.fatal(f"Samba won't work with int of size {sizeof_int} (requires >= 4)")
|
||||
|
||||
conf.CHECK_SIZEOF('int8_t uint8_t int16_t uint16_t int32_t uint32_t int64_t uint64_t')
|
||||
conf.CHECK_SIZEOF('void*', define='SIZEOF_VOID_P')
|
||||
conf.CHECK_SIZEOF('off_t dev_t ino_t time_t')
|
||||
|
Loading…
Reference in New Issue
Block a user