- (dtucker) [configure.ac] Try to get the gcc version number in a way that

doesn't change between versions, and use a safer default.
This commit is contained in:
Darren Tucker 2005-11-10 21:30:36 +11:00
parent 9d30d13922
commit f032435de7
2 changed files with 7 additions and 4 deletions

View File

@ -48,6 +48,8 @@
-Wsign-compare fixes from djm. -Wsign-compare fixes from djm.
- (dtucker) [openbsd-compat/sigact.h] Update from OpenBSD 1.2 -> 1.3. - (dtucker) [openbsd-compat/sigact.h] Update from OpenBSD 1.2 -> 1.3.
Id and copyright sync only, there were no substantial changes we need. Id and copyright sync only, there were no substantial changes we need.
- (dtucker) [configure.ac] Try to get the gcc version number in a way that
doesn't change between versions, and use a safer default.
20051105 20051105
- (djm) OpenBSD CVS Sync - (djm) OpenBSD CVS Sync
@ -3290,4 +3292,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
$Id: ChangeLog,v 1.3988 2005/11/10 08:43:48 dtucker Exp $ $Id: ChangeLog,v 1.3989 2005/11/10 10:30:36 dtucker Exp $

View File

@ -1,4 +1,4 @@
# $Id: configure.ac,v 1.304 2005/11/10 03:46:49 dtucker Exp $ # $Id: configure.ac,v 1.305 2005/11/10 10:30:36 dtucker Exp $
# #
# Copyright (c) 1999-2004 Damien Miller # Copyright (c) 1999-2004 Damien Miller
# #
@ -85,13 +85,14 @@ AC_CHECK_DECL(LLONG_MAX, have_llong_max=1, , [#include <limits.h>])
if test "$GCC" = "yes" || test "$GCC" = "egcs"; then if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wuninitialized" CFLAGS="$CFLAGS -Wall -Wpointer-arith -Wuninitialized"
GCC_VER=`$CC --version` GCC_VER=`$CC -v 2>&1 | awk '/gcc version /{print $3}'`
case $GCC_VER in case $GCC_VER in
1.*) ;; 1.*) ;;
2.8* | 2.9*) CFLAGS="$CFLAGS -Wsign-compare" ;; 2.8* | 2.9*) CFLAGS="$CFLAGS -Wsign-compare" ;;
2.*) ;; 2.*) ;;
3.*) CFLAGS="$CFLAGS -Wsign-compare" ;; 3.*) CFLAGS="$CFLAGS -Wsign-compare" ;;
*) CFLAGS="$CFLAGS -Wsign-compare -Wno-pointer-sign" ;; 4.*) CFLAGS="$CFLAGS -Wsign-compare -Wno-pointer-sign" ;;
*) ;;
esac esac
if test -z "$have_llong_max"; then if test -z "$have_llong_max"; then