From f70eb2972660a1dee8704fa8625d43374aa0285a Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Thu, 30 Jul 2015 22:29:51 +0000 Subject: [PATCH] ICU-11689 remove ICU-231 patch for VS2015 ufile.c X-SVN-Rev: 37704 --- icu4c/source/io/ufile.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/icu4c/source/io/ufile.c b/icu4c/source/io/ufile.c index a8d8f0a3a60..ab9f70a3d5c 100644 --- a/icu4c/source/io/ufile.c +++ b/icu4c/source/io/ufile.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1998-2014, International Business Machines +* Copyright (C) 1998-2015, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -63,7 +63,19 @@ finit_owner(FILE *f, uprv_memset(result, 0, sizeof(UFILE)); result->fFileno = fileno(f); -#if U_PLATFORM_USES_ONLY_WIN32_API +#if U_PLATFORM_USES_ONLY_WIN32_API && _MSC_VER < 1900 + /* + * Below is a very old workaround (ICU ticket:231). + * + * Previously, 'FILE*' from inside and outside ICU's DLL + * were different, because they pointed into local copies + * of the io block. At least by VS 2015 the implementation + * is something like: + * stdio = _acrt_iob_func(0) + * .. which is a function call, so should return the same pointer + * regardless of call site. + * As of _MSC_VER 1900 this patch is retired, at 16 years old. + */ if (0 <= result->fFileno && result->fFileno <= 2) { /* stdin, stdout and stderr need to be special cased for Windows 98 */ #if _MSC_VER >= 1400