summary refs log tree commit diff
path: root/string/tester.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-04-12 09:05:16 +0000
committerUlrich Drepper <drepper@redhat.com>1999-04-12 09:05:16 +0000
commita64e578b6fdb18c530d142a68a7e57eb04038b5d (patch)
tree213705ce4ff6c43f4eb189e1d422c1984ee10d3b /string/tester.c
parenteb822fcf6fee6bbd4220658299ec1970e52f105d (diff)
downloadglibc-a64e578b6fdb18c530d142a68a7e57eb04038b5d.tar.gz
glibc-a64e578b6fdb18c530d142a68a7e57eb04038b5d.tar.xz
glibc-a64e578b6fdb18c530d142a68a7e57eb04038b5d.zip
Update.
1999-04-12  Philip Blundell  <philb@gnu.org>

	* elf/elf.h: Update ARM definitions to match current gas2.

	* sysdeps/arm/bits/endian.h: Support big endian operation.

	* sysdeps/unix/sysv/linux/arm/ioperm.c (_outw, _outb, _outl):
	Don't bother range checking the port number.

	* sysdeps/unix/sysv/linux/arm/vfork.S: New file.

	* sysdeps/unix/sysv/linux/arm/sysdep.h (INLINE_SYSCALL): Include
	the syscall name in assembler output for ease of debugging.

	* sysdeps/unix/sysv/linux/arm/sigaction.c: Don't rely on undefined
	compiler behaviour.
	* sysdeps/unix/sysv/linux/arm/sigrestorer.S: New file.
	* sysdeps/unix/sysv/linux/arm/Makefile [$(subdir) = signal]
	(sysdep_routines): Add sigrestorer.

	* string/tester.c (test_strcpy): Add new tests for unaligned
	arguments.
	* sysdeps/arm/bits/string.h: Delete inline implementations of
	strcpy and stpcpy.
Diffstat (limited to 'string/tester.c')
-rw-r--r--string/tester.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/string/tester.c b/string/tester.c
index 9545c28080..d874fe3379 100644
--- a/string/tester.c
+++ b/string/tester.c
@@ -1,5 +1,5 @@
 /* Tester for string functions.
-   Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -119,6 +119,7 @@ test_strcmp (void)
 void
 test_strcpy (void)
 {
+  int i;
   it = "strcpy";
   check (strcpy (one, "abcd") == one, 1); /* Returned value. */
   equal (one, "abcd", 2);		/* Basic test. */
@@ -134,6 +135,14 @@ test_strcpy (void)
 
   (void) strcpy (one, "");
   equal (one, "", 7);			/* Boundary condition. */
+
+  for (i = 0; i < 16; i++)
+    {
+      (void) strcpy (one + i, "hi there");	/* Unaligned destination. */
+      equal (one + i, "hi there", 8 + (i * 2));
+      (void) strcpy (two, one + i);		/* Unaligned source. */
+      equal (two, "hi there", 9 + (i * 2));
+    }
 }
 
 void