From: Andy Heninger Date: Sun, 19 Feb 2017 21:58:30 +0000 (+0000) Subject: ICU-12993 undef __STRICT_ANSI__ on some platforms. X-Git-Tag: release-59-rc~143 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1cb68586593282710a3f9f68c2b35af1033a18b;p=icu ICU-12993 undef __STRICT_ANSI__ on some platforms. X-SVN-Rev: 39692 --- diff --git a/icu4c/source/io/ufile.cpp b/icu4c/source/io/ufile.cpp index 756faa5f734..6cbb897555d 100644 --- a/icu4c/source/io/ufile.cpp +++ b/icu4c/source/io/ufile.cpp @@ -20,6 +20,14 @@ ****************************************************************************** */ +#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 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"