[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r11624 - in /fsf/trunk/ports: ChangeLog.alpha sysdeps/alpha/memchr.c



Author: eglibc
Date: Mon Sep 27 00:03:19 2010
New Revision: 11624

Log:
Import glibc-ports-mainline for 2010-09-27

Modified:
    fsf/trunk/ports/ChangeLog.alpha
    fsf/trunk/ports/sysdeps/alpha/memchr.c

Modified: fsf/trunk/ports/ChangeLog.alpha
==============================================================================
--- fsf/trunk/ports/ChangeLog.alpha (original)
+++ fsf/trunk/ports/ChangeLog.alpha Mon Sep 27 00:03:19 2010
@@ -1,3 +1,8 @@
+2010-09-26  Michael Cree  <mcree@xxxxxxxxxxxx>
+
+	* sysdeps/alpha/memchr.c: Include <bp-sym.h>
+	(__memchr): Add casts for integer arithmetic on pointers.
+
 2010-09-23  Richard Henderson  <rth@xxxxxxxxxx>
 
 	[BZ #12019]

Modified: fsf/trunk/ports/sysdeps/alpha/memchr.c
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/memchr.c (original)
+++ fsf/trunk/ports/sysdeps/alpha/memchr.c Mon Sep 27 00:03:19 2010
@@ -17,6 +17,7 @@
    02111-1307 USA.  */
 
 #include <string.h>
+#include <bp-sym.h>
 
 typedef unsigned long word;
 
@@ -53,11 +54,11 @@
 
   /* 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.  */