1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.

This commit is contained in:
Ulrich Drepper
2004-12-22 20:10:10 +00:00
parent 0ecb606cb6
commit a334319f65
6215 changed files with 304673 additions and 494300 deletions

View File

@ -1,5 +1,5 @@
/* Tester for string functions.
Copyright (C) 1995-2001, 2003, 2005 Free Software Foundation, Inc.
Copyright (C) 1995-2000, 2001, 2003 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
@ -34,6 +34,10 @@
#include <strings.h>
#include <fcntl.h>
#ifndef HAVE_GNU_LD
#define _sys_nerr sys_nerr
#define _sys_errlist sys_errlist
#endif
#define STREQ(a, b) (strcmp((a), (b)) == 0)
@ -344,9 +348,6 @@ test_strncat (void)
(void) strncat (one, "gh", 2);
equal (one, "abcdgh", 12); /* Count and length equal. */
(void) strncat (one, "ij", (size_t)-1); /* set sign bit in count */
equal (one, "abcdghij", 13);
}
static void
@ -367,8 +368,6 @@ test_strncmp (void)
check (strncmp ("abce", "abc", 3) == 0, 11); /* Count == length. */
check (strncmp ("abcd", "abce", 4) < 0, 12); /* Nudging limit. */
check (strncmp ("abc", "def", 0) == 0, 13); /* Zero count. */
check (strncmp ("abc", "", (size_t)-1) > 0, 14); /* set sign bit in count */
check (strncmp ("abc", "abc", (size_t)-2) == 0, 15);
}
static void
@ -434,29 +433,6 @@ test_strlen (void)
}
}
static void
test_strnlen (void)
{
it = "strnlen";
check (strnlen ("", 10) == 0, 1); /* Empty. */
check (strnlen ("a", 10) == 1, 2); /* Single char. */
check (strnlen ("abcd", 10) == 4, 3); /* Multiple chars. */
check (strnlen ("foo", (size_t)-1) == 3, 4); /* limits of n. */
{
char buf[4096];
int i;
char *p;
for (i=0; i < 0x100; i++)
{
p = (char *) ((unsigned long int)(buf + 0xff) & ~0xff) + i;
strcpy (p, "OK");
strcpy (p+3, "BAD/WRONG");
check (strnlen (p, 100) == 2, 5+i);
}
}
}
static void
test_strchr (void)
{
@ -1410,9 +1386,6 @@ main (void)
/* strlen. */
test_strlen ();
/* strnlen. */
test_strnlen ();
/* strchr. */
test_strchr ();