diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-04-19 00:37:44 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-04-19 00:37:44 +0000 |
commit | b459976e27aee31b9be3b31cb6c95f35226f1a57 (patch) | |
tree | edf941bf30502ce53a4d23da6146e758c0960b23 /iconv/skeleton.c | |
parent | d648d845b476e7638567b53590b8c1979507b3f3 (diff) | |
download | glibc-b459976e27aee31b9be3b31cb6c95f35226f1a57.tar glibc-b459976e27aee31b9be3b31cb6c95f35226f1a57.tar.gz glibc-b459976e27aee31b9be3b31cb6c95f35226f1a57.tar.bz2 glibc-b459976e27aee31b9be3b31cb6c95f35226f1a57.zip |
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.
Diffstat (limited to 'iconv/skeleton.c')
-rw-r--r-- | iconv/skeleton.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/iconv/skeleton.c b/iconv/skeleton.c index a42c02807a..9a609c972e 100644 --- a/iconv/skeleton.c +++ b/iconv/skeleton.c @@ -1,5 +1,5 @@ /* 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. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -193,15 +193,20 @@ static int to_object; character set we can define RESET_INPUT_BUFFER in a very fast way. */ #if !defined RESET_INPUT_BUFFER && !defined SAVE_RESET_STATE # 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 - (outbuf - outerr) is always divisible by MIN_NEEDED_TO. */ -# 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 +/* We have to use these `#if's here since the compiler cannot know that + (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 \ + *inptrp -= ((outbuf - outerr) / MIN_NEEDED_TO) * MIN_NEEDED_FROM +# endif # endif #endif |