From a64e578b6fdb18c530d142a68a7e57eb04038b5d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 12 Apr 1999 09:05:16 +0000 Subject: Update. 1999-04-12 Philip Blundell * 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. --- string/tester.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'string') diff --git a/string/tester.c b/string/tester.c index 9545c28..d874fe3 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 -- cgit v1.1