diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-12-22 20:10:10 +0000 |
commit | a334319f6530564d22e775935d9c91663623a1b4 (patch) | |
tree | b5877475619e4c938e98757d518bb1e9cbead751 /stdio-common/tst-fmemopen2.c | |
parent | 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff) | |
download | glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.xz glibc-a334319f6530564d22e775935d9c91663623a1b4.zip |
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'stdio-common/tst-fmemopen2.c')
-rw-r--r-- | stdio-common/tst-fmemopen2.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/stdio-common/tst-fmemopen2.c b/stdio-common/tst-fmemopen2.c deleted file mode 100644 index 81beddddef..0000000000 --- a/stdio-common/tst-fmemopen2.c +++ /dev/null @@ -1,68 +0,0 @@ -#include <assert.h> -#include <stdio.h> -#include <string.h> -#include <sys/types.h> - - -static int -do_test (void) -{ - int result = 0; - char buf[100]; - FILE *fp = fmemopen (buf, sizeof (buf), "w"); - if (fp == NULL) - { - puts ("fmemopen failed"); - return 0; - } - static const char str[] = "hello world"; -#define nstr (sizeof (str) - 1) - fputs (str, fp); - off_t o = ftello (fp); - if (o != nstr) - { - printf ("first ftello returned %ld, expected %zu\n", o, nstr); - result = 1; - } - rewind (fp); - o = ftello (fp); - if (o != 0) - { - printf ("second ftello returned %ld, expected %zu\n", o, (off_t) 0); - result = 1; - } - if (fseeko (fp, 0, SEEK_END) != 0) - { - puts ("fseeko failed"); - return 1; - } - o = ftello (fp); - if (o != nstr) - { - printf ("third ftello returned %ld, expected %zu\n", o, nstr); - result = 1; - } - rewind (fp); - static const char str2[] = "just hello"; -#define nstr2 (sizeof (str2) - 1) - assert (nstr2 < nstr); - fputs (str2, fp); - o = ftello (fp); - if (o != nstr2) - { - printf ("fourth ftello returned %ld, expected %zu\n", o, nstr2); - result = 1; - } - fclose (fp); - static const char str3[] = "just hellod"; - if (strcmp (buf, str3) != 0) - { - printf ("final string is \"%s\", expected \"%s\"\n", - buf, str3); - result = 1; - } - return result; -} - -#define TEST_FUNCTION do_test () -#include "../test-skeleton.c" |