- (dtucker) [configure.ac defines.h] Prevent warnings about __attribute__

__nonnull__ for versions of GCC that don't support it.
This commit is contained in:
Darren Tucker 2007-04-29 14:49:21 +10:00
parent 6d862a50db
commit 391de5c023
3 changed files with 24 additions and 7 deletions

View File

@ -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
@ -2889,4 +2895,4 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@
$Id: ChangeLog,v 1.4656 2007/04/29 04:39:02 dtucker Exp $
$Id: ChangeLog,v 1.4657 2007/04/29 04:49:21 dtucker Exp $

View File

@ -1,4 +1,4 @@
# $Id: configure.ac,v 1.377 2007/04/29 04:39:03 dtucker Exp $
# $Id: configure.ac,v 1.378 2007/04/29 04:49:21 dtucker Exp $
#
# Copyright (c) 1999-2004 Damien Miller
#
@ -15,7 +15,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
AC_REVISION($Revision: 1.377 $)
AC_REVISION($Revision: 1.378 $)
AC_CONFIG_SRCDIR([ssh.c])
AC_CONFIG_HEADER(config.h)
@ -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],
[

View File

@ -25,7 +25,7 @@
#ifndef _DEFINES_H
#define _DEFINES_H
/* $Id: defines.h,v 1.140 2007/04/29 04:39:03 dtucker Exp $ */
/* $Id: defines.h,v 1.141 2007/04/29 04:49:21 dtucker Exp $ */
/* Constants */
@ -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))