bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug#451921: Possibly erroneous (at least non-portable) macro(s) in gette


From: Santiago Vila
Subject: Bug#451921: Possibly erroneous (at least non-portable) macro(s) in gettext.m4 (fwd)
Date: Fri, 23 Nov 2007 12:41:50 +0100 (CET)

Hello.

Received this from the debian bug system:

---------- Forwarded message ----------
From: Cyril Brulebois <address@hidden>
To: Debian Bug Tracking System <address@hidden>
Date: Mon, 19 Nov 2007 10:38:23 +0100
Subject: Bug#451921: Possibly erroneous (at least non-portable) macro(s) in
    gettext.m4

Package: gettext
Version: 0.16.1-2
Severity: important

Hi,

while searching why USE_NLS was always set to ÿÿnoÿÿ, I found out that
there was an error when trying to compile and link against gettext on
64-bit architectures:
| /* confdefs.h.  */
| #define PACKAGE_NAME "Synfig Studio"
| #define PACKAGE_TARNAME "synfigstudio"
| #define PACKAGE_VERSION "0.61.07"
| #define PACKAGE_STRING "Synfig Studio 0.61.07"
| #define PACKAGE_BUGREPORT 
"http://sourceforge.net/tracker/?group_id=144022&atid=757416";
| #define PACKAGE "synfigstudio"
| #define VERSION "0.61.07"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| /* end confdefs.h.  */
| #include <libintl.h>
| extern int _nl_msg_cat_cntr;
| extern int *_nl_domain_bindings;
|       int
| main ()
| {
|       bindtextdomain ("", "");
|       return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings
|               ;
|       return 0;
| }

which results in ÿÿerror: cast from 'char*' to 'int' loses precisionÿÿ
when trying:
  g++ -o conftest  -DNDEBUG -Wno-deprecated -O2 -W -Wall -Wno-unused-parameter 
conftest.cpp

Given the content of gettext.m4 under /usr/share/aclocal, it looks like
the (int) cast is added by some m4 magic by autotools (since gettext.m4
is rather about doing ÿÿreturn gettextÿÿÿÿ w/o cast) but I'm quite sure
that gettext.m4 could be modified to be more portable.

Of course, feel free to reassign this bugreport to autotools packages if
you think they're doing the wrong thing, and shouldn't add the ÿÿ(int)ÿÿ
cast, or should try to use a ÿÿ(long)ÿÿ one.

Cheers,

-- 
Cyril Brulebois




reply via email to

[Prev in Thread] Current Thread [Next in Thread]