[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Tue Jul 11 22:45:01 UTC 2023


The branch, master has been updated
       via  05e2ec1d8be configure: ensure sizeof(int) >= 4
      from  230f8db40f1 docs-xml: Fix script idmap backend documentation

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 05e2ec1d8bec3285a0f6c075bddcab161ac5e9db
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Fri Jul 7 12:50:13 2023 +1200

    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 at catalyst.net.nz>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Tue Jul 11 22:44:15 UTC 2023 on atb-devel-224

-----------------------------------------------------------------------

Summary of changes:
 lib/replace/wscript | 4 ++++
 1 file changed, 4 insertions(+)


Changeset truncated at 500 lines:

diff --git a/lib/replace/wscript b/lib/replace/wscript
index f5c597c04c2..199e636aa02 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -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')


-- 
Samba Shared Repository



More information about the samba-cvs mailing list