This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: nls patches - need help with make machinery
- To: martin at loewis dot home dot cs dot tu-berlin dot de (Martin v. Loewis)
- Subject: Re: nls patches - need help with make machinery
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Mon, 5 Jun 2000 13:52:51 -0400 (EDT)
- Cc: gcc-bugs at gcc dot gnu dot org
> > Further, I am quite sceptical that libintl will build as is with an
> > old K&R compiler.
>
> Can you point to a specific problem? It may be possible to solve
> it... To work-around any K&R problems (if there are any), I'd rather
> recommend not building libintl in stage 1 - although I'm pretty sure
> that this code builds on K&R compilers just fine; it is used in *many*
> GNU package, some of which certainly have been compiled by K&R
> compilers over the years.
The only one that I am aware of is the "inline" keyword in couple of headers.
I enclose below the log of building libintl yesterday. I had patched
gettextP.h to remove the inline keyword but not hash-string.h. I also
fixed the memcpy problem in localealias.c:
--- gettextP.h.orig Sat Sep 4 11:08:49 1999
+++ gettextP.h Sun Jun 4 16:31:24 2000
@@ -46,7 +46,7 @@
#else
static nls_uint32 SWAP PARAMS ((nls_uint32 i));
-static inline nls_uint32
+static nls_uint32
SWAP (i)
nls_uint32 i;
{
--- localealias.c.orig Sat Sep 4 11:08:49 1999
+++ localealias.c Sun Jun 4 16:36:07 2000
@@ -333,12 +333,12 @@
string_space_max = new_size;
}
- map[nmap].alias = memcpy (&string_space[string_space_act],
- alias, alias_len);
+ memcpy (&string_space[string_space_act], alias, alias_len);
+ map[nmap].alias = &string_space[string_space_act];
string_space_act += alias_len;
- map[nmap].value = memcpy (&string_space[string_space_act],
- value, value_len);
+ memcpy (&string_space[string_space_act], value, value_len);
+ map[nmap].value = &string_space[string_space_act];
string_space_act += value_len;
++nmap;
The SWAP warning appeared after the inline keyword is removed. The declaration
problems for malloc, etc, could be cleared up by using PTR and PARAMS, similar
to that in libiberty. These declaration problems occur because IN_GCC is not
defined when config.h is included.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)
make intl.all
make[3]: Entering directory `/xxx/gnu/gcc-2.96/objdir/gcc'
(cd intl && make all)
make[4]: Entering directory `/xxx/gnu/gcc-2.96/objdir/gcc/intl'
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DGNULOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale:.\" -DHAVE_CONFIG_H -I.. -I. -I../../../gcc -I../../../gcc/intl -I../../../gcc/config -g -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long ../../../gcc/intl/intl-compat.c
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DGNULOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale:.\" -DHAVE_CONFIG_H -I.. -I. -I../../../gcc -I../../../gcc/intl -I../../../gcc/config -g -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long ../../../gcc/intl/bindtextdom.c
../../../gcc/intl/bindtextdom.c:28: warning: function declaration isn't a prototype
../../../gcc/intl/bindtextdom.c: In function `bindtextdomain__':
../../../gcc/intl/bindtextdom.c:121: warning: implicit declaration of function `malloc'
../../../gcc/intl/bindtextdom.c:142: warning: function `malloc' was previously declared within a block
../../../gcc/intl/bindtextdom.c: At top level:
../../../gcc/intl/gettextP.h:51: warning: `SWAP' defined but not used
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DGNULOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale:.\" -DHAVE_CONFIG_H -I.. -I. -I../../../gcc -I../../../gcc/intl -I../../../gcc/config -g -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long ../../../gcc/intl/dcgettext.c
../../../gcc/intl/dcgettext.c:52: warning: function declaration isn't a prototype
../../../gcc/intl/dcgettext.c:56: warning: function declaration isn't a prototype
In file included from ../../../gcc/intl/dcgettext.c:85:
../../../gcc/intl/hash-string.h:38: warning: ANSI does not permit the keyword `inline'
../../../gcc/intl/dcgettext.c:99: warning: function declaration isn't a prototype
../../../gcc/intl/dcgettext.c: In function `guess_category_value':
../../../gcc/intl/dcgettext.c:545: warning: unused parameter `category'
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DGNULOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale:.\" -DHAVE_CONFIG_H -I.. -I. -I../../../gcc -I../../../gcc/intl -I../../../gcc/config -g -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long ../../../gcc/intl/dgettext.c
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DGNULOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale:.\" -DHAVE_CONFIG_H -I.. -I. -I../../../gcc -I../../../gcc/intl -I../../../gcc/config -g -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long ../../../gcc/intl/gettext.c
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DGNULOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale:.\" -DHAVE_CONFIG_H -I.. -I. -I../../../gcc -I../../../gcc/intl -I../../../gcc/config -g -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long ../../../gcc/intl/finddomain.c
../../../gcc/intl/finddomain.c:34: warning: function declaration isn't a prototype
../../../gcc/intl/finddomain.c: In function `_nl_find_domain':
../../../gcc/intl/finddomain.c:152: warning: implicit declaration of function `malloc'
../../../gcc/intl/finddomain.c: At top level:
../../../gcc/intl/gettextP.h:51: warning: `SWAP' defined but not used
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DGNULOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale:.\" -DHAVE_CONFIG_H -I.. -I. -I../../../gcc -I../../../gcc/intl -I../../../gcc/config -g -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long ../../../gcc/intl/loadmsgcat.c
../../../gcc/intl/loadmsgcat.c: In function `_nl_load_domain':
../../../gcc/intl/loadmsgcat.c:95: warning: comparison between signed and unsigned
../../../gcc/intl/loadmsgcat.c:98: warning: implicit declaration of function `close'
../../../gcc/intl/loadmsgcat.c:124: warning: implicit declaration of function `malloc'
../../../gcc/intl/loadmsgcat.c:132: warning: implicit declaration of function `read'
../../../gcc/intl/loadmsgcat.c:135: warning: function `close' was previously declared within a block
../../../gcc/intl/loadmsgcat.c:144: warning: function `close' was previously declared within a block
../../../gcc/intl/loadmsgcat.c:149: warning: integer constant is unsigned in ANSI C, signed with -traditional
../../../gcc/intl/loadmsgcat.c:149: warning: integer constant is unsigned in ANSI C, signed with -traditional
../../../gcc/intl/loadmsgcat.c:158: warning: implicit declaration of function `free'
../../../gcc/intl/loadmsgcat.c:163: warning: function `malloc' was previously declared within a block
../../../gcc/intl/loadmsgcat.c:174: warning: integer constant is unsigned in ANSI C, signed with -traditional
../../../gcc/intl/loadmsgcat.c:197: warning: function `free' was previously declared within a block
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DGNULOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale:.\" -DHAVE_CONFIG_H -I.. -I. -I../../../gcc -I../../../gcc/intl -I../../../gcc/config -g -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long ../../../gcc/intl/localealias.c
../../../gcc/intl/localealias.c:47: warning: function declaration isn't a prototype
../../../gcc/intl/localealias.c:51: warning: function declaration isn't a prototype
../../../gcc/intl/localealias.c: In function `_nl_expand_alias':
../../../gcc/intl/localealias.c:172: warning: implicit declaration of function `bsearch'
../../../gcc/intl/localealias.c: In function `read_alias_file':
../../../gcc/intl/localealias.c:258: warning: pointer targets in passing arg 1 of `fgets' differ in signedness
../../../gcc/intl/localealias.c:264: warning: pointer targets in passing arg 1 of `index' differ in signedness
../../../gcc/intl/localealias.c:317: warning: pointer targets in passing arg 1 of `strlen' differ in signedness
../../../gcc/intl/localealias.c:318: warning: pointer targets in passing arg 1 of `strlen' differ in signedness
../../../gcc/intl/localealias.c:326: warning: implicit declaration of function `realloc'
../../../gcc/intl/localealias.c:355: warning: implicit declaration of function `qsort'
../../../gcc/intl/localealias.c: In function `extend_alias_table':
../../../gcc/intl/localealias.c:370: warning: function `realloc' was previously declared within a block
../../../gcc/intl/localealias.c: At top level:
../../../gcc/intl/gettextP.h:51: warning: `SWAP' defined but not used
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DGNULOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale:.\" -DHAVE_CONFIG_H -I.. -I. -I../../../gcc -I../../../gcc/intl -I../../../gcc/config -g -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long ../../../gcc/intl/textdomain.c
../../../gcc/intl/textdomain.c: In function `textdomain__':
../../../gcc/intl/textdomain.c:92: warning: implicit declaration of function `malloc'
../../../gcc/intl/textdomain.c:100: warning: implicit declaration of function `free'
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DGNULOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale:.\" -DHAVE_CONFIG_H -I.. -I. -I../../../gcc -I../../../gcc/intl -I../../../gcc/config -g -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long ../../../gcc/intl/l10nflist.c
../../../gcc/intl/l10nflist.c:157: warning: ANSI does not permit the keyword `inline'
../../../gcc/intl/l10nflist.c: In function `_nl_make_l10nflist':
../../../gcc/intl/l10nflist.c:198: warning: implicit declaration of function `malloc'
../../../gcc/intl/l10nflist.c:296: warning: implicit declaration of function `free'
../../../gcc/intl/l10nflist.c: In function `_nl_normalize_codeset':
../../../gcc/intl/l10nflist.c:373: warning: function `malloc' was previously declared within a block
gcc -c -DLOCALEDIR=\"/usr/local/share/locale\" -DGNULOCALEDIR=\"/usr/local/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/local/share/locale:.\" -DHAVE_CONFIG_H -I.. -I. -I../../../gcc -I../../../gcc/intl -I../../../gcc/config -g -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long ../../../gcc/intl/explodename.c
../../../gcc/intl/explodename.c: In function `_nl_explode_name':
../../../gcc/intl/explodename.c:112: warning: pointer targets in passing arg 1 of `_nl_normalize_codeset' differ in signedness
../../../gcc/intl/explodename.c:114: warning: implicit declaration of function `free'
rm -f libintl.a
ar cru libintl.a intl-compat.o bindtextdom.o dcgettext.o dgettext.o gettext.o finddomain.o loadmsgcat.o localealias.o textdomain.o l10nflist.o explodename.o
ranlib libintl.a
make[4]: Leaving directory `/xxx/gnu/gcc-2.96/objdir/gcc/intl'