summaryrefslogtreecommitdiff
path: root/gcc/intl
diff options
context:
space:
mode:
authorPhilipp Thomas <pthomas@suse.de>2000-06-06 07:23:42 +0000
committerPhilipp Thomas <pthomas@gcc.gnu.org>2000-06-06 07:23:42 +0000
commit603832a03e9a6e270400e413fca78bb4205cb456 (patch)
tree4e523690464052c2689436ad3bd3941b891bbc36 /gcc/intl
parentf519a4527d3c69dc0f03b10c5c98be6799a913eb (diff)
downloadgcc-603832a03e9a6e270400e413fca78bb4205cb456.tar.gz
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
Diffstat (limited to 'gcc/intl')
-rw-r--r--gcc/intl/ChangeLog16
-rw-r--r--gcc/intl/Makefile.in5
-rw-r--r--gcc/intl/dcgettext.c9
-rw-r--r--gcc/intl/explodename.c5
-rw-r--r--gcc/intl/l10nflist.c6
-rw-r--r--gcc/intl/loadmsgcat.c2
-rw-r--r--gcc/intl/localealias.c26
7 files changed, 42 insertions, 27 deletions
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 <pthomas@suse.de>
+ * 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 <drepper@cygnus.com>
* 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 <config.h>
#endif
+# ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+# endif
+
#include <sys/types.h>
#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 <string.h>
#else
# include <strings.h>
@@ -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 <config.h>
#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 <string.h>
#else
# include <strings.h>
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 <config.h>
#endif
+# ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+# endif
+
#include <ctype.h>
#include <stdio.h>
#include <sys/types.h>
@@ -53,9 +57,6 @@ void free ();
#endif
#if defined HAVE_STRING_H || defined _LIBC
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-# endif
# include <string.h>
#else
# include <strings.h>
@@ -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;