diff options
author | 2018-04-13 03:36:52 +0800 | |
---|---|---|
committer | 2018-04-12 12:36:52 -0700 | |
commit | 7bf6efa2d8e1172df47c1c4a8a09a007a1a09e8f (patch) | |
tree | 3ce93a2e3f06f6a82235365d24c14dc678e01eed /tensorflow/core/lib/strings/stringprintf.cc | |
parent | eaaee5d7aa5df8157c4128568a8f7703458723cd (diff) |
Replace all COMPILER_MSVC to _MSC_VER and _WIN32 accordingly (#18448)
* Replace all COMPILER_MSVC to _MSC_VER and _WIN32 accordingly
* One more ARRAYSIZE to TF_ARRAYSIZE
* Delete non-existing include
Diffstat (limited to 'tensorflow/core/lib/strings/stringprintf.cc')
-rw-r--r-- | tensorflow/core/lib/strings/stringprintf.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/tensorflow/core/lib/strings/stringprintf.cc b/tensorflow/core/lib/strings/stringprintf.cc index 03eba4c851..bbffa062a9 100644 --- a/tensorflow/core/lib/strings/stringprintf.cc +++ b/tensorflow/core/lib/strings/stringprintf.cc @@ -22,12 +22,6 @@ limitations under the License. namespace tensorflow { namespace strings { -#ifdef COMPILER_MSVC -enum { IS_COMPILER_MSVC = 1 }; -#else -enum { IS_COMPILER_MSVC = 0 }; -#endif - void Appendv(string* dst, const char* format, va_list ap) { // First try with a small fixed size buffer static const int kSpaceLength = 1024; @@ -48,13 +42,13 @@ void Appendv(string* dst, const char* format, va_list ap) { return; } - if (IS_COMPILER_MSVC) { +#ifdef _MSC_VER // Error or MSVC running out of space. MSVC 8.0 and higher // can be asked about space needed with the special idiom below: va_copy(backup_ap, ap); result = vsnprintf(nullptr, 0, format, backup_ap); va_end(backup_ap); - } +#endif if (result < 0) { // Just an error. |