mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-20 06:15:09 +08:00
merge from gcc
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2003-04-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||||
|
|
||||||
|
PR target/10338
|
||||||
|
PR bootstrap/10198
|
||||||
|
PR bootstrap/10140
|
||||||
|
* getopt.c (exchange, _getopt_initialize): Use mempcpy not
|
||||||
|
__mempcpy.
|
||||||
|
* regex.c (regerror): Likewise.
|
||||||
|
|
||||||
2003-04-14 Roger Sayle <roger@eyesopen.com>
|
2003-04-14 Roger Sayle <roger@eyesopen.com>
|
||||||
|
|
||||||
* strdup.c (strdup): Tweak implementation to use memcpy.
|
* strdup.c (strdup): Tweak implementation to use memcpy.
|
||||||
|
@ -333,7 +333,7 @@ exchange (argv)
|
|||||||
nonoption_flags_len = nonoption_flags_max_len = 0;
|
nonoption_flags_len = nonoption_flags_max_len = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
memset (__mempcpy (new_str, __getopt_nonoption_flags,
|
memset (mempcpy (new_str, __getopt_nonoption_flags,
|
||||||
nonoption_flags_max_len),
|
nonoption_flags_max_len),
|
||||||
'\0', top + 1 - nonoption_flags_max_len);
|
'\0', top + 1 - nonoption_flags_max_len);
|
||||||
nonoption_flags_max_len = top + 1;
|
nonoption_flags_max_len = top + 1;
|
||||||
@ -444,7 +444,7 @@ _getopt_initialize (argc, argv, optstring)
|
|||||||
if (__getopt_nonoption_flags == NULL)
|
if (__getopt_nonoption_flags == NULL)
|
||||||
nonoption_flags_max_len = -1;
|
nonoption_flags_max_len = -1;
|
||||||
else
|
else
|
||||||
memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
|
memset (mempcpy (__getopt_nonoption_flags, orig_str, len),
|
||||||
'\0', nonoption_flags_max_len - len);
|
'\0', nonoption_flags_max_len - len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8200,7 +8200,7 @@ regerror (errcode, preg, errbuf, errbuf_size)
|
|||||||
if (msg_size > errbuf_size)
|
if (msg_size > errbuf_size)
|
||||||
{
|
{
|
||||||
#if defined HAVE_MEMPCPY || defined _LIBC
|
#if defined HAVE_MEMPCPY || defined _LIBC
|
||||||
*((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
|
*((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
|
||||||
#else
|
#else
|
||||||
memcpy (errbuf, msg, errbuf_size - 1);
|
memcpy (errbuf, msg, errbuf_size - 1);
|
||||||
errbuf[errbuf_size - 1] = 0;
|
errbuf[errbuf_size - 1] = 0;
|
||||||
|
Reference in New Issue
Block a user