(__nss_lookup_function): En/Decrypt cached function pointers.
[glibc/history.git] / time / tst_wcsftime.c
blob3f6f0d9f770af7dba7e40694ab648a73e7e2921d
1 #include <time.h>
2 #include <wchar.h>
4 int
5 main (int argc, char *argv[])
7 wchar_t buf[200];
8 time_t t;
9 struct tm *tp;
10 int result = 0;
11 size_t n;
13 time (&t);
14 tp = gmtime (&t);
16 n = wcsftime (buf, sizeof (buf) / sizeof (buf[0]),
17 L"%H:%M:%S %Y-%m-%d\n", tp);
18 if (n != 21)
19 result = 1;
21 wprintf (L"It is now %ls", buf);
23 wcsftime (buf, sizeof (buf) / sizeof (buf[0]), L"%A\n", tp);
25 wprintf (L"The weekday is %ls", buf);
27 return result;