summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-04-18 16:19:10 -0700
committerDavid S. Miller <davem@davemloft.net>2012-04-18 16:19:10 -0700
commit50f81fd74b78d407477b9b39c2034c87471b6cef (patch)
tree9c55958e4b975f413cc8a00c09595fdd91101b04
parent8ff41c4601f8b8d7dfa6682f596dc4071823424d (diff)
downloadglibc-50f81fd74b78d407477b9b39c2034c87471b6cef.tar.gz
glibc-50f81fd74b78d407477b9b39c2034c87471b6cef.tar.xz
glibc-50f81fd74b78d407477b9b39c2034c87471b6cef.zip
Remove all traces of reg_char.
	* sysdeps/generic/memcopy.h (reg_char): Delete.
	* debug/strcat_chk.c: Use char, not reg_char.
	* debug/strcpy_chk.c: Likewise.
	* debug/strncat_chk.c: Likewise.
	* debug/strncpy_chk.c: Likewise.
	* string/memchr.c: Likewise.
	* string/memrchr.c: Likewise.
	* string/rawmemchr.c: Likewise.
	* string/strcat.c: Likewise.
	* string/strchr.c: Likewise.
	* string/strchrnul.c: Likewise.
	* string/strcmp.c: Likewise.
	* string/strcpy.c: Likewise.
	* string/strncat.c: Likewise.
	* string/strncmp.c: Likewise.
	* string/strncpy.c: Likewise.
-rw-r--r--ChangeLog19
-rw-r--r--debug/strcat_chk.c2
-rw-r--r--debug/strcpy_chk.c2
-rw-r--r--debug/strncat_chk.c2
-rw-r--r--debug/strncpy_chk.c2
-rw-r--r--string/memchr.c4
-rw-r--r--string/memrchr.c4
-rw-r--r--string/rawmemchr.c4
-rw-r--r--string/strcat.c2
-rw-r--r--string/strchr.c2
-rw-r--r--string/strchrnul.c2
-rw-r--r--string/strcmp.c2
-rw-r--r--string/strcpy.c2
-rw-r--r--string/strncat.c4
-rw-r--r--string/strncmp.c4
-rw-r--r--string/strncpy.c2
-rw-r--r--sysdeps/generic/memcopy.h3
17 files changed, 35 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index 42508769a5..db02f02308 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2012-04-18  David S. Miller  <davem@davemloft.net>
+
+	* sysdeps/generic/memcopy.h (reg_char): Delete.
+	* debug/strcat_chk.c: Use char, not reg_char.
+	* debug/strcpy_chk.c: Likewise.
+	* debug/strncat_chk.c: Likewise.
+	* debug/strncpy_chk.c: Likewise.
+	* string/memchr.c: Likewise.
+	* string/memrchr.c: Likewise.
+	* string/rawmemchr.c: Likewise.
+	* string/strcat.c: Likewise.
+	* string/strchr.c: Likewise.
+	* string/strchrnul.c: Likewise.
+	* string/strcmp.c: Likewise.
+	* string/strcpy.c: Likewise.
+	* string/strncat.c: Likewise.
+	* string/strncmp.c: Likewise.
+	* string/strncpy.c: Likewise.
+
 2012-04-18  Will Schmidt  <will_schmidt@vnet.ibm.com>
 
 	* sysdeps/powerpc/memmove.c: New file based on string/memmove.c where
