diff options
| author | Michael Cree <mcree@orcon.net.nz> | 2010-09-26 21:15:51 +1300 |
|---|---|---|
| committer | Richard Henderson <rth@twiddle.net> | 2010-09-26 11:10:18 -0700 |
| commit | b54f998dc380ce327a7faf2c40e569fb2cf39bf0 (patch) | |
| tree | d78845023d0ebbbacf97dc4ff6ee63820ce517c7 | |
| parent | 539af0feeebbf489fe070c0cb787f9fab77c0d0c (diff) | |
| download | glibc-b54f998dc380ce327a7faf2c40e569fb2cf39bf0.tar.xz glibc-b54f998dc380ce327a7faf2c40e569fb2cf39bf0.zip | |
alpha: Fix compile errors in memchr
Include missing header file and make some casts explicit.
| -rw-r--r-- | sysdeps/alpha/memchr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sysdeps/alpha/memchr.c b/sysdeps/alpha/memchr.c index c52841b69d..7e16f8a17c 100644 --- a/sysdeps/alpha/memchr.c +++ b/sysdeps/alpha/memchr.c @@ -17,6 +17,7 @@ 02111-1307 USA. */ #include <string.h> +#include <bp-sym.h> typedef unsigned long word; @@ -53,11 +54,11 @@ __memchr (const void *s, int xc, size_t n) /* Align the source, and decrement the count by the number of bytes searched in the first word. */ - s_align = (const word *)(s & -8); - n += (s & 7); + s_align = (const word *)((word)s & -8); + n += ((word)s & 7); /* Deal with misalignment in the first word for the comparison. */ - mask = (1ul << (s & 7)) - 1; + mask = (1ul << ((word)s & 7)) - 1; /* If the entire string fits within one word, we may need masking at both the front and the back of the string. */ |
