From 603832a03e9a6e270400e413fca78bb4205cb456 Mon Sep 17 00:00:00 2001 From: Philipp Thomas Date: Tue, 6 Jun 2000 07:23:42 +0000 Subject: [PATCH] configure.in (AC_C_INLINE): Added. gcc/: * configure.in (AC_C_INLINE): Added. * configure: Regenerate. gcc/java: * Makefile.in (INTLLIBS): New. (LIBS): Add above. (DEPLIBS): Ditto. gcc/f: * Makefile.in(INTLLIBS): New macro. (LIBS): Add INTLLIBS. (DEPLIBS): Likewise. gcc/ch: * Makefile.in: Changed to be processed by configure. (INTLLIBS): New macro. (LIBS): Add INTLLIBS. (DEPLIBS): Likewise. * config-lang(outputs): Specify ch/Makefile. gcc/po: * Makefile.in.in: Add --define switch for xgettext. gcc/intl: * Makefile.in: Add -DIN_GCC to DEFS, add appropriate -I switches. * dcgettext.c: Define _GNU_SOURCE before any system header is included. Guard getcwd declaration with HAVE_DECL_GETCWD. * loadmsgcat.c (_nl_load_domain): Cast st.st_size in compaison to size_t. * localealias.c: Define _GNU_SOURCE before any system header is included. Don't use return value of memcpy because it could be a macro defined in terms of bcopy. (read_alias_file): Remove HAVE_MEMCPY guard and just don't use the return value of memcpy. Cast argument to fgets and strlen to char *. * explodename.c (_nl_explode_name): Cast codeset to unsigned char ** in call to _nl_normalize_codeset. * l10nflist.c: Define _GNU_SOURCE before any system header is included. From-SVN: r34423 --- gcc/ch/ChangeLog | 7 +++++++ gcc/ch/Makefile.in | 31 ++++++++++++++++++++++--------- gcc/ch/config-lang.in | 3 +++ gcc/configure.in | 2 ++ gcc/f/ChangeLog | 6 ++++++ gcc/f/Makefile.in | 10 ++++++++-- gcc/intl/ChangeLog | 16 ++++++++++++++++ gcc/intl/Makefile.in | 5 +++-- gcc/intl/dcgettext.c | 9 +++++---- gcc/intl/explodename.c | 5 +++-- gcc/intl/l10nflist.c | 6 +++--- gcc/intl/loadmsgcat.c | 2 +- gcc/intl/localealias.c | 26 +++++++++++--------------- gcc/java/ChangeLog | 6 ++++++ gcc/java/Make-lang.in | 2 ++ gcc/java/Makefile.in | 10 ++++++++-- gcc/po/ChangeLog | 4 ++++ gcc/po/Makefile.in.in | 2 +- 18 files changed, 111 insertions(+), 41 deletions(-) diff --git a/gcc/ch/ChangeLog b/gcc/ch/ChangeLog index 708cba3acdb..18e04ff4991 100644 --- a/gcc/ch/ChangeLog +++ b/gcc/ch/ChangeLog @@ -1,3 +1,10 @@ +2000-06-04 Philipp Thomas + + * Makefile.in(INTLLIBS): New macro. + (LIBS): Add INTLLIBS. + (DEPLIBS): Likewise. + * config-lang(outputs): Specify ch/Makefile. + Sat Jun 3 15:31:07 2000 Jeffrey A Law (law@cygnus.com) * chill.texi (INFO-DIR-ENTRY): Fix chill entry. diff --git a/gcc/ch/Makefile.in b/gcc/ch/Makefile.in index 7e9e229f769..65a2aa35fc6 100644 --- a/gcc/ch/Makefile.in +++ b/gcc/ch/Makefile.in @@ -54,7 +54,7 @@ T_CFLAGS = X_CPPFLAGS = T_CPPFLAGS = -CC = cc +CC = @CC@ AR = ar AR_FLAGS = rc SHELL = /bin/sh @@ -81,18 +81,25 @@ GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) program_transform_name = objdir = . -target= ... `configure' substitutes actual target name here. -xmake_file= ... `configure' substitutes actual x- file name here. -tmake_file= ... `configure' substitutes actual t- file name here. +target=@target@ +xmake_file=@dep_host_xmake_file@ +tmake_file=@dep_tmake_file@ #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c` #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c` # Directory where sources are, from where we are. -srcdir = . +srcdir = @srcdir@ +VPATH = @srcdir@ # CYGNUS LOCAL # Directory where texinfo.tex lives -texidir = $(srcdir)/../../texinfo +# texidir = $(srcdir)/../../texinfo + +# Top build directory, relative to here. +top_builddir = .. + +# Internationalization library. +INTLLIBS = @INTLLIBS@ # Additional system libraries to link with. CLIB= @@ -111,17 +118,23 @@ all: all.indirect # sed inserts variable overrides after the following line. ####target overrides +@target_overrides@ ####host overrides +@host_overrides@ ####cross overrides +@cross_defines@ +@cross_overrides@ ####build overrides +@build_overrides@ ####site overrides +# @site_overrides@ # # Now figure out from those variables how to compile and link. all.indirect: Makefile ../chill ../cc1chill$(exeext) # IN_GCC tells obstack.h that we are using gcc's file. -INTERNAL_CFLAGS = $(CROSS) -DIN_GCC +INTERNAL_CFLAGS = $(CROSS) -DIN_GCC @extra_c_flags@ # This is the variable actually used when we compile. ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS) @@ -134,8 +147,8 @@ LIBIBERTY = ../../libiberty/libiberty.a # How to link with both our special library facilities # and the system's installed libraries. -LIBS = $(LIBIBERTY) $(CLIB) -LIBDEPS = $(LIBIBERTY) +LIBS = $(LIBIBERTY) $(CLIB) $(INTLLIBS) +LIBDEPS = $(INTLLIBS) $(LIBIBERTY) # Specify the directories to be searched for header files. # Both . and srcdir are used, in that order, diff --git a/gcc/ch/config-lang.in b/gcc/ch/config-lang.in index 8c9aa95bcaf..1f2ebf68ed3 100644 --- a/gcc/ch/config-lang.in +++ b/gcc/ch/config-lang.in @@ -33,3 +33,6 @@ compilers="cc1chill\$(exeext)" stagestuff="chill chill-cross\$(exeext) cc1chill\$(exeext)" diff_excludes="-x -x ch/chill.info*" + +outputs=ch/Makefile + diff --git a/gcc/configure.in b/gcc/configure.in index 5c12b78da4c..a49d88a1fa7 100644 --- a/gcc/configure.in +++ b/gcc/configure.in @@ -378,6 +378,8 @@ else AC_MSG_RESULT(no) fi +AC_C_INLINE + # Find some useful tools AC_PROG_AWK AC_PROG_LEX diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index a37deecc884..a60d88cfb08 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,9 @@ +2000-06-04 Philipp Thomas + + * Makefile.in(INTLLIBS): New macro. + (LIBS): Add INTLLIBS. + (DEPLIBS): Likewise. + 2000-06-02 Richard Henderson * com.c (lang_get_alias_set): New. diff --git a/gcc/f/Makefile.in b/gcc/f/Makefile.in index 1f93e551c21..301716b3464 100644 --- a/gcc/f/Makefile.in +++ b/gcc/f/Makefile.in @@ -88,6 +88,12 @@ VPATH = @srcdir@ # Additional system libraries to link with. CLIB= +# Top build directory, relative to here. +top_builddir = .. + +# Internationalization library. +INTLLIBS = @INTLLIBS@ + # Choose the real default target. ALL=all @@ -135,8 +141,8 @@ LDFLAGS=$(BOOT_LDFLAGS) # How to link with both our special library facilities # and the system's installed libraries. -LIBS = $(LIBIBERTY) $(CLIB) -LIBDEPS = $(LIBIBERTY) +LIBS = $(LIBIBERTY) $(CLIB) $(INTLLIBS) +LIBDEPS = $(INTLLIBS) $(LIBIBERTY) # Specify the directories to be searched for header files. # Both . and srcdir are used, in that order, diff --git a/gcc/intl/ChangeLog b/gcc/intl/ChangeLog index 198950159da..00452d85c6f 100644 --- a/gcc/intl/ChangeLog +++ b/gcc/intl/ChangeLog @@ -1,3 +1,19 @@ +2000-06-06 Philipp Thomas + * Makefile.in: Add -DIN_GCC to DEFS, add appropriate -I switches. + * dcgettext.c: Define _GNU_SOURCE before any system header is + included. Guard getcwd declaration with HAVE_DECL_GETCWD. + * loadmsgcat.c (_nl_load_domain): Cast st.st_size in compaison to + size_t. + * localealias.c: Define _GNU_SOURCE before any system header is + included. Don't use return value of memcpy because it could be a + macro defined in terms of bcopy. + (read_alias_file): Remove HAVE_MEMCPY guard and just don't use the + return value of memcpy. Cast argument to fgets and strlen to char *. + * explodename.c (_nl_explode_name): Cast codeset to unsigned char ** + in call to _nl_normalize_codeset. + * l10nflist.c: Define _GNU_SOURCE before any system header is + included. + 1998-04-29 Ulrich Drepper * intl/localealias.c (read_alias_file): Use unsigned char for diff --git a/gcc/intl/Makefile.in b/gcc/intl/Makefile.in index 9a877c8ccb7..489adf9ab4e 100644 --- a/gcc/intl/Makefile.in +++ b/gcc/intl/Makefile.in @@ -48,7 +48,7 @@ CC = @CC@ LIBTOOL = @LIBTOOL@ RANLIB = @RANLIB@ -DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \ +DEFS = -DIN_GCC -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \ -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@ CPPFLAGS = @CPPFLAGS@ CFLAGS = @CFLAGS@ @@ -79,7 +79,8 @@ DISTFILES.gettext = libintl.glibc intlh.inst.in .c.lo: $(LIBTOOL) --mode=compile $(COMPILE) $< -INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib +INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib -I$(srcdir)/.. \ +-I$(srcdir)/../config -I$(srcdir)/../../include all: all-@USE_INCLUDED_LIBINTL@ diff --git a/gcc/intl/dcgettext.c b/gcc/intl/dcgettext.c index c4c7a2c7d14..4399b717d54 100644 --- a/gcc/intl/dcgettext.c +++ b/gcc/intl/dcgettext.c @@ -19,6 +19,10 @@ # include #endif +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif + #include #ifdef __GNUC__ @@ -58,9 +62,6 @@ void free (); #endif #if defined HAVE_STRING_H || defined _LIBC -# ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -# endif # include #else # include @@ -98,7 +99,7 @@ void free (); # if !defined HAVE_GETCWD char *getwd (); # define getcwd(buf, max) getwd (buf) -# else +# elif !defined (HAVE_DECL_GETCWD) char *getcwd (); # endif # ifndef HAVE_STPCPY diff --git a/gcc/intl/explodename.c b/gcc/intl/explodename.c index 8066dc29962..5186d1ffd5b 100644 --- a/gcc/intl/explodename.c +++ b/gcc/intl/explodename.c @@ -108,8 +108,9 @@ _nl_explode_name (name, language, modifier, territory, codeset, if (*codeset != cp && (*codeset)[0] != '\0') { - *normalized_codeset = _nl_normalize_codeset (*codeset, - cp - *codeset); + *normalized_codeset = _nl_normalize_codeset ( + *((unsigned char **) codeset), + cp - *codeset); if (strcmp (*codeset, *normalized_codeset) == 0) free ((char *) *normalized_codeset); else diff --git a/gcc/intl/l10nflist.c b/gcc/intl/l10nflist.c index 9c7dc18360f..f02d2186f20 100644 --- a/gcc/intl/l10nflist.c +++ b/gcc/intl/l10nflist.c @@ -20,11 +20,11 @@ # include #endif +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif #if defined HAVE_STRING_H || defined _LIBC -# ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -# endif # include #else # include diff --git a/gcc/intl/loadmsgcat.c b/gcc/intl/loadmsgcat.c index 4dfb687b9f0..f05946e1398 100644 --- a/gcc/intl/loadmsgcat.c +++ b/gcc/intl/loadmsgcat.c @@ -91,7 +91,7 @@ _nl_load_domain (domain_file) /* We must know about the size of the file. */ if (fstat (fd, &st) != 0 - || (size = (size_t) st.st_size) != st.st_size + || (size = (size_t) st.st_size) != (size_t) st.st_size || size < sizeof (struct mo_file_header)) { /* Something went wrong. */ diff --git a/gcc/intl/localealias.c b/gcc/intl/localealias.c index bca555a610f..7c2f6ccb4ce 100644 --- a/gcc/intl/localealias.c +++ b/gcc/intl/localealias.c @@ -20,6 +20,10 @@ # include #endif +# ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +# endif + #include #include #include @@ -53,9 +57,6 @@ void free (); #endif #if defined HAVE_STRING_H || defined _LIBC -# ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -# endif # include #else # include @@ -227,13 +228,8 @@ read_alias_file (fname, fname_len) full_fname = (char *) alloca (fname_len + sizeof aliasfile); ADD_BLOCK (block_list, full_fname); -#ifdef HAVE_MEMPCPY - mempcpy (mempcpy (full_fname, fname, fname_len), - aliasfile, sizeof aliasfile); -#else memcpy (full_fname, fname, fname_len); memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile); -#endif fp = fopen (full_fname, "r"); if (fp == NULL) @@ -255,7 +251,7 @@ read_alias_file (fname, fname_len) unsigned char *value; unsigned char *cp; - if (fgets (buf, sizeof buf, fp) == NULL) + if (fgets ((char *)buf, sizeof buf, fp) == NULL) /* EOF reached. */ break; @@ -314,8 +310,8 @@ read_alias_file (fname, fname_len) if (nmap >= maxmap) extend_alias_table (); - alias_len = strlen (alias) + 1; - value_len = strlen (value) + 1; + alias_len = strlen ((char *)alias) + 1; + value_len = strlen ((char *)value) + 1; if (string_space_act + alias_len + value_len > string_space_max) { @@ -333,12 +329,12 @@ read_alias_file (fname, fname_len) 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; diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index ff312a12bd6..3bb303d3dde 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2000-06-04 Philipp Thomas + + * Makefile.in (INTLLIBS): New. + (LIBS): Add above. + (DEPLIBS): Ditto. + Fri Jun 2 16:48:55 2000 Alexandre Petit-Bianco * class.c (get_dispatch_table): Build the vtable dummy entry list diff --git a/gcc/java/Make-lang.in b/gcc/java/Make-lang.in index 7e72c9e2d75..350398a8a39 100644 --- a/gcc/java/Make-lang.in +++ b/gcc/java/Make-lang.in @@ -110,6 +110,8 @@ GCJH_SOURCES = $(srcdir)/java/gjavah.c $(srcdir)/java/jcf-io.c \ gcjh$(exeext): $(GCJH_SOURCES) $(LIBDEPS) $(TREE_H) cd java && $(MAKE) $(LANG_FLAGS_TO_PASS) $(JAVA_FLAGS_TO_PASS) ../gcjh$(exeext) +$(INTL_TARGETS): $(srcdir)/java/parse.c $(srcdir)/java/parse-scan.c + # This must be kept in sync with dependencies in Makefile.in. JV_SCAN_SOURCES = $(srcdir)/java/parse-scan.y $(srcdir)/java/lex.c \ $(srcdir)/java/parse.h $(srcdir)/java/lex.h $(srcdir)/java/jv-scan.c diff --git a/gcc/java/Makefile.in b/gcc/java/Makefile.in index e5c573cd28f..bbb42d2d2f9 100644 --- a/gcc/java/Makefile.in +++ b/gcc/java/Makefile.in @@ -102,6 +102,12 @@ libgcj_zip = $(datadir)/libgcj.zip # Additional system libraries to link with. CLIB= +# Top build directory, relative to here. +top_builddir = .. + +# Internationalization library. +INTLLIBS = @INTLLIBS@ + # Choose the real default target. ALL=all @@ -144,8 +150,8 @@ LIBIBERTY = ../../libiberty/libiberty.a # How to link with both our special library facilities # and the system's installed libraries. -LIBS = $(LIBIBERTY) $(CLIB) -LIBDEPS = $(LIBIBERTY) ../errors.o +LIBS = $(INTLLIBS) $(LIBIBERTY) $(CLIB) +LIBDEPS = $(INTLLIBS) $(LIBIBERTY) ../errors.o # Specify the directories to be searched for header files. # Both . and srcdir are used, in that order, diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog index d65ee370da2..448adf2ea45 100644 --- a/gcc/po/ChangeLog +++ b/gcc/po/ChangeLog @@ -1,3 +1,7 @@ +2000-06-06 Philipp Thomas + + * Makefile.in.in: Add --define switch for xgettext. + 2000-05-30 Philipp Thomas * Makefile.in.in: Create compiled catalogs in objdir, not diff --git a/gcc/po/Makefile.in.in b/gcc/po/Makefile.in.in index 1a01bb50d5b..a2b0340ecad 100644 --- a/gcc/po/Makefile.in.in +++ b/gcc/po/Makefile.in.in @@ -85,7 +85,7 @@ all-no: $(srcdir)/$(PACKAGE).pot: $(POTFILES) $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \ --add-comments --keyword=_ --keyword=N_ \ - --files-from=$(srcdir)/POTFILES.in \ + --files-from=$(srcdir)/POTFILES.in --defines \ && test ! -f $(PACKAGE).po \ || ( rm -f $(srcdir)/$(PACKAGE).pot \ && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )