summaryrefslogtreecommitdiff
path: root/iconv/skeleton.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-03-31 04:10:36 +0000
committerUlrich Drepper <drepper@redhat.com>2000-03-31 04:10:36 +0000
commitfdf6455589d64544330b708655073b6886d53dfc (patch)
tree5fbab9cb5fad1d45f4982697f59d09573d599dfd /iconv/skeleton.c
parent99a7e0656c055080cac8d56a8af9df39609e4782 (diff)
downloadglibc-fdf6455589d64544330b708655073b6886d53dfc.tar.gz
Update.
2000-03-30 Ulrich Drepper <drepper@redhat.com> * iconv/skeleton.c: Avoid compiling unaligned versions in some with size of dynamic sectionmore cases. * iconv/loop.c: Likewise.
Diffstat (limited to 'iconv/skeleton.c')
-rw-r--r--iconv/skeleton.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/iconv/skeleton.c b/iconv/skeleton.c
index dfd067e05a..52c67a2cb9 100644
--- a/iconv/skeleton.c
+++ b/iconv/skeleton.c
@@ -297,7 +297,9 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
unsigned char *outbuf = data->__outbuf;
unsigned char *outend = data->__outbufend;
unsigned char *outstart;
-#ifdef _STRING_ARCH_unaligned
+#if defined _STRING_ARCH_unaligned \
+ || MIN_NEEDED_FROM == 1 || MAX_NEEDED_FROM % MIN_NEEDED_FROM != 0 \
+ || MIN_NEEDED_TO == 1 || MAX_NEEDED_TO % MIN_NEEDED_TO != 0
# define unaligned 0
#else
/* The following assumes that encodings, which have a variable length
@@ -308,19 +310,13 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
int unaligned;
unaligned = ((FROM_DIRECTION
- && ((MIN_NEEDED_FROM > 1
- && MAX_NEEDED_FROM % MIN_NEEDED_FROM == 0
- && (uintptr_t) inptr % MIN_NEEDED_FROM != 0)
- || (MIN_NEEDED_TO > 1
- && MAX_NEEDED_TO % MIN_NEEDED_TO == 0
+ && ((uintptr_t) inptr % MIN_NEEDED_FROM != 0
+ || (data->__is_last
&& (uintptr_t) outbuf % MIN_NEEDED_TO != 0)))
|| (!FROM_DIRECTION
- && ((MIN_NEEDED_FROM > 1
- && MAX_NEEDED_FROM % MIN_NEEDED_FROM == 0
+ && ((data->__is_last
&& (uintptr_t) outbuf % MIN_NEEDED_FROM != 0)
- || (MIN_NEEDED_TO > 1
- && MAX_NEEDED_TO % MIN_NEEDED_TO == 0
- && (uintptr_t) inptr % MIN_NEEDED_TO != 0))));
+ || (uintptr_t) inptr % MIN_NEEDED_TO != 0)));
# define GEN_unaligned(name) GEN_unaligned2 (name)
# define GEN_unaligned2(name) name##_unaligned
#endif