Mercurial > hg > octave-lojdl > gnulib-hg
changeset 7357:28f050736570
Avoid warning at configure time with "gcc -Wall".
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Fri, 22 Sep 2006 20:10:26 +0000 |
parents | 0af37e82a5e3 |
children | 36a253ebff0a |
files | m4/ChangeLog m4/lock.m4 m4/mbswidth.m4 m4/signed.m4 m4/vasprintf.m4 |
diffstat | 5 files changed, 28 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,13 @@ +2006-09-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + Bruno Haible <bruno@clisp.org> + + * lock.m4 (gl_LOCK_BODY): Avoid unused variables warning. + * mbswidth.m4 (gl_MBSWIDTH): Likewise. + * signed.m4 (bh_C_SIGNED): Likewise. + + * vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro. + (gl_FUNC_VASPRINTF): Invoke it. + 2006-09-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
--- a/m4/lock.m4 +++ b/m4/lock.m4 @@ -1,4 +1,4 @@ -# lock.m4 serial 4 (gettext-0.15.1) +# lock.m4 serial 5 (gettext-0.15.1) dnl Copyright (C) 2005-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -147,6 +147,7 @@ error "No, in FreeBSD 4.0 recursive mutexes actually don't work." #else int x = (int)PTHREAD_MUTEX_RECURSIVE; +return !x; #endif], [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], 1, [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
--- a/m4/mbswidth.m4 +++ b/m4/mbswidth.m4 @@ -1,4 +1,4 @@ -# mbswidth.m4 serial 12 +# mbswidth.m4 serial 13 dnl Copyright (C) 2000-2002, 2004, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -24,6 +24,7 @@ #endif ], [ char *p = (char *) mbswidth; + return !p; ], ac_cv_have_decl_mbswidth=yes, ac_cv_have_decl_mbswidth=no)]) if test $ac_cv_have_decl_mbswidth = yes; then ac_val=1
--- a/m4/signed.m4 +++ b/m4/signed.m4 @@ -1,5 +1,5 @@ -# signed.m4 serial 1 (gettext-0.10.40) -dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. +# signed.m4 serial 2 +dnl Copyright (C) 2001-2002, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,7 +9,8 @@ AC_DEFUN([bh_C_SIGNED], [ AC_CACHE_CHECK([for signed], bh_cv_c_signed, - [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)]) + [AC_TRY_COMPILE(, [signed char x; return !x;], + bh_cv_c_signed=yes, bh_cv_c_signed=no)]) if test $bh_cv_c_signed = no; then AC_DEFINE(signed, , [Define to empty if the C compiler doesn't support this keyword.])
--- a/m4/vasprintf.m4 +++ b/m4/vasprintf.m4 @@ -1,5 +1,5 @@ -# vasprintf.m4 serial 1 -dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. +# vasprintf.m4 serial 2 +dnl Copyright (C) 2002-2003, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,11 +9,19 @@ AC_REPLACE_FUNCS(vasprintf) if test $ac_cv_func_vasprintf = no; then AC_LIBOBJ(asprintf) + gl_PREREQ_VASPRINTF_H gl_PREREQ_VASPRINTF gl_PREREQ_ASPRINTF fi ]) +# Prerequisites of lib/vasprintf.h. +AC_DEFUN([gl_PREREQ_VASPRINTF_H], +[ + dnl Persuade glibc <stdio.h> to declare asprintf() and vasprintf(). + AC_REQUIRE([AC_GNU_SOURCE]) +]) + # Prerequisites of lib/vasprintf.c. AC_DEFUN([gl_PREREQ_VASPRINTF], [