diff --git a/debug/strcat_chk.c b/debug/strcat_chk.c
index c930caaf0f..8f842ee855 100644
--- a/debug/strcat_chk.c
+++ b/debug/strcat_chk.c
@@ -28,7 +28,7 @@ __strcat_chk (dest, src, destlen)
 {
   char *s1 = dest;
   const char *s2 = src;
-  reg_char c;
+  char c;
 
   /* Find the end of the string.  */
   do
diff --git a/debug/strcpy_chk.c b/debug/strcpy_chk.c
index e867754d4a..ee22b11cd3 100644
--- a/debug/strcpy_chk.c
+++ b/debug/strcpy_chk.c
@@ -28,7 +28,7 @@ __strcpy_chk (dest, src, destlen)
      const char *src;
      size_t destlen;
 {
-  reg_char c;
+  char c;
   char *s = (char *) src;
   const ptrdiff_t off = dest - s;
 
diff --git a/debug/strncat_chk.c b/debug/strncat_chk.c
index c88034dc4b..c269331543 100644
--- a/debug/strncat_chk.c
+++ b/debug/strncat_chk.c
@@ -27,7 +27,7 @@ __strncat_chk (s1, s2, n, s1len)
      size_t n;
      size_t s1len;
 {
-  reg_char c;
+  char c;
   char *s = s1;
 
   /* Find the end of S1.  */
diff --git a/debug/strncpy_chk.c b/debug/strncpy_chk.c
index 674d16033b..e34c1e5d67 100644
--- a/debug/strncpy_chk.c
+++ b/debug/strncpy_chk.c
@@ -26,7 +26,7 @@ __strncpy_chk (s1, s2, n, s1len)
      size_t n;
      size_t s1len;
 {
-  reg_char c;
+  char c;
   char *s = s1;
 
   if (__builtin_expect (s1len < n, 0))
diff --git a/string/memchr.c b/string/memchr.c
index 7de21a6acc..22637cf3a5 100644
--- a/string/memchr.c
+++ b/string/memchr.c
@@ -30,8 +30,6 @@
 #if defined _LIBC
 # include <string.h>
 # include <memcopy.h>
-#else
-# define reg_char char
 #endif
 
 #if HAVE_STDLIB_H || defined _LIBC
@@ -68,7 +66,7 @@ __memchr (s, c_in, n)
   const unsigned char *char_ptr;
   const unsigned long int *longword_ptr;
   unsigned long int longword, magic_bits, charmask;
-  unsigned reg_char c;
+  unsigned char c;
 
   c = (unsigned char) c_in;
 
diff --git a/string/memrchr.c b/string/memrchr.c
index 5a83a4a9c9..2826f13056 100644
--- a/string/memrchr.c
+++ b/string/memrchr.c
@@ -33,8 +33,6 @@
 #if defined _LIBC
 # include <string.h>
 # include <memcopy.h>
-#else
-# define reg_char char
 #endif
 
 #if defined HAVE_LIMITS_H || defined _LIBC
@@ -71,7 +69,7 @@ MEMRCHR
   const unsigned char *char_ptr;
   const unsigned long int *longword_ptr;
   unsigned long int longword, magic_bits, charmask;
-  unsigned reg_char c;
+  unsigned char c;
 
   c = (unsigned char) c_in;
 
diff --git a/string/rawmemchr.c b/string/rawmemchr.c
index e92e1b491c..90e8c7cb0b 100644
--- a/string/rawmemchr.c
+++ b/string/rawmemchr.c
@@ -31,8 +31,6 @@
 # include <string.h>
 # include <memcopy.h>
 # include <stdlib.h>
-#else
-# define reg_char char
 #endif
 
 #if defined (HAVE_LIMITS_H) || defined (_LIBC)
@@ -59,7 +57,7 @@ __rawmemchr (s, c_in)
   const unsigned char *char_ptr;
   const unsigned long int *longword_ptr;
   unsigned long int longword, magic_bits, charmask;
-  unsigned reg_char c;
+  unsigned char c;
 
   c = (unsigned char) c_in;
 
diff --git a/string/strcat.c b/string/strcat.c
index 3967fa82d7..f9e4bc682d 100644
--- a/string/strcat.c
+++ b/string/strcat.c
@@ -28,7 +28,7 @@ strcat (dest, src)
 {
   char *s1 = dest;
   const char *s2 = src;
-  reg_char c;
+  char c;
 
   /* Find the end of the string.  */
   do
diff --git a/string/strchr.c b/string/strchr.c
index 3d44958478..9d18b7eeb9 100644
--- a/string/strchr.c
+++ b/string/strchr.c
@@ -36,7 +36,7 @@ strchr (s, c_in)
   const unsigned char *char_ptr;
   const unsigned long int *longword_ptr;
   unsigned long int longword, magic_bits, charmask;
-  unsigned reg_char c;
+  unsigned char c;
 
   c = (unsigned char) c_in;
 
diff --git a/string/strchrnul.c b/string/strchrnul.c
index 523a72f3f8..0db5e23fa8 100644
--- a/string/strchrnul.c
+++ b/string/strchrnul.c
@@ -36,7 +36,7 @@ __strchrnul (s, c_in)
   const unsigned char *char_ptr;
   const unsigned long int *longword_ptr;
   unsigned long int longword, magic_bits, charmask;
-  unsigned reg_char c;
+  unsigned char c;
 
   c = (unsigned char) c_in;
 
diff --git a/string/strcmp.c b/string/strcmp.c
index e9b24c9512..8229d7c773 100644
--- a/string/strcmp.c
+++ b/string/strcmp.c
@@ -30,7 +30,7 @@ strcmp (p1, p2)
 {
   register const unsigned char *s1 = (const unsigned char *) p1;
   register const unsigned char *s2 = (const unsigned char *) p2;
-  unsigned reg_char c1, c2;
+  unsigned char c1, c2;
 
   do
     {
diff --git a/string/strcpy.c b/string/strcpy.c
index f565f34fcf..acc580ba3e 100644
--- a/string/strcpy.c
+++ b/string/strcpy.c
@@ -28,7 +28,7 @@ strcpy (dest, src)
      char *dest;
      const char *src;
 {
-  reg_char c;
+  char c;
   char *__unbounded s = (char *__unbounded) CHECK_BOUNDS_LOW (src);
   const ptrdiff_t off = CHECK_BOUNDS_LOW (dest) - s - 1;
   size_t n;
diff --git a/string/strncat.c b/string/strncat.c
index dceadb206a..dcfb04d6c6 100644
--- a/string/strncat.c
+++ b/string/strncat.c
@@ -19,8 +19,6 @@
 
 #ifdef _LIBC
 # include <memcopy.h>
-#else
-typedef char reg_char;
 #endif
 
 #ifndef STRNCAT
@@ -31,7 +29,7 @@ typedef char reg_char;
 char *
 STRNCAT (char *s1, const char *s2, size_t n)
 {
-  reg_char c;
+  char c;
   char *s = s1;
 
   /* Find the end of S1.  */
diff --git a/string/strncmp.c b/string/strncmp.c
index f586d592e6..d79305a871 100644
--- a/string/strncmp.c
+++ b/string/strncmp.c
@@ -31,8 +31,8 @@
 int
 STRNCMP (const char *s1, const char *s2, size_t n)
 {
-  unsigned reg_char c1 = '\0';
-  unsigned reg_char c2 = '\0';
+  unsigned char c1 = '\0';
+  unsigned char c2 = '\0';
 
   if (n >= 4)
     {
diff --git a/string/strncpy.c b/string/strncpy.c
index f6ee27832d..19d501e06b 100644
--- a/string/strncpy.c
+++ b/string/strncpy.c
@@ -27,7 +27,7 @@
 char *
 STRNCPY (char *s1, const char *s2, size_t n)
 {
-  reg_char c;
+  char c;
   char *s = s1;
 
   --s1;
diff --git a/sysdeps/generic/memcopy.h b/sysdeps/generic/memcopy.h
index ad28466821..a8e5a44fe5 100644
--- a/sysdeps/generic/memcopy.h
+++ b/sysdeps/generic/memcopy.h
@@ -61,9 +61,6 @@
 /* Type to use for unaligned operations.  */
 typedef unsigned char byte;
 
-/* Optimal type for storing bytes in registers.  */
-#define	reg_char	char
-
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 #define MERGE(w0, sh_1, w1, sh_2) (((w0) >> (sh_1)) | ((w1) << (sh_2)))
 #endif