* pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
[glibc/pb-stable.git] / stdio-common / bug17.c
blob2ef398674b7666fd6bc2d3c0213db47bec4be9f9
1 #include <stdio.h>
2 #include <string.h>
4 static int
5 do_test (void)
7 static const char expect[] = "0, 0, 0";
8 char buf[100];
9 int status = 0;
11 static const char fmt1[] = "%0d, %0ld, %0lld";
12 snprintf (buf, sizeof (buf), fmt1, 0, 0L, 0LL);
13 if (strcmp (buf, expect) != 0)
15 printf ("\"%s\": got \"%s\", expected \"%s\"\n", fmt1, buf, expect);
16 status = 1;
19 static const char fmt2[] = "%0u, %0lu, %0llu";
20 snprintf (buf, sizeof (buf), fmt2, 0u, 0uL, 0uLL);
21 if (strcmp (buf, expect) != 0)
23 printf ("\"%s\": got \"%s\", expected \"%s\"\n", fmt2, buf, expect);
24 status = 1;
27 return status;
30 #define TEST_FUNCTION do_test ()
31 #include "../test-skeleton.c"