diff options
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. |