|
|
a9fe34 |
diff -Nrup a/Makefile.am b/Makefile.am
|
|
|
a9fe34 |
--- a/Makefile.am 2011-03-30 21:27:19.000000000 -0600
|
|
|
a9fe34 |
+++ b/Makefile.am 2013-03-11 15:31:08.909891995 -0600
|
|
|
a9fe34 |
@@ -86,3 +86,24 @@ dist-gzip:
|
|
|
a9fe34 |
(cd $(srcdir); git archive --prefix=memstomp-$(VERSION)/ --format=tar HEAD) | gzip > memstomp-$(VERSION).tar.gz
|
|
|
a9fe34 |
|
|
|
a9fe34 |
ACLOCAL_AMFLAGS = -I m4
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+check-DEJAGNU: site.exp
|
|
|
a9fe34 |
+ if [ -d testsuite ]; then \
|
|
|
a9fe34 |
+ true; \
|
|
|
a9fe34 |
+ else \
|
|
|
a9fe34 |
+ mkdir testsuite; \
|
|
|
a9fe34 |
+ fi
|
|
|
a9fe34 |
+ rm -f testsuite/site.exp
|
|
|
a9fe34 |
+ cp site.exp testsuite/site.exp
|
|
|
a9fe34 |
+ rootme=`pwd`; export rootme; \
|
|
|
a9fe34 |
+ srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
|
|
|
a9fe34 |
+ LC_ALL=C; export LC_ALL; \
|
|
|
a9fe34 |
+ EXPECT=${EXPECT} ; export EXPECT ; \
|
|
|
a9fe34 |
+ runtest=$(RUNTEST); \
|
|
|
a9fe34 |
+ cd testsuite; \
|
|
|
a9fe34 |
+ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
|
|
|
a9fe34 |
+ $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \
|
|
|
a9fe34 |
+ $(RUNTESTFLAGS); \
|
|
|
a9fe34 |
+ else echo "WARNING: could not find \`runtest'" 1>&2; :;\
|
|
|
a9fe34 |
+ fi
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/configure.ac b/configure.ac
|
|
|
a9fe34 |
--- a/configure.ac 2011-03-30 21:27:19.000000000 -0600
|
|
|
a9fe34 |
+++ b/configure.ac 2013-03-11 15:27:32.812194998 -0600
|
|
|
a9fe34 |
@@ -25,7 +25,7 @@ AC_CONFIG_SRCDIR([memstomp.c])
|
|
|
a9fe34 |
AC_CONFIG_HEADERS([config.h])
|
|
|
a9fe34 |
AC_CONFIG_MACRO_DIR(m4)
|
|
|
a9fe34 |
|
|
|
a9fe34 |
-AM_INIT_AUTOMAKE([foreign 1.10 -Wall -Wno-portability tar-pax])
|
|
|
a9fe34 |
+AM_INIT_AUTOMAKE([foreign 1.10 -Wall -Wno-portability tar-pax dejagnu])
|
|
|
a9fe34 |
|
|
|
a9fe34 |
AC_SUBST(PACKAGE_URL, [http://wcohen.fedorapeople.org/git/memstomp/])
|
|
|
a9fe34 |
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.nooverlap/memccpy.c b/testsuite/memstomp.nooverlap/memccpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.nooverlap/memccpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/memccpy.c 2013-03-11 14:13:05.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,20 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef MEMCCPY
|
|
|
a9fe34 |
+#define MEMCCPY memccpy
|
|
|
a9fe34 |
+#define TYPE char
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+TYPE arr1[10] = {0};
|
|
|
a9fe34 |
+TYPE arr2[10] = {0};
|
|
|
a9fe34 |
+TYPE *p1 = &arr1[0];
|
|
|
a9fe34 |
+TYPE *p2 = &arr2[1];
|
|
|
a9fe34 |
+size_t count = 9;
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ MEMCCPY (p1, p2, -1, count);
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.nooverlap/memcpy.c b/testsuite/memstomp.nooverlap/memcpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.nooverlap/memcpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/memcpy.c 2013-03-11 14:12:57.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,20 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef MEMCPY
|
|
|
a9fe34 |
+#define MEMCPY memcpy
|
|
|
a9fe34 |
+#define TYPE char
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+TYPE arr1[10] = {0};
|
|
|
a9fe34 |
+TYPE arr2[10] = {0};
|
|
|
a9fe34 |
+TYPE *p1 = &arr1[0];
|
|
|
a9fe34 |
+TYPE *p2 = &arr2[1];
|
|
|
a9fe34 |
+size_t count = 9;
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ MEMCPY (p1, p2, count);
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.nooverlap/mempcpy.c b/testsuite/memstomp.nooverlap/mempcpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.nooverlap/mempcpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/mempcpy.c 2013-03-11 13:54:25.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,3 @@
|
|
|
a9fe34 |
+#define MEMCPY mempcpy
|
|
|
a9fe34 |
+#define TYPE char
|
|
|
a9fe34 |
+#include "memcpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.nooverlap/stpcpy.c b/testsuite/memstomp.nooverlap/stpcpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.nooverlap/stpcpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/stpcpy.c 2013-03-11 13:38:53.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define STRCPY stpcpy
|
|
|
a9fe34 |
+#include "strcpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.nooverlap/stpncpy.c b/testsuite/memstomp.nooverlap/stpncpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.nooverlap/stpncpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/stpncpy.c 2013-03-11 13:38:53.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define STRNCPY stpncpy
|
|
|
a9fe34 |
+#include "strncpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.nooverlap/strcat.c b/testsuite/memstomp.nooverlap/strcat.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.nooverlap/strcat.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/strcat.c 2013-03-11 13:38:53.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define STRCPY strcat
|
|
|
a9fe34 |
+#include "strcpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.nooverlap/strcpy.c b/testsuite/memstomp.nooverlap/strcpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.nooverlap/strcpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/strcpy.c 2013-03-11 14:01:12.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,19 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef STRCPY
|
|
|
a9fe34 |
+#define STRCPY strcpy
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+char arr1[32] = "this is a test";
|
|
|
a9fe34 |
+char arr2[32] = "this is a test";
|
|
|
a9fe34 |
+char *p1 = &arr1[0];
|
|
|
a9fe34 |
+char *p2 = &arr2[1];
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ STRCPY (p2, p1);
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.nooverlap/strncat.c b/testsuite/memstomp.nooverlap/strncat.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.nooverlap/strncat.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/strncat.c 2013-03-11 13:38:53.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define STRNCPY strncat
|
|
|
a9fe34 |
+#include "strncpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.nooverlap/strncpy.c b/testsuite/memstomp.nooverlap/strncpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.nooverlap/strncpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/strncpy.c 2013-03-11 14:00:47.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,19 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef STRNCPY
|
|
|
a9fe34 |
+#define STRNCPY strncpy
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+char arr1[32] = "this is a test";
|
|
|
a9fe34 |
+char arr2[32] = "this is a test";
|
|
|
a9fe34 |
+char *p1 = &arr1[0];
|
|
|
a9fe34 |
+char *p2 = &arr2[1];
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ STRNCPY (p1, p2, strlen (p2));
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.nooverlap/wcscat.c b/testsuite/memstomp.nooverlap/wcscat.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.nooverlap/wcscat.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/wcscat.c 2013-03-11 13:38:53.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define WCSCPY wcscat
|
|
|
a9fe34 |
+#include "wcscpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.nooverlap/wcscpy.c b/testsuite/memstomp.nooverlap/wcscpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.nooverlap/wcscpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/wcscpy.c 2013-03-11 14:01:22.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,19 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef WCSCPY
|
|
|
a9fe34 |
+#define WCSCPY wcscpy
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+wchar_t arr1[32] = L"this is a test";
|
|
|
a9fe34 |
+wchar_t arr2[32] = L"this is a test";
|
|
|
a9fe34 |
+wchar_t *p1 = &arr1[0];
|
|
|
a9fe34 |
+wchar_t *p2 = &arr2[1];
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ WCSCPY (p1, p2);
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.nooverlap/wcsncat.c b/testsuite/memstomp.nooverlap/wcsncat.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.nooverlap/wcsncat.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/wcsncat.c 2013-03-11 13:38:53.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define WCSNCPY wcsncat
|
|
|
a9fe34 |
+#include "wcsncpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.nooverlap/wcsncpy.c b/testsuite/memstomp.nooverlap/wcsncpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.nooverlap/wcsncpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/wcsncpy.c 2013-03-11 14:01:26.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,19 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef WCSNCPY
|
|
|
a9fe34 |
+#define WCSNCPY wcsncpy
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+wchar_t arr1[32] = L"this is a test";
|
|
|
a9fe34 |
+wchar_t arr2[32] = L"this is a test";
|
|
|
a9fe34 |
+wchar_t *p1 = &arr1[0];
|
|
|
a9fe34 |
+wchar_t *p2 = &arr2[1];
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ WCSNCPY (p1, p2, wcslen (p2));
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.nooverlap/wmemcpy.c b/testsuite/memstomp.nooverlap/wmemcpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.nooverlap/wmemcpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/wmemcpy.c 2013-03-11 13:54:32.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,3 @@
|
|
|
a9fe34 |
+#define MEMCPY wmemcpy
|
|
|
a9fe34 |
+#define TYPE wchar_t
|
|
|
a9fe34 |
+#include "memcpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.nooverlap/wmempcpy.c b/testsuite/memstomp.nooverlap/wmempcpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.nooverlap/wmempcpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/wmempcpy.c 2013-03-11 13:54:38.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,3 @@
|
|
|
a9fe34 |
+#define MEMCPY wmempcpy
|
|
|
a9fe34 |
+#define TYPE wchar_t
|
|
|
a9fe34 |
+#include "memcpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/memccpy-2.c b/testsuite/memstomp.overlap/memccpy-2.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/memccpy-2.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/memccpy-2.c 2013-03-11 14:12:34.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,19 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef MEMCCPY
|
|
|
a9fe34 |
+#define MEMCCPY memccpy
|
|
|
a9fe34 |
+#define TYPE char
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+TYPE arr[10] = {0};
|
|
|
a9fe34 |
+TYPE *p1 = &arr[0];
|
|
|
a9fe34 |
+TYPE *p2 = &arr[1];
|
|
|
a9fe34 |
+size_t count = 9;
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ MEMCCPY (p2, p1, -1, count);
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/memccpy.c b/testsuite/memstomp.overlap/memccpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/memccpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/memccpy.c 2013-03-11 14:12:41.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,19 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef MEMCCPY
|
|
|
a9fe34 |
+#define MEMCCPY memccpy
|
|
|
a9fe34 |
+#define TYPE char
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+TYPE arr[10] = {0};
|
|
|
a9fe34 |
+TYPE *p1 = &arr[0];
|
|
|
a9fe34 |
+TYPE *p2 = &arr[1];
|
|
|
a9fe34 |
+size_t count = 9;
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ MEMCCPY (p1, p2, -1, count);
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/memcpy-2.c b/testsuite/memstomp.overlap/memcpy-2.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/memcpy-2.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/memcpy-2.c 2013-03-11 14:12:26.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,19 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef MEMCPY
|
|
|
a9fe34 |
+#define MEMCPY memcpy
|
|
|
a9fe34 |
+#define TYPE char
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+TYPE arr[10] = {0};
|
|
|
a9fe34 |
+TYPE *p1 = &arr[0];
|
|
|
a9fe34 |
+TYPE *p2 = &arr[1];
|
|
|
a9fe34 |
+size_t count = 9;
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ MEMCPY (p2, p1, count);
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/memcpy.c b/testsuite/memstomp.overlap/memcpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/memcpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/memcpy.c 2013-03-11 14:12:20.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,19 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef MEMCPY
|
|
|
a9fe34 |
+#define MEMCPY memcpy
|
|
|
a9fe34 |
+#define TYPE char
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+TYPE arr[10] = {0};
|
|
|
a9fe34 |
+TYPE *p1 = &arr[0];
|
|
|
a9fe34 |
+TYPE *p2 = &arr[1];
|
|
|
a9fe34 |
+size_t count = 9;
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ MEMCPY (p1, p2, count);
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/mempcpy-2.c b/testsuite/memstomp.overlap/mempcpy-2.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/mempcpy-2.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/mempcpy-2.c 2013-03-11 13:52:51.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,3 @@
|
|
|
a9fe34 |
+#define MEMCPY mempcpy
|
|
|
a9fe34 |
+#define TYPE char
|
|
|
a9fe34 |
+#include "memcpy-2.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/mempcpy.c b/testsuite/memstomp.overlap/mempcpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/mempcpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/mempcpy.c 2013-03-11 13:53:10.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,3 @@
|
|
|
a9fe34 |
+#define MEMCPY mempcpy
|
|
|
a9fe34 |
+#define TYPE char
|
|
|
a9fe34 |
+#include "memcpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/stpcpy-2.c b/testsuite/memstomp.overlap/stpcpy-2.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/stpcpy-2.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/stpcpy-2.c 2013-03-11 13:26:50.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define STRCPY stpcpy
|
|
|
a9fe34 |
+#include "strcpy-2.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/stpcpy.c b/testsuite/memstomp.overlap/stpcpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/stpcpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/stpcpy.c 2013-03-05 15:36:43.000000000 -0700
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define STRCPY stpcpy
|
|
|
a9fe34 |
+#include "strcpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/stpncpy-2.c b/testsuite/memstomp.overlap/stpncpy-2.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/stpncpy-2.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/stpncpy-2.c 2013-03-11 13:27:02.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define STRNCPY stpncpy
|
|
|
a9fe34 |
+#include "strncpy-2.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/stpncpy.c b/testsuite/memstomp.overlap/stpncpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/stpncpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/stpncpy.c 2013-03-05 15:37:22.000000000 -0700
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define STRNCPY stpncpy
|
|
|
a9fe34 |
+#include "strncpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/strcat-2.c b/testsuite/memstomp.overlap/strcat-2.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/strcat-2.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/strcat-2.c 2013-03-11 13:27:10.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define STRCPY strcat
|
|
|
a9fe34 |
+#include "strcpy-2.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/strcat.c b/testsuite/memstomp.overlap/strcat.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/strcat.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/strcat.c 2013-03-05 15:38:38.000000000 -0700
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define STRCPY strcat
|
|
|
a9fe34 |
+#include "strcpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/strcpy-2.c b/testsuite/memstomp.overlap/strcpy-2.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/strcpy-2.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/strcpy-2.c 2013-03-11 14:01:54.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,18 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef STRCPY
|
|
|
a9fe34 |
+#define STRCPY strcpy
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+char arr[32] = "this is a test";
|
|
|
a9fe34 |
+char *p1 = &arr[0];
|
|
|
a9fe34 |
+char *p2 = &arr[1];
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ STRCPY (p1, p2);
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/strcpy.c b/testsuite/memstomp.overlap/strcpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/strcpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/strcpy.c 2013-03-11 14:01:58.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,18 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef STRCPY
|
|
|
a9fe34 |
+#define STRCPY strcpy
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+char arr[32] = "this is a test";
|
|
|
a9fe34 |
+char *p1 = &arr[0];
|
|
|
a9fe34 |
+char *p2 = &arr[1];
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ STRCPY (p2, p1);
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/strncat-2.c b/testsuite/memstomp.overlap/strncat-2.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/strncat-2.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/strncat-2.c 2013-03-11 13:27:47.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define STRNCPY strncat
|
|
|
a9fe34 |
+#include "strncpy-2.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/strncat.c b/testsuite/memstomp.overlap/strncat.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/strncat.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/strncat.c 2013-03-05 15:38:56.000000000 -0700
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define STRNCPY strncat
|
|
|
a9fe34 |
+#include "strncpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/strncpy-2.c b/testsuite/memstomp.overlap/strncpy-2.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/strncpy-2.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/strncpy-2.c 2013-03-11 14:02:00.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,18 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef STRNCPY
|
|
|
a9fe34 |
+#define STRNCPY strncpy
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+char arr[32] = "this is a test";
|
|
|
a9fe34 |
+char *p1 = &arr[0];
|
|
|
a9fe34 |
+char *p2 = &arr[1];
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ STRNCPY (p2, p1, strlen (p1));
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/strncpy.c b/testsuite/memstomp.overlap/strncpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/strncpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/strncpy.c 2013-03-11 14:02:40.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,18 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef STRNCPY
|
|
|
a9fe34 |
+#define STRNCPY strncpy
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+char arr[32] = "this is a test";
|
|
|
a9fe34 |
+char *p1 = &arr[0];
|
|
|
a9fe34 |
+char *p2 = &arr[1];
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ STRNCPY (p1, p2, strlen (p2));
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/wcscat-2.c b/testsuite/memstomp.overlap/wcscat-2.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/wcscat-2.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/wcscat-2.c 2013-03-11 13:34:04.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define WCSCPY wcscat
|
|
|
a9fe34 |
+#include "wcscpy-2.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/wcscat.c b/testsuite/memstomp.overlap/wcscat.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/wcscat.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/wcscat.c 2013-03-11 13:33:44.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define WCSCPY wcscat
|
|
|
a9fe34 |
+#include "wcscpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/wcscpy-2.c b/testsuite/memstomp.overlap/wcscpy-2.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/wcscpy-2.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/wcscpy-2.c 2013-03-11 14:02:06.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,18 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef WCSCPY
|
|
|
a9fe34 |
+#define WCSCPY wcscpy
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+wchar_t arr[32] = L"this is a test";
|
|
|
a9fe34 |
+wchar_t *p1 = &arr[0];
|
|
|
a9fe34 |
+wchar_t *p2 = &arr[1];
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ WCSCPY (p2, p1);
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/wcscpy.c b/testsuite/memstomp.overlap/wcscpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/wcscpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/wcscpy.c 2013-03-11 14:02:10.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,18 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef WCSCPY
|
|
|
a9fe34 |
+#define WCSCPY wcscpy
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+wchar_t arr[32] = L"this is a test";
|
|
|
a9fe34 |
+wchar_t *p1 = &arr[0];
|
|
|
a9fe34 |
+wchar_t *p2 = &arr[1];
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ WCSCPY (p1, p2);
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/wcsncat.c b/testsuite/memstomp.overlap/wcsncat.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/wcsncat.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/wcsncat.c 2013-03-11 13:34:37.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,2 @@
|
|
|
a9fe34 |
+#define WCSNCPY wcsncat
|
|
|
a9fe34 |
+#include "wcsncpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/wcsncpy-2.c b/testsuite/memstomp.overlap/wcsncpy-2.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/wcsncpy-2.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/wcsncpy-2.c 2013-03-11 14:02:13.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,18 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef WCSNCPY
|
|
|
a9fe34 |
+#define WCSNCPY wcsncpy
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+wchar_t arr[32] = L"this is a test";
|
|
|
a9fe34 |
+wchar_t *p1 = &arr[0];
|
|
|
a9fe34 |
+wchar_t *p2 = &arr[1];
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ WCSNCPY (p2, p1, wcslen (p2));
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/wcsncpy.c b/testsuite/memstomp.overlap/wcsncpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/wcsncpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/wcsncpy.c 2013-03-11 14:02:19.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,18 @@
|
|
|
a9fe34 |
+#define _GNU_SOURCE
|
|
|
a9fe34 |
+#include <string.h>
|
|
|
a9fe34 |
+#include <wchar.h>
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#ifndef WCSNCPY
|
|
|
a9fe34 |
+#define WCSNCPY wcsncpy
|
|
|
a9fe34 |
+#endif
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+wchar_t arr[32] = L"this is a test";
|
|
|
a9fe34 |
+wchar_t *p1 = &arr[0];
|
|
|
a9fe34 |
+wchar_t *p2 = &arr[1];
|
|
|
a9fe34 |
+main ()
|
|
|
a9fe34 |
+{
|
|
|
a9fe34 |
+ WCSNCPY (p1, p2, wcslen (p2));
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/wmemcpy-2.c b/testsuite/memstomp.overlap/wmemcpy-2.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/wmemcpy-2.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/wmemcpy-2.c 2013-03-11 13:53:21.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,3 @@
|
|
|
a9fe34 |
+#define MEMCPY wmemcpy
|
|
|
a9fe34 |
+#define TYPE wchar_t
|
|
|
a9fe34 |
+#include "memcpy-2.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/wmemcpy.c b/testsuite/memstomp.overlap/wmemcpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/wmemcpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/wmemcpy.c 2013-03-11 13:51:10.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,3 @@
|
|
|
a9fe34 |
+#define MEMCPY wmemcpy
|
|
|
a9fe34 |
+#define TYPE wchar_t
|
|
|
a9fe34 |
+#include "memcpy.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/wmempcpy-2.c b/testsuite/memstomp.overlap/wmempcpy-2.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/wmempcpy-2.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/wmempcpy-2.c 2013-03-11 13:53:32.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,3 @@
|
|
|
a9fe34 |
+#define MEMCPY wmempcpy
|
|
|
a9fe34 |
+#define TYPE wchar_t
|
|
|
a9fe34 |
+#include "memcpy-2.c"
|
|
|
a9fe34 |
diff -Nrup a/testsuite/memstomp.overlap/wmempcpy.c b/testsuite/memstomp.overlap/wmempcpy.c
|
|
|
a9fe34 |
--- a/testsuite/memstomp.overlap/wmempcpy.c 1969-12-31 17:00:00.000000000 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/wmempcpy.c 2013-03-11 13:51:14.000000000 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,3 @@
|
|
|
a9fe34 |
+#define MEMCPY wmempcpy
|
|
|
a9fe34 |
+#define TYPE wchar_t
|
|
|
a9fe34 |
+#include "memcpy.c"
|
|
|
a9fe34 |
--- /dev/null 2013-02-26 15:11:24.372721019 -0700
|
|
|
a9fe34 |
+++ b/testsuite/lib/memstomp.exp 2013-03-11 21:37:45.680005590 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,15 @@
|
|
|
a9fe34 |
+proc find_memstomp {} {
|
|
|
a9fe34 |
+ global tool_root_dir
|
|
|
a9fe34 |
+ global base_dir
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+ set file [findfile $base_dir/../memstomp $base_dir/../memstomp memstomp]
|
|
|
a9fe34 |
+ return $file
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+proc find_libmemstomp {} {
|
|
|
a9fe34 |
+ global tool_root_dir
|
|
|
a9fe34 |
+ global base_dir
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+ set file [findfile $base_dir/../.libs/libmemstomp.so $base_dir/../.libs/libmemstomp.so libmemstomp.so]
|
|
|
a9fe34 |
+ return $file
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
--- /dev/null 2013-02-26 15:11:24.372721019 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.overlap/overlap.exp 2013-03-11 21:38:02.207939417 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,59 @@
|
|
|
a9fe34 |
+# Copyright (C) 2013 Free Software Foundation, Inc.
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+# This program is free software; you can redistribute it and/or modify
|
|
|
a9fe34 |
+# it under the terms of the GNU General Public License as published by
|
|
|
a9fe34 |
+# the Free Software Foundation; either version 3 of the License, or
|
|
|
a9fe34 |
+# (at your option) any later version.
|
|
|
a9fe34 |
+#
|
|
|
a9fe34 |
+# This program is distributed in the hope that it will be useful,
|
|
|
a9fe34 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a9fe34 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
a9fe34 |
+# GNU General Public License for more details.
|
|
|
a9fe34 |
+#
|
|
|
a9fe34 |
+# You should have received a copy of the GNU General Public License
|
|
|
a9fe34 |
+# along with GCC; see the file COPYING3. If not see
|
|
|
a9fe34 |
+# <http://www.gnu.org/licenses/>.
|
|
|
a9fe34 |
+#
|
|
|
a9fe34 |
+# This was originally copied from GCC's dejagnu testing framework
|
|
|
a9fe34 |
+#
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+load_lib memstomp.exp
|
|
|
a9fe34 |
+set memstomp [find_memstomp]
|
|
|
a9fe34 |
+set libmemstomp [find_libmemstomp]
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+if $tracelevel then {
|
|
|
a9fe34 |
+ strace $tracelevel
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#
|
|
|
a9fe34 |
+# main test loop
|
|
|
a9fe34 |
+#
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+proc compile-and-execute { sources } {
|
|
|
a9fe34 |
+ global memstomp
|
|
|
a9fe34 |
+ global libmemstomp
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+ set src [lindex $sources 0]
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+ if {[catch {exec gcc -fno-builtin $src} results]} {
|
|
|
a9fe34 |
+ fail "$src compilation $results"
|
|
|
a9fe34 |
+ } else {
|
|
|
a9fe34 |
+ pass "$src compilation $results"
|
|
|
a9fe34 |
+ }
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+ catch {exec /bin/bash -c "LD_PRELOAD=$libmemstomp $memstomp ./a.out"} results
|
|
|
a9fe34 |
+ if {[regexp "overlap for a.out" $results]} {
|
|
|
a9fe34 |
+ pass "$src found overlap $results"
|
|
|
a9fe34 |
+ } else {
|
|
|
a9fe34 |
+ fail "$src found overlap $results"
|
|
|
a9fe34 |
+ }
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
|
|
|
a9fe34 |
+ # If we're only testing specific files and this isn't one of them, skip it.
|
|
|
a9fe34 |
+ if ![runtest_file_p $runtests $src] then {
|
|
|
a9fe34 |
+ continue
|
|
|
a9fe34 |
+ }
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+ compile-and-execute $src
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
--- /dev/null 2013-02-26 15:11:24.372721019 -0700
|
|
|
a9fe34 |
+++ b/testsuite/memstomp.nooverlap/nooverlap.exp 2013-03-11 21:39:20.352626597 -0600
|
|
|
a9fe34 |
@@ -0,0 +1,55 @@
|
|
|
a9fe34 |
+# Copyright (C) 2013 Free Software Foundation, Inc.
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+# This program is free software; you can redistribute it and/or modify
|
|
|
a9fe34 |
+# it under the terms of the GNU General Public License as published by
|
|
|
a9fe34 |
+# the Free Software Foundation; either version 3 of the License, or
|
|
|
a9fe34 |
+# (at your option) any later version.
|
|
|
a9fe34 |
+#
|
|
|
a9fe34 |
+# This program is distributed in the hope that it will be useful,
|
|
|
a9fe34 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a9fe34 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
a9fe34 |
+# GNU General Public License for more details.
|
|
|
a9fe34 |
+#
|
|
|
a9fe34 |
+# You should have received a copy of the GNU General Public License
|
|
|
a9fe34 |
+# along with GCC; see the file COPYING3. If not see
|
|
|
a9fe34 |
+# <http://www.gnu.org/licenses/>.
|
|
|
a9fe34 |
+#
|
|
|
a9fe34 |
+# This was originally copied from GCC's dejagnu testing framework
|
|
|
a9fe34 |
+#
|
|
|
a9fe34 |
+load_lib memstomp.exp
|
|
|
a9fe34 |
+set memstomp [find_memstomp]
|
|
|
a9fe34 |
+set libmemstomp [find_libmemstomp]
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+if $tracelevel then {
|
|
|
a9fe34 |
+ strace $tracelevel
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+#
|
|
|
a9fe34 |
+# main test loop
|
|
|
a9fe34 |
+#
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+proc compile-and-execute { sources } {
|
|
|
a9fe34 |
+ global memstomp
|
|
|
a9fe34 |
+ set src [lindex $sources 0]
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+ if {[catch {exec gcc -fno-builtin $src} results]} {
|
|
|
a9fe34 |
+ fail "$src compilation $results"
|
|
|
a9fe34 |
+ } else {
|
|
|
a9fe34 |
+ pass "$src compilation $results"
|
|
|
a9fe34 |
+ }
|
|
|
a9fe34 |
+ catch {exec /bin/bash -c "LD_PRELOAD=$libmemstomp $memstomp ./a.out"} results
|
|
|
a9fe34 |
+ if {[regexp "overlap for a.out" $results]} {
|
|
|
a9fe34 |
+ fail "$src found no overlap $results"
|
|
|
a9fe34 |
+ } else {
|
|
|
a9fe34 |
+ pass "$src found no overlap $results"
|
|
|
a9fe34 |
+ }
|
|
|
a9fe34 |
+}
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+foreach src [lsort [glob -nocomplain $srcdir/$subdir/*.c]] {
|
|
|
a9fe34 |
+ # If we're only testing specific files and this isn't one of them, skip it.
|
|
|
a9fe34 |
+ if ![runtest_file_p $runtests $src] then {
|
|
|
a9fe34 |
+ continue
|
|
|
a9fe34 |
+ }
|
|
|
a9fe34 |
+
|
|
|
a9fe34 |
+ compile-and-execute $src
|
|
|
a9fe34 |
+}
|