Avoid warning at configure time with "gcc -Wall".
authorBruno Haible <bruno@clisp.org>
Fri, 22 Sep 2006 20:10:26 +0000 (20:10 +0000)
committerBruno Haible <bruno@clisp.org>
Fri, 22 Sep 2006 20:10:26 +0000 (20:10 +0000)
m4/ChangeLog
m4/lock.m4
m4/mbswidth.m4
m4/signed.m4
m4/vasprintf.m4

index 84f6101..c594eec 100644 (file)
@@ -1,4 +1,14 @@
 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.
        * getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
index 1ab7216..94c1870 100644 (file)
@@ -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 @@ AC_HELP_STRING([--disable-threads], [build without multithread safety]),
 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.])])
index 3cb2000..5aff74e 100644 (file)
@@ -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 @@ AC_DEFUN([gl_MBSWIDTH],
 #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
index 048f593..5ac7672 100644 (file)
@@ -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 @@ dnl From Bruno Haible.
 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.])
index 385e92e..18ca632 100644 (file)
@@ -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_DEFUN([gl_FUNC_VASPRINTF],
   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],
 [