Merge pull request #480 from alejandro-colomar/memcpy
Remove HAVE_MEMCPY and HAVE_MEMSET ifdefs
This commit is contained in:
commit
9e5a852ee0
|
@ -53,7 +53,7 @@ AC_CHECK_HEADER([shadow.h],,[AC_MSG_ERROR([You need a libc with shadow.h])])
|
||||||
|
|
||||||
AC_CHECK_FUNCS(arc4random_buf l64a fchmod fchown fsync futimes getgroups \
|
AC_CHECK_FUNCS(arc4random_buf l64a fchmod fchown fsync futimes getgroups \
|
||||||
gethostname getentropy getrandom getspnam gettimeofday getusershell \
|
gethostname getentropy getrandom getspnam gettimeofday getusershell \
|
||||||
getutent initgroups lchown lckpwdf lstat lutimes memcpy memset \
|
getutent initgroups lchown lckpwdf lstat lutimes \
|
||||||
setgroups sigaction strchr updwtmp updwtmpx innetgr getpwnam_r \
|
setgroups sigaction strchr updwtmp updwtmpx innetgr getpwnam_r \
|
||||||
getpwuid_r getgrnam_r getgrgid_r getspnam_r getaddrinfo ruserok \
|
getpwuid_r getgrnam_r getgrgid_r getspnam_r getaddrinfo ruserok \
|
||||||
dlopen)
|
dlopen)
|
||||||
|
|
|
@ -70,10 +70,6 @@ extern char * textdomain (const char * domainname);
|
||||||
# define strrchr rindex
|
# define strrchr rindex
|
||||||
# endif
|
# endif
|
||||||
char *strchr (), *strrchr (), *strtok ();
|
char *strchr (), *strrchr (), *strtok ();
|
||||||
|
|
||||||
# ifndef HAVE_MEMCPY
|
|
||||||
# define memcpy(d, s, n) bcopy((s), (d), (n))
|
|
||||||
# endif
|
|
||||||
#endif /* not STDC_HEADERS */
|
#endif /* not STDC_HEADERS */
|
||||||
|
|
||||||
#if HAVE_ERRNO_H
|
#if HAVE_ERRNO_H
|
||||||
|
@ -115,11 +111,7 @@ char *strchr (), *strrchr (), *strtok ();
|
||||||
# endif
|
# endif
|
||||||
#endif /* not TIME_WITH_SYS_TIME */
|
#endif /* not TIME_WITH_SYS_TIME */
|
||||||
|
|
||||||
#ifdef HAVE_MEMSET
|
#define memzero(ptr, size) memset((void *)(ptr), 0, (size))
|
||||||
# define memzero(ptr, size) memset((void *)(ptr), 0, (size))
|
|
||||||
#else
|
|
||||||
# define memzero(ptr, size) bzero((char *)(ptr), (size))
|
|
||||||
#endif
|
|
||||||
#define strzero(s) memzero(s, strlen(s)) /* warning: evaluates twice */
|
#define strzero(s) memzero(s, strlen(s)) /* warning: evaluates twice */
|
||||||
|
|
||||||
#ifdef HAVE_DIRENT_H /* DIR_SYSV */
|
#ifdef HAVE_DIRENT_H /* DIR_SYSV */
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
/* Some old versions of bison generate parsers that use bcopy.
|
/* Some old versions of bison generate parsers that use bcopy.
|
||||||
That loses on systems that don't provide the function, so we have
|
That loses on systems that don't provide the function, so we have
|
||||||
to redefine it here. */
|
to redefine it here. */
|
||||||
#if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy)
|
#if !defined (HAVE_BCOPY) && !defined (bcopy)
|
||||||
# define bcopy(from, to, len) memcpy ((to), (from), (len))
|
# define bcopy(from, to, len) memcpy ((to), (from), (len))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user