]> andersk Git - openssh.git/commitdiff
- (dtucker) [configure.ac defines.h] Prevent warnings about __attribute__
authordtucker <dtucker>
Sun, 29 Apr 2007 04:49:21 +0000 (04:49 +0000)
committerdtucker <dtucker>
Sun, 29 Apr 2007 04:49:21 +0000 (04:49 +0000)
   __nonnull__ for versions of GCC that don't support it.

ChangeLog
configure.ac
defines.h

index 8240a97653e49601dcb1901cafb7a1009fd43690..7228508fd2c85fff459a1645dff1f2d86aa7cb07 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,12 @@
  - (dtucker) [openbsd-compat/xmmap.c] Include stdlib.h for mkstemp prototype.
  - (dtucker) [configure.ac defines.h] Have configure check for MAXSYMLINKS
    so we don't get redefinition warnings.
+ - (dtucker) [openbsd-compat/xmmap.c] Include stdlib.h for mkstemp prototype.
+ - (dtucker) [configure.ac defines.h] Prevent warnings about __attribute__
+   __nonnull__ for versions of GCC that don't support it.
+
+  20070406
+   - (dtucker) [INSTALL] Update the systems that have PAM as standard.  Link
 
 20070406
  - (dtucker) [INSTALL] Update the systems that have PAM as standard.  Link
index d330e7acd5494b7de2abace1ab0c16db56c1a9f5..991a70ba07fdf823cef5a836e629d8abf48d5e56 100644 (file)
@@ -94,9 +94,12 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
        CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wuninitialized"
        GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
        case $GCC_VER in
-               1.*) ;;
-               2.8* | 2.9*) CFLAGS="$CFLAGS -Wsign-compare" ;;
-               2.*) ;;
+               1.*) no_attrib_nonnull=1 ;;
+               2.8* | 2.9*)
+                    CFLAGS="$CFLAGS -Wsign-compare"
+                    no_attrib_nonnull=1
+                    ;;
+               2.*) no_attrib_nonnull=1 ;;
                3.*) CFLAGS="$CFLAGS -Wsign-compare" ;;
                4.*) CFLAGS="$CFLAGS -Wsign-compare -Wno-pointer-sign" ;;
                *) ;;
@@ -115,6 +118,10 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
        fi
 fi
 
+if test "x$no_attrib_nonnull" != "x1" ; then
+       AC_DEFINE(HAVE_ATTRIBUTE__NONNULL__, 1, [Have attribute nonnull])
+fi
+
 AC_ARG_WITH(rpath,
        [  --without-rpath         Disable auto-added -R linker paths],
        [
index e115dade390fff1eaea35f9544310b369e470f5c..00a0e163e69be3be9abfca975488ca94dbcaf472 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -449,6 +449,10 @@ struct winsize {
 # define __bounded__(x, y, z)
 #endif
 
+#if !defined(HAVE_ATTRIBUTE__NONNULL__) && !defined(__nonnull__)
+# define __nonnull__(x)
+#endif
+
 /* *-*-nto-qnx doesn't define this macro in the system headers */
 #ifdef MISSING_HOWMANY
 # define howmany(x,y)  (((x)+((y)-1))/(y))
This page took 0.057269 seconds and 5 git commands to generate.