* wcsmbs/Makefile: Add rules to build and run tst-wchar-h.
authorUlrich Drepper <drepper@redhat.com>
Sun, 24 Jul 2005 20:03:14 +0000 (20:03 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 24 Jul 2005 20:03:14 +0000 (20:03 +0000)
* wcsmbs/tst-wchar-h.c: New file.

ChangeLog
wcsmbs/Makefile
wcsmbs/tst-wchar-h.c [new file with mode: 0644]

index 028c47e..fb9d21a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 2005-07-24  Ulrich Drepper  <drepper@redhat.com>
 
        * wcsmbs/bits/wchar2.h: Use __FILE not FILE.
+       * wcsmbs/Makefile: Add rules to build and run tst-wchar-h.
+       * wcsmbs/tst-wchar-h.c: New file.
 
 2005-07-22  Ulrich Drepper  <drepper@redhat.com>
 
index d033de9..78b3e5b 100644 (file)
@@ -40,7 +40,7 @@ routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
            wcsmbsload mbsrtowcs_l
 
 tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \
-        tst-wcrtomb tst-wcpncpy tst-mbsrtowcs
+        tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h
 
 include ../Rules
 
@@ -62,6 +62,7 @@ CFLAGS-wcstoull_l.c = $(strtox-CFLAGS)
 CFLAGS-wcstod_l.c = $(strtox-CFLAGS)
 CFLAGS-wcstold_l.c = $(strtox-CFLAGS)
 CFLAGS-wcstof_l.c = $(strtox-CFLAGS)
+CFLAGS-tst-wchar-h.c = -D_FORTIFY_SOURCE=2
 
 tst-btowc-ENV = LOCPATH=$(common-objpfx)localedata
 tst-mbrtowc-ENV = LOCPATH=$(common-objpfx)localedata
diff --git a/wcsmbs/tst-wchar-h.c b/wcsmbs/tst-wchar-h.c
new file mode 100644 (file)
index 0000000..4cf2dd0
--- /dev/null
@@ -0,0 +1,9 @@
+#include <stdlib.h>
+#include <wchar.h>
+
+int
+main (void)
+{
+  mbstate_t x;
+  return sizeof (x) - sizeof (mbstate_t);
+}