[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
reduce compiler warnings during configure
From: |
Eric Blake |
Subject: |
reduce compiler warnings during configure |
Date: |
Tue, 22 Aug 2006 07:00:35 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Thunderbird/1.5.0.5 Mnenhy/0.7.4.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Paul's latest updates to module dependencies pulled in several .m4 files
that trigger gcc compiler warnings, breaking the configuration of m4 with
'-Werror' where it had previously been working. Paul, Bruno, are these
okay to install?
Is bh_C_SIGNED still needed, now that we assume C89?
This does not do anything about the fact that AM_LANGINFO_CODESET (and
other gettext macros) collides with the AM_ namespace. Libtool has
recently made the move to use its own namespace LT_, rather than
potentially conflicting with automake/autoconf by reusing AC_/AM_, while
providing backwards-compatible aliases to avoid breaking existing
configure.ac files. It would be something to consider for the next
gettext release.
2006-08-22 Eric Blake <address@hidden>
* stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
* inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
* longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
* codeset.m4 (AM_LANGINFO_CODESET): Likewise.
* signed.m4 (bh_C_SIGNED): Likewise.
* intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFE6v/z84KuGfSFAYARAkFRAJ9cW2hqwyMhKRnLbquF4feDb8thwwCglLqf
8DqnJhFpkkIZu7PvzhlU+jw=
=8RQm
-----END PGP SIGNATURE-----
Index: m4/stdint_h.m4
===================================================================
RCS file: /sources/gnulib/gnulib/m4/stdint_h.m4,v
retrieving revision 1.5
diff -u -p -r1.5 stdint_h.m4
--- m4/stdint_h.m4 18 Jan 2005 13:07:56 -0000 1.5
+++ m4/stdint_h.m4 22 Aug 2006 12:14:14 -0000
@@ -1,5 +1,5 @@
-# stdint_h.m4 serial 5
-dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
+# stdint_h.m4 serial 6
+dnl Copyright (C) 1997-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,
dnl with or without modifications, as long as this notice is preserved.
@@ -15,7 +15,7 @@ AC_DEFUN([gl_AC_HEADER_STDINT_H],
[AC_TRY_COMPILE(
[#include <sys/types.h>
#include <stdint.h>],
- [uintmax_t i = (uintmax_t) -1;],
+ [uintmax_t i = (uintmax_t) -1; return !i;],
gl_cv_header_stdint_h=yes,
gl_cv_header_stdint_h=no)])
if test $gl_cv_header_stdint_h = yes; then
Index: m4/inttypes_h.m4
===================================================================
RCS file: /sources/gnulib/gnulib/m4/inttypes_h.m4,v
retrieving revision 1.11
diff -u -p -r1.11 inttypes_h.m4
--- m4/inttypes_h.m4 18 Jan 2005 13:07:56 -0000 1.11
+++ m4/inttypes_h.m4 22 Aug 2006 12:14:14 -0000
@@ -1,5 +1,5 @@
-# inttypes_h.m4 serial 6
-dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
+# inttypes_h.m4 serial 7
+dnl Copyright (C) 1997-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,
dnl with or without modifications, as long as this notice is preserved.
@@ -15,7 +15,7 @@ AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
[AC_TRY_COMPILE(
[#include <sys/types.h>
#include <inttypes.h>],
- [uintmax_t i = (uintmax_t) -1;],
+ [uintmax_t i = (uintmax_t) -1; return !i;],
gl_cv_header_inttypes_h=yes,
gl_cv_header_inttypes_h=no)])
if test $gl_cv_header_inttypes_h = yes; then
Index: m4/longlong.m4
===================================================================
RCS file: /sources/gnulib/gnulib/m4/longlong.m4,v
retrieving revision 1.8
diff -u -p -r1.8 longlong.m4
--- m4/longlong.m4 2 Jul 2006 06:49:07 -0000 1.8
+++ m4/longlong.m4 22 Aug 2006 12:14:14 -0000
@@ -1,4 +1,4 @@
-# longlong.m4 serial 6
+# longlong.m4 serial 7
dnl Copyright (C) 1999-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,
@@ -22,8 +22,8 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
? 1 : -1)];
int i = 63;]],
[[long long int llmax = 9223372036854775807ll;
- return (ll << 63 | ll >> 63 | ll < i | ll > i
- | llmax / ll | llmax % ll);]])],
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll));]])],
[ac_cv_type_long_long_int=yes],
[ac_cv_type_long_long_int=no])])
if test $ac_cv_type_long_long_int = yes; then
Index: m4/codeset.m4
===================================================================
RCS file: /sources/gnulib/gnulib/m4/codeset.m4,v
retrieving revision 1.7
diff -u -p -r1.7 codeset.m4
--- m4/codeset.m4 18 Jan 2005 13:07:56 -0000 1.7
+++ m4/codeset.m4 22 Aug 2006 12:14:14 -0000
@@ -1,5 +1,5 @@
-# codeset.m4 serial AM1 (gettext-0.10.40)
-dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+# codeset.m4 serial 2
+dnl Copyright (C) 2000-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.
@@ -10,7 +10,7 @@ AC_DEFUN([AM_LANGINFO_CODESET],
[
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
[AC_TRY_LINK([#include <langinfo.h>],
- [char* cs = nl_langinfo(CODESET);],
+ [char* cs = nl_langinfo(CODESET); return !cs;],
am_cv_langinfo_codeset=yes,
am_cv_langinfo_codeset=no)
])
Index: m4/signed.m4
===================================================================
RCS file: /sources/gnulib/gnulib/m4/signed.m4,v
retrieving revision 1.4
diff -u -p -r1.4 signed.m4
--- m4/signed.m4 18 Jan 2005 13:07:56 -0000 1.4
+++ m4/signed.m4 22 Aug 2006 12:14:14 -0000
@@ -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 = 1; 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: m4/intmax_t.m4
===================================================================
RCS file: /sources/gnulib/gnulib/m4/intmax_t.m4,v
retrieving revision 1.5
diff -u -p -r1.5 intmax_t.m4
--- m4/intmax_t.m4 18 Jan 2005 13:07:56 -0000 1.5
+++ m4/intmax_t.m4 22 Aug 2006 12:14:14 -0000
@@ -1,5 +1,5 @@
-# intmax_t.m4 serial 4
-dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
+# intmax_t.m4 serial 5
+dnl Copyright (C) 1997-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,
dnl with or without modifications, as long as this notice is preserved.
@@ -46,7 +46,7 @@ AC_DEFUN([gt_AC_TYPE_INTMAX_T],
#if HAVE_INTTYPES_H_WITH_UINTMAX
#include <inttypes.h>
#endif
-], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
+], [intmax_t x = -1; return !x;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
if test $gt_cv_c_intmax_t = yes; then
AC_DEFINE(HAVE_INTMAX_T, 1,
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
- reduce compiler warnings during configure,
Eric Blake <=