mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-18 14:40:06 +00:00
Update.
* iconv/skeleton.c (RESET_INPUT_BUFFER): Replace ifs with #ifs to avoid compiler warnings. * locale/programs/localedef.c (main): Always call construct_output_path.
This commit is contained in:
parent
d648d845b4
commit
b459976e27
@ -1,5 +1,11 @@
|
|||||||
2002-04-18 Ulrich Drepper <drepper@redhat.com>
|
2002-04-18 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* iconv/skeleton.c (RESET_INPUT_BUFFER): Replace ifs with #ifs to
|
||||||
|
avoid compiler warnings.
|
||||||
|
|
||||||
|
* locale/programs/localedef.c (main): Always call
|
||||||
|
construct_output_path.
|
||||||
|
|
||||||
* iconv/Makefile (CFLAGS-simple-hash.c): Define to find hashval.h.
|
* iconv/Makefile (CFLAGS-simple-hash.c): Define to find hashval.h.
|
||||||
|
|
||||||
* locale/programs/locfile.c (to_archive): New variable. To collect
|
* locale/programs/locfile.c (to_archive): New variable. To collect
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Skeleton for a conversion module.
|
/* Skeleton for a conversion module.
|
||||||
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||||
|
|
||||||
@ -193,16 +193,21 @@ static int to_object;
|
|||||||
character set we can define RESET_INPUT_BUFFER in a very fast way. */
|
character set we can define RESET_INPUT_BUFFER in a very fast way. */
|
||||||
#if !defined RESET_INPUT_BUFFER && !defined SAVE_RESET_STATE
|
#if !defined RESET_INPUT_BUFFER && !defined SAVE_RESET_STATE
|
||||||
# if MIN_NEEDED_FROM == MAX_NEEDED_FROM && MIN_NEEDED_TO == MAX_NEEDED_TO
|
# if MIN_NEEDED_FROM == MAX_NEEDED_FROM && MIN_NEEDED_TO == MAX_NEEDED_TO
|
||||||
/* We have to use these `if's here since the compiler cannot know that
|
/* We have to use these `#if's here since the compiler cannot know that
|
||||||
(outbuf - outerr) is always divisible by MIN_NEEDED_TO. */
|
(outbuf - outerr) is always divisible by MIN_NEEDED_TO. We have to
|
||||||
|
use preprocessor arithmetic and no C code because gcc 3.2 complains
|
||||||
|
about division by zero even in obviously dead code. */
|
||||||
|
# if MIN_NEEDED_FROM % MIN_NEEDED_TO == 0
|
||||||
|
# define RESET_INPUT_BUFFER \
|
||||||
|
*inptrp -= (outbuf - outerr) * (MIN_NEEDED_FROM / MIN_NEEDED_TO)
|
||||||
|
# elif MIN_NEEDED_TO % MIN_NEEDED_FROM == 0
|
||||||
|
# define RESET_INPUT_BUFFER \
|
||||||
|
*inptrp -= (outbuf - outerr) / (MIN_NEEDED_TO / MIN_NEEDED_FROM)
|
||||||
|
# else
|
||||||
# define RESET_INPUT_BUFFER \
|
# define RESET_INPUT_BUFFER \
|
||||||
if (MIN_NEEDED_FROM % MIN_NEEDED_TO == 0) \
|
|
||||||
*inptrp -= (outbuf - outerr) * (MIN_NEEDED_FROM / MIN_NEEDED_TO); \
|
|
||||||
else if (MIN_NEEDED_TO % MIN_NEEDED_FROM == 0) \
|
|
||||||
*inptrp -= (outbuf - outerr) / (MIN_NEEDED_TO / MIN_NEEDED_FROM); \
|
|
||||||
else \
|
|
||||||
*inptrp -= ((outbuf - outerr) / MIN_NEEDED_TO) * MIN_NEEDED_FROM
|
*inptrp -= ((outbuf - outerr) / MIN_NEEDED_TO) * MIN_NEEDED_FROM
|
||||||
# endif
|
# endif
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -223,18 +223,10 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
/* The parameter describes the output path of the constructed files.
|
/* The parameter describes the output path of the constructed files.
|
||||||
If the described files cannot be written return a NULL pointer. */
|
If the described files cannot be written return a NULL pointer. */
|
||||||
if (no_archive)
|
|
||||||
{
|
|
||||||
output_path = construct_output_path (argv[remaining]);
|
output_path = construct_output_path (argv[remaining]);
|
||||||
if (output_path == NULL)
|
if (output_path == NULL && ! no_archive)
|
||||||
error (4, errno, _("cannot create directory for output files"));
|
error (4, errno, _("cannot create directory for output files"));
|
||||||
cannot_write_why = errno;
|
cannot_write_why = errno;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
output_path = NULL;
|
|
||||||
cannot_write_why = 0; /* Just to shut the compiler up. */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Now that the parameters are processed we have to reset the local
|
/* Now that the parameters are processed we have to reset the local
|
||||||
ctype locale. (P1003.2 4.35.5.2) */
|
ctype locale. (P1003.2 4.35.5.2) */
|
||||||
|
Loading…
Reference in New Issue
Block a user