am e5205d35: am 089c7c92: Merge "Document a known test issue in stdio_test.cpp."

* commit 'e5205d35efb594cf1f645237b85114da45c2a352':
  Document a known test issue in stdio_test.cpp.
This commit is contained in:
Calin Juravle 2014-05-15 09:42:04 +00:00 committed by Android Git Automerger
commit 08589ca235

View File

@ -583,9 +583,11 @@ TEST(stdio, fpos_t_and_seek) {
ASSERT_STREQ("C.UTF-8", setlocale(LC_CTYPE, "C.UTF-8")); ASSERT_STREQ("C.UTF-8", setlocale(LC_CTYPE, "C.UTF-8"));
uselocale(LC_GLOBAL_LOCALE); uselocale(LC_GLOBAL_LOCALE);
// For glibc we need to close and re-open the file in order for fseek to work // In glibc-2.16 fseek doesn't work properly in wide mode
// after using setlocale(LC_CTYPE, "C.UTF-8") and fputwc. // (https://sourceware.org/bugzilla/show_bug.cgi?id=14543). One workaround is
// TODO: find out if this is expected or a bug in glibc. // to close and re-open the file. We do it in order to make the test pass
// with all glibcs.
TemporaryFile tf; TemporaryFile tf;
FILE* fp = fdopen(tf.fd, "w+"); FILE* fp = fdopen(tf.fd, "w+");
ASSERT_TRUE(fp != NULL); ASSERT_TRUE(fp != NULL);