Alexandre Julliard : libport: Remove checks for memmove().
Alexandre Julliard
julliard at winehq.org
Tue Mar 12 16:56:15 CDT 2019
Module: wine
Branch: master
Commit: 4fcd86e17d2b5a4826fd2604c08edbe27f46f3a6
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4fcd86e17d2b5a4826fd2604c08edbe27f46f3a6
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Mar 12 19:44:08 2019 +0100
libport: Remove checks for memmove().
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
configure | 1 -
configure.ac | 1 -
include/config.h.in | 3 ---
include/wine/port.h | 6 ------
libs/port/Makefile.in | 1 -
libs/port/memmove.c | 48 ------------------------------------------------
6 files changed, 60 deletions(-)
diff --git a/configure b/configure
index 365df4e..273d70a 100755
--- a/configure
+++ b/configure
@@ -16747,7 +16747,6 @@ for ac_func in \
getuid \
kqueue \
lstat \
- memmove \
mmap \
pclose \
pipe2 \
diff --git a/configure.ac b/configure.ac
index 5c9980b..f3e8d65 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2165,7 +2165,6 @@ AC_CHECK_FUNCS(\
getuid \
kqueue \
lstat \
- memmove \
mmap \
pclose \
pipe2 \
diff --git a/include/config.h.in b/include/config.h.in
index 7db97d3..476a3fb 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -600,9 +600,6 @@
/* Define to 1 if you have the <mach-o/nlist.h> header file. */
#undef HAVE_MACH_O_NLIST_H
-/* Define to 1 if you have the `memmove' function. */
-#undef HAVE_MEMMOVE
-
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
diff --git a/include/wine/port.h b/include/wine/port.h
index 600d78d..e3bfa7f 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -292,10 +292,6 @@ long lrintf(float x);
int lstat(const char *file_name, struct stat *buf);
#endif /* HAVE_LSTAT */
-#ifndef HAVE_MEMMOVE
-void *memmove(void *dest, const void *src, size_t len);
-#endif /* !defined(HAVE_MEMMOVE) */
-
#ifndef HAVE_POLL
struct pollfd
{
@@ -523,8 +519,6 @@ extern __int64 interlocked_cmpxchg64( __int64 *dest, __int64 xchg, __int64 compa
#define interlocked_xchg_ptr __WINE_NOT_PORTABLE(interlocked_xchg_ptr)
#define interlocked_xchg_add __WINE_NOT_PORTABLE(interlocked_xchg_add)
#define lstat __WINE_NOT_PORTABLE(lstat)
-#undef memmove
-#define memmove __WINE_NOT_PORTABLE(memmove)
#define pread __WINE_NOT_PORTABLE(pread)
#define pwrite __WINE_NOT_PORTABLE(pwrite)
#define spawnvp __WINE_NOT_PORTABLE(spawnvp)
diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in
index b49cb78..908b6b6 100644
--- a/libs/port/Makefile.in
+++ b/libs/port/Makefile.in
@@ -89,7 +89,6 @@ C_SRCS = \
isnan.c \
lstat.c \
mbtowc.c \
- memmove.c \
mkstemps.c \
normalize.c \
poll.c \
diff --git a/libs/port/memmove.c b/libs/port/memmove.c
deleted file mode 100644
index 7be9638..0000000
--- a/libs/port/memmove.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * memmove function
- *
- * Copyright 1996 Alexandre Julliard
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- */
-
-#include "config.h"
-#include "wine/port.h"
-
-#ifndef HAVE_MEMMOVE
-void *memmove( void *dest, const void *source, size_t len )
-{
- register char *dst = dest;
- register const char *src = source;
-
- /* Use memcpy if not overlapping */
- if ((dst + len <= src) || (src + len <= dst))
- {
- memcpy( dst, src, len );
- }
- /* Otherwise do it the hard way (FIXME: could do better than this) */
- else if (dst < src)
- {
- while (len--) *dst++ = *src++;
- }
- else
- {
- dst += len - 1;
- src += len - 1;
- while (len--) *dst-- = *src--;
- }
- return dest;
-}
-#endif /* HAVE_MEMMOVE */
More information about the wine-cvs
mailing list