# HG changeset patch # User Ulrich Drepper # Date 878777084 0 # Node ID 90f407354bdf43e9192a4b0ccef84a2e78682b8c # Parent f722b33c682d47ad922d8f54e268a48607c5cc31 automatically generated from GPLed version diff -r f722b33c682d -r 90f407354bdf lib-src/getopt.c --- a/lib-src/getopt.c Tue Nov 04 03:28:47 1997 +0000 +++ b/lib-src/getopt.c Thu Nov 06 00:44:44 1997 +0000 @@ -331,9 +331,9 @@ nonoption_flags_len = nonoption_flags_max_len = 0; else { - memcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len); - memset (&new_str[nonoption_flags_max_len], '\0', - top + 1 - 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; } @@ -442,11 +442,8 @@ if (__getopt_nonoption_flags == NULL) nonoption_flags_max_len = -1; else - { - memcpy (__getopt_nonoption_flags, orig_str, len); - memset (&__getopt_nonoption_flags[len], '\0', - nonoption_flags_max_len - len); - } + memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), + '\0', nonoption_flags_max_len - len); } } nonoption_flags_len = nonoption_flags_max_len; diff -r f722b33c682d -r 90f407354bdf src/strftime.c --- a/src/strftime.c Tue Nov 04 03:28:47 1997 +0000 +++ b/src/strftime.c Thu Nov 06 00:44:44 1997 +0000 @@ -91,6 +91,14 @@ # endif #endif +#ifdef _LIBC +# define MEMPCPY(d, s, n) __mempcpy (d, s, n) +#else +# ifndef HAVE_MEMPCPY +# define MEMPCPY(d, s, n) ((void *) ((char *) memcpy (d, s, n) + (n))) +# endif +#endif + #ifndef __P # if defined (__GNUC__) || (defined (__STDC__) && __STDC__) # define __P(args) args @@ -196,8 +204,7 @@ do \ { \ int _this = _len > 16 ? 16 : _len; \ - memcpy ((P), spaces, _this); \ - (P) += _this; \ + (P) = mempcpy ((P), spaces, _this); \ _len -= _this; \ } \ while (_len > 0); \ @@ -210,8 +217,7 @@ do \ { \ int _this = _len > 16 ? 16 : _len; \ - memcpy ((P), zeroes, _this); \ - (P) += _this; \ + (P) = mempcpy ((P), zeroes, _this); \ _len -= _this; \ } \ while (_len > 0); \