automatically generated from GPLed version

This commit is contained in:
Ulrich Drepper 1997-11-06 00:44:44 +00:00
parent 4b7c78fcf1
commit 4e941b8ea8
2 changed files with 15 additions and 12 deletions

View file

@ -331,9 +331,9 @@ exchange (argv)
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 @@ _getopt_initialize (argc, argv, optstring)
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;

View file

@ -91,6 +91,14 @@ extern char *tzname[];
# 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 @@ static const char zeroes[16] = /* "0000000000000000" */
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 @@ static const char zeroes[16] = /* "0000000000000000" */
do \
{ \
int _this = _len > 16 ? 16 : _len; \
memcpy ((P), zeroes, _this); \
(P) += _this; \
(P) = mempcpy ((P), zeroes, _this); \
_len -= _this; \
} \
while (_len > 0); \