This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: __mempcpy vs mempcpy
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: dj at redhat dot com
- Cc: Svein dot Seldal at solidas dot com, eager at mvista dot com, gcc at gcc dot gnu dot org
- Date: Fri, 11 Apr 2003 10:42:41 -0400 (EDT)
- Subject: Re: __mempcpy vs mempcpy
- References: References: <3E9618A6.EC536F2F@mvista.com> <200304110206.h3B26ts06042@greed.delorie.com>
> > 2) Should all uses be either mempcpy or __mempcpy?
>
> mempcpy
This patch should fix it, but I don't have access to the platforms in
question or any _LIBC boxes to test it. Can someone regtest it for me?
Assuming that passes, ok for mainline, 3.3 and 3.2?
Thanks,
--Kaveh
2003-04-11 Kaveh R. Ghazi <ghazi at caip dot rutgers dot edu>
gcc:
PR target/10338
PR bootstrap/10198
PR bootstrap/10140
* fixinc/gnu-regex.c (regerror): Use mempcpy not __mempcpy.
libiberty:
PR target/10338
PR bootstrap/10198
PR bootstrap/10140
* getopt.c (exchange, _getopt_initialize): Use mempcpy not
__mempcpy.
* regex.c (regerror): Likewise.
diff -rup orig/egcc-3.2-CVS20030410/gcc/fixinc/gnu-regex.c egcc-3.2-CVS20030410/gcc/fixinc/gnu-regex.c
--- orig/egcc-3.2-CVS20030410/gcc/fixinc/gnu-regex.c Tue Feb 26 19:23:56 2002
+++ egcc-3.2-CVS20030410/gcc/fixinc/gnu-regex.c Fri Apr 11 10:13:19 2003
@@ -5720,7 +5720,7 @@ regerror (errcode, preg, errbuf, errbuf_
if (msg_size > errbuf_size)
{
#if defined HAVE_MEMPCPY || defined _LIBC
- *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
+ *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
#else
memcpy (errbuf, msg, errbuf_size - 1);
errbuf[errbuf_size - 1] = 0;
diff -rup orig/egcc-3.2-CVS20030410/libiberty/getopt.c egcc-3.2-CVS20030410/libiberty/getopt.c
--- orig/egcc-3.2-CVS20030410/libiberty/getopt.c Mon Nov 12 22:46:00 2001
+++ egcc-3.2-CVS20030410/libiberty/getopt.c Fri Apr 11 10:16:41 2003
@@ -333,8 +333,8 @@ exchange (argv)
nonoption_flags_len = nonoption_flags_max_len = 0;
else
{
- memset (__mempcpy (new_str, __getopt_nonoption_flags,
- nonoption_flags_max_len),
+ memset (mempcpy (new_str, __getopt_nonoption_flags,
+ nonoption_flags_max_len),
'\0', top + 1 - nonoption_flags_max_len);
nonoption_flags_max_len = top + 1;
__getopt_nonoption_flags = new_str;
@@ -444,7 +444,7 @@ _getopt_initialize (argc, argv, optstrin
if (__getopt_nonoption_flags == NULL)
nonoption_flags_max_len = -1;
else
- memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
+ memset (mempcpy (__getopt_nonoption_flags, orig_str, len),
'\0', nonoption_flags_max_len - len);
}
}
diff -rup orig/egcc-3.2-CVS20030410/libiberty/regex.c egcc-3.2-CVS20030410/libiberty/regex.c
--- orig/egcc-3.2-CVS20030410/libiberty/regex.c Fri Nov 16 16:54:17 2001
+++ egcc-3.2-CVS20030410/libiberty/regex.c Fri Apr 11 10:15:03 2003
@@ -8256,7 +8256,7 @@ regerror (errcode, preg, errbuf, errbuf_
if (msg_size > errbuf_size)
{
#if defined HAVE_MEMPCPY || defined _LIBC
- *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
+ *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
#else
memcpy (errbuf, msg, errbuf_size - 1);
errbuf[errbuf_size - 1] = 0;