]> granicus.if.org Git - icu/commitdiff
ICU-12993 undef __STRICT_ANSI__ on some platforms.
authorAndy Heninger <andy.heninger@gmail.com>
Sun, 19 Feb 2017 21:58:30 +0000 (21:58 +0000)
committerAndy Heninger <andy.heninger@gmail.com>
Sun, 19 Feb 2017 21:58:30 +0000 (21:58 +0000)
X-SVN-Rev: 39692

icu4c/source/io/ufile.cpp

index 756faa5f734b2073f30ecf04ffbb86ba46666832..6cbb897555d3c73cc72b04c9bd19273073bc417b 100644 (file)
 ******************************************************************************
 */
 
+#include "unicode/platform.h"
+#if defined(__GNUC__) && !defined(__clang__) && defined(__STRICT_ANSI__)
+// g++, fileno isn't defined                  if     __STRICT_ANSI__ is defined.
+// clang fails to compile the <string> header unless __STRICT_ANSI__ is defined.
+// __GNUC__ is set by both gcc and clang.
+#undef __STRICT_ANSI__
+#endif
+
 #include "locmap.h"
 #include "unicode/ustdio.h"