From: gvictor <35373048+gvictor@users.noreply.github.com> Date: Thu, 4 Oct 2018 23:29:57 +0000 (+0100) Subject: ICU-20193 urename.h shouldn't be ignored by other compilers except VS IntelliSense... X-Git-Tag: release-64-rc~287 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ff72d74d1eeedb6f4ae9326a87f90eaad7b8595d;p=icu ICU-20193 urename.h shouldn't be ignored by other compilers except VS IntelliSense (#189) The macro _MSC_VER is not defined in other compilers. Change the logic and so urename.h is ignored on VS IntelliSense --- diff --git a/icu4c/source/common/unicode/urename.h b/icu4c/source/common/unicode/urename.h index 3ca837bae9d..5812173e39c 100644 --- a/icu4c/source/common/unicode/urename.h +++ b/icu4c/source/common/unicode/urename.h @@ -34,7 +34,7 @@ #if !U_DISABLE_RENAMING // Disable Renaming for Visual Studio's IntelliSense feature, so that 'Go-to-Definition' (F12) will work. -#if defined(_MSC_VER) && !defined(__INTELLISENSE__) +#if !(defined(_MSC_VER) && defined(__INTELLISENSE__)) /* We need the U_ICU_ENTRY_POINT_RENAME definition. There's a default one in unicode/uvernum.h we can use, but we will give the platform a chance to define it first. @@ -1858,7 +1858,7 @@ #define ztrans_setTime U_ICU_ENTRY_POINT_RENAME(ztrans_setTime) #define ztrans_setTo U_ICU_ENTRY_POINT_RENAME(ztrans_setTo) -#endif /* defined(_MSC_VER) && !defined(__INTELLISENSE__) */ +#endif /* !(defined(_MSC_VER) && defined(__INTELLISENSE__)) */ #endif /* U_DISABLE_RENAMING */ #endif /* URENAME_H */ diff --git a/icu4c/source/tools/genren/genren.pl b/icu4c/source/tools/genren/genren.pl index 76f8c0f392b..f85b96ac607 100755 --- a/icu4c/source/tools/genren/genren.pl +++ b/icu4c/source/tools/genren/genren.pl @@ -107,7 +107,7 @@ print HEADER <<"EndOfHeaderComment"; #if !U_DISABLE_RENAMING // Disable Renaming for Visual Studio's IntelliSense feature, so that 'Go-to-Definition' (F12) will work. -#if defined(_MSC_VER) && !defined(__INTELLISENSE__) +#if !(defined(_MSC_VER) && defined(__INTELLISENSE__)) /* We need the U_ICU_ENTRY_POINT_RENAME definition. There's a default one in unicode/uvernum.h we can use, but we will give the platform a chance to define it first. @@ -242,7 +242,7 @@ foreach(sort keys(%CFuncs)) { print HEADER <<"EndOfHeaderFooter"; -#endif /* defined(_MSC_VER) && !defined(__INTELLISENSE__) */ +#endif /* !(defined(_MSC_VER) && defined(__INTELLISENSE__)) */ #endif /* U_DISABLE_RENAMING */ #endif /* URENAME_H */