diff options
author | Philipp Thomas <pthomas@suse.de> | 2000-06-06 07:23:42 +0000 |
---|---|---|
committer | Philipp Thomas <pthomas@gcc.gnu.org> | 2000-06-06 07:23:42 +0000 |
commit | 603832a03e9a6e270400e413fca78bb4205cb456 (patch) | |
tree | 4e523690464052c2689436ad3bd3941b891bbc36 /gcc/intl/localealias.c | |
parent | f519a4527d3c69dc0f03b10c5c98be6799a913eb (diff) | |
download | gcc-603832a03e9a6e270400e413fca78bb4205cb456.zip gcc-603832a03e9a6e270400e413fca78bb4205cb456.tar.gz gcc-603832a03e9a6e270400e413fca78bb4205cb456.tar.bz2 |
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/localealias.c')
-rw-r--r-- | gcc/intl/localealias.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/gcc/intl/localealias.c b/gcc/intl/localealias.c index bca555a..7c2f6cc 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; |