[SCM] Samba Shared Repository - branch master updated

Uri Simchoni uri at samba.org
Thu Mar 24 17:44:04 UTC 2016


The branch, master has been updated
       via  d648775 third_party/zlib/zlib.h: use HAVE___ATTRIBUTE__ instead of __GNUC__
       via  82258aa s4/lib/wmi_wrap: use HAVE___ATTRIBUTE__ instead of __GNUC__
       via  7b92b84 mdssvc/sparql_parser.c: use HAVE___ATTRIBUTE__ instead of __GNUC__
       via  fb0ebbf s3/modules/getdate: use HAVE___ATTRIBUTE__ instead of __GNUC__
       via  a20ee62 tevent.h: use HAVE___ATTRIBUTE__ instead of __GNUC__
       via  6ba2fe2 libreplace: use HAVE___ATTRIBUTE__ instead of __GNUC__
       via  88be24c util/attr.h: use HAVE___ATTRIBUTE__, not __GNUC__ comparisons
      from  c027e3d s4-libnet: Link dckeytab.so correctly when is AD DC enabled

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


- Log -----------------------------------------------------------------
commit d64877541036c6b82aa0204671bfdae08936b529
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Wed Mar 23 15:30:22 2016 +1300

    third_party/zlib/zlib.h: use HAVE___ATTRIBUTE__ instead of __GNUC__
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Uri Simchoni <uri at samba.org>
    
    Autobuild-User(master): Uri Simchoni <uri at samba.org>
    Autobuild-Date(master): Thu Mar 24 18:43:34 CET 2016 on sn-devel-144

commit 82258aa2a6ff1a8d139f60abb170aaffb0934025
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Wed Mar 23 15:29:50 2016 +1300

    s4/lib/wmi_wrap: use HAVE___ATTRIBUTE__ instead of __GNUC__
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Uri Simchoni <uri at samba.org>

commit 7b92b84415dd3292538eb4e44fac12b4e564b984
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Wed Mar 23 15:28:45 2016 +1300

    mdssvc/sparql_parser.c: use HAVE___ATTRIBUTE__ instead of __GNUC__
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Uri Simchoni <uri at samba.org>

commit fb0ebbfcbfb5754b0fca7b309eaded0e57877230
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Wed Mar 23 15:27:45 2016 +1300

    s3/modules/getdate: use HAVE___ATTRIBUTE__ instead of __GNUC__
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Uri Simchoni <uri at samba.org>

commit a20ee62984bdb623f8fa55a9900cb69a99bf38e6
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Wed Mar 23 15:26:49 2016 +1300

    tevent.h: use HAVE___ATTRIBUTE__ instead of __GNUC__
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Uri Simchoni <uri at samba.org>

commit 6ba2fe2e3f1ad27b12f4ef67f41c7ad4f29f17c3
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Wed Mar 23 15:26:03 2016 +1300

    libreplace: use HAVE___ATTRIBUTE__ instead of __GNUC__
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Uri Simchoni <uri at samba.org>

commit 88be24c279e29a363c2aabcb68b5f0a1e039f477
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date:   Wed Mar 23 11:16:48 2016 +1300

    util/attr.h: use HAVE___ATTRIBUTE__, not __GNUC__ comparisons
    
    The comparisons that look like
    
        #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
    
    fail if __GNUC_MINOR__ is 0.  The intended comparison is something
    more like
    
        #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
    
    However, given that:
    
     * these checks are really trying to test the presence of
       __attribute__,
    
     * there are now credible compilers that are not GCC, which have
       __attribute__ but might not be good at emulating __GNUC__
       numbers, and
    
     * we really face little risk of running into GCC 2.95
    
     * we have a HAVE___ATTRIBUTE__ check in ./configure
    
    let's not do the version comparisons.
    
    (Untested on GCC 2.95, GCC 3.0 and GCC 3.1).
    
    Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Uri Simchoni <uri at samba.org>

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

Summary of changes:
 lib/replace/replace.h                     |  4 ++--
 lib/tevent/tevent.h                       |  2 +-
 lib/util/attr.h                           | 16 ++++++++--------
 source3/modules/getdate.c                 |  2 +-
 source3/modules/getdate.y                 |  2 +-
 source3/rpc_server/mdssvc/sparql_parser.c |  4 +---
 source4/lib/wmi/wmi_wrap.c                |  8 +-------
 third_party/zlib/zlib.h                   |  2 +-
 8 files changed, 16 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index c764d06..7080373 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -425,7 +425,7 @@ int rep_dlclose(void *handle);
 #endif
 
 #ifndef PRINTF_ATTRIBUTE
-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
+#ifdef HAVE___ATTRIBUTE__
 /** Use gcc attribute to check printf fns.  a1 is the 1-based index of
  * the parameter containing the format, and a2 the index of the first
  * argument. Note that some gcc 2.x versions don't handle this
@@ -437,7 +437,7 @@ int rep_dlclose(void *handle);
 #endif
 
 #ifndef _DEPRECATED_
-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
+#ifdef HAVE___ATTRIBUTE__
 #define _DEPRECATED_ __attribute__ ((deprecated))
 #else
 #define _DEPRECATED_
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index cb95507..cc6b15e 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -1752,7 +1752,7 @@ void tevent_thread_proxy_schedule(struct tevent_thread_proxy *tp,
 
 #ifdef TEVENT_DEPRECATED
 #ifndef _DEPRECATED_
-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
+#ifdef HAVE___ATTRIBUTE__
 #define _DEPRECATED_ __attribute__ ((deprecated))
 #else
 #define _DEPRECATED_
diff --git a/lib/util/attr.h b/lib/util/attr.h
index b72696a..8e542c1 100644
--- a/lib/util/attr.h
+++ b/lib/util/attr.h
@@ -35,7 +35,7 @@
 #endif
 
 #ifndef _DEPRECATED_
-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
+#ifdef HAVE___ATTRIBUTE__
 #define _DEPRECATED_ __attribute__ ((deprecated))
 #else
 #define _DEPRECATED_
@@ -43,7 +43,7 @@
 #endif
 
 #ifndef _WARN_UNUSED_RESULT_
-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
+#ifdef HAVE___ATTRIBUTE__
 #define _WARN_UNUSED_RESULT_ __attribute__ ((warn_unused_result))
 #else
 #define _WARN_UNUSED_RESULT_
@@ -51,7 +51,7 @@
 #endif
 
 #ifndef _NORETURN_
-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
+#ifdef HAVE___ATTRIBUTE__
 #define _NORETURN_ __attribute__ ((noreturn))
 #else
 #define _NORETURN_
@@ -59,7 +59,7 @@
 #endif
 
 #ifndef _PURE_
-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1)
+#ifdef HAVE___ATTRIBUTE__
 #define _PURE_ __attribute__((pure))
 #else
 #define _PURE_
@@ -67,7 +67,7 @@
 #endif
 
 #ifndef NONNULL
-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1)
+#ifdef HAVE___ATTRIBUTE__
 #define NONNULL(param) param __attribute__((nonnull))
 #else
 #define NONNULL(param) param
@@ -75,7 +75,7 @@
 #endif
 
 #ifndef PRINTF_ATTRIBUTE
-#if __GNUC__ >= 3
+#ifdef HAVE___ATTRIBUTE__
 /** Use gcc attribute to check printf fns.  a1 is the 1-based index of
  * the parameter containing the format, and a2 the index of the first
  * argument. Note that some gcc 2.x versions don't handle this
@@ -87,11 +87,11 @@
 #endif
 
 #ifndef FORMAT_ATTRIBUTE
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+#ifdef HAVE___ATTRIBUTE__
 /** Use gcc attribute to check printf fns.  a1 is argument to format()
  * in the above macro.  This is needed to support Heimdal's printf
  * decorations. Note that some gcc 2.x versions don't handle this
- * properly, and as such I've used the same minimum from heimdal: GCC 3.1 **/
+ * properly. **/
 #define FORMAT_ATTRIBUTE(a) __attribute__ ((format a))
 #else
 #define FORMAT_ATTRIBUTE(a)
diff --git a/source3/modules/getdate.c b/source3/modules/getdate.c
index a27b75f..6ed9946 100644
--- a/source3/modules/getdate.c
+++ b/source3/modules/getdate.c
@@ -181,7 +181,7 @@
 # include <string.h>
 #endif
 
-#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
+#ifndef HAVE___ATTRIBUTE__
 # define __attribute__(x)
 #endif
 
diff --git a/source3/modules/getdate.y b/source3/modules/getdate.y
index 21c01b8..1ddcda4 100644
--- a/source3/modules/getdate.y
+++ b/source3/modules/getdate.y
@@ -72,7 +72,7 @@
 # include <string.h>
 #endif
 
-#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
+#ifndef HAVE___ATTRIBUTE__
 # define __attribute__(x)
 #endif
 
diff --git a/source3/rpc_server/mdssvc/sparql_parser.c b/source3/rpc_server/mdssvc/sparql_parser.c
index 8170290..3cd532b 100644
--- a/source3/rpc_server/mdssvc/sparql_parser.c
+++ b/source3/rpc_server/mdssvc/sparql_parser.c
@@ -241,9 +241,7 @@ typedef short int yytype_int16;
 #endif
 
 #ifndef YY_ATTRIBUTE
-# if (defined __GNUC__                                               \
-      && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
-     || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
+# if HAVE___ATTRIBUTE__
 #  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
 # else
 #  define YY_ATTRIBUTE(Spec) /* empty */
diff --git a/source4/lib/wmi/wmi_wrap.c b/source4/lib/wmi/wmi_wrap.c
index a4aaf1b..07eba3e 100644
--- a/source4/lib/wmi/wmi_wrap.c
+++ b/source4/lib/wmi/wmi_wrap.c
@@ -39,13 +39,7 @@
 
 /* attribute recognised by some compilers to avoid 'unused' warnings */
 #ifndef SWIGUNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define SWIGUNUSED __attribute__ ((__unused__)) 
-#   else
-#     define SWIGUNUSED
-#   endif
-# elif defined(__ICC)
+# ifdef HAVE___ATTRIBUTE__
 #   define SWIGUNUSED __attribute__ ((__unused__)) 
 # else
 #   define SWIGUNUSED 
diff --git a/third_party/zlib/zlib.h b/third_party/zlib/zlib.h
index aa7f082..a303d77 100644
--- a/third_party/zlib/zlib.h
+++ b/third_party/zlib/zlib.h
@@ -213,7 +213,7 @@ typedef gz_header FAR *gz_headerp;
 #define zlib_version zlibVersion()
 /* for compatibility with versions < 1.0.2 */
 
-#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1)
+#ifdef HAVE___ATTRIBUTE__
 /** Use gcc attribute to check printf fns.  a1 is the 1-based index of
  * the parameter containing the format, and a2 the index of the first
  * argument. Note that some gcc 2.x versions don't handle this


-- 
Samba Shared Repository



More information about the samba-cvs mailing list