From c975787c6c6ed685f5eb026201249df9df87656f Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 6 Jun 2023 13:19:14 +0000 Subject: [PATCH] 0033404: Configuration - Building with Cotire failed on Clang-15 Replaced old including of int defs from C standard into C++(11+) standard --- src/ExpToCasExe/exptocas.lex | 4 +--- src/ExpToCasExe/lex.exptocas.cxx | 4 +--- src/Standard/Standard_TypeDef.hxx | 37 ++----------------------------- src/StepFile/lex.step.cxx | 4 +--- src/StepFile/step.lex | 4 +--- 5 files changed, 6 insertions(+), 47 deletions(-) diff --git a/src/ExpToCasExe/exptocas.lex b/src/ExpToCasExe/exptocas.lex index ac71e0a878..6683335d03 100644 --- a/src/ExpToCasExe/exptocas.lex +++ b/src/ExpToCasExe/exptocas.lex @@ -86,9 +86,7 @@ int ec_error ( const std::string& s, const std::string& text ) %top{ // Pre-include stdlib.h to avoid redefinition of integer type macros (INT8_MIN and similar in generated code) -#if !defined(_MSC_VER) || (_MSC_VER >= 1600) // Visual Studio 2010+ -#include "stdint.h" -#endif +#include } %{ diff --git a/src/ExpToCasExe/lex.exptocas.cxx b/src/ExpToCasExe/lex.exptocas.cxx index 59c0574de6..a611107d16 100644 --- a/src/ExpToCasExe/lex.exptocas.cxx +++ b/src/ExpToCasExe/lex.exptocas.cxx @@ -1,7 +1,5 @@ // Pre-include stdlib.h to avoid redefinition of integer type macros (INT8_MIN and similar in generated code) -#if !defined(_MSC_VER) || (_MSC_VER >= 1600) // Visual Studio 2010+ -#include "stdint.h" -#endif +#include #define YY_INT_ALIGNED short int diff --git a/src/Standard/Standard_TypeDef.hxx b/src/Standard/Standard_TypeDef.hxx index 4b23181ed4..a308c64df4 100755 --- a/src/Standard/Standard_TypeDef.hxx +++ b/src/Standard/Standard_TypeDef.hxx @@ -17,41 +17,8 @@ #include #include - -#include - -#if(defined(_MSC_VER) && (_MSC_VER < 1800)) - // only Visual Studio 2013 (vc12) provides header - // we do not defined all macros here - only used by OCCT framework - #define PRIx64 "I64x" - #define PRIX64 "I64X" - #define PRId64 "I64d" - #define PRIu64 "I64u" - #define SCNd64 "I64d" - #define SCNu64 "I64u" - #ifdef _WIN64 - #define PRIxPTR "I64x" - #define PRIXPTR "I64X" - #define PRIdPTR "I64d" - #define PRIuPTR "I64u" - #define SCNdPTR "I64d" - #define SCNuPTR "I64u" - #else - #define PRIxPTR "Ix" - #define PRIXPTR "IX" - #define PRIdPTR "d" - #define PRIuPTR "u" - #define SCNdPTR "d" - #define SCNuPTR "u" - #endif -#else - // should be just since C++11 - // however we use this code for compatibility with old C99 compilers - #ifndef __STDC_FORMAT_MACROS - #define __STDC_FORMAT_MACROS - #endif - #include -#endif +#include +#include #define Standard_False false #define Standard_True true diff --git a/src/StepFile/lex.step.cxx b/src/StepFile/lex.step.cxx index b87ec7705e..fd70f46fcb 100644 --- a/src/StepFile/lex.step.cxx +++ b/src/StepFile/lex.step.cxx @@ -2,9 +2,7 @@ // This file is generated, do not modify it directly; edit source file step.lex instead. // Pre-include stdlib.h to avoid redefinition of integer type macros (INT8_MIN and similar in generated code) -#if !defined(_MSC_VER) || (_MSC_VER >= 1600) // Visual Studio 2010+ -#include "stdint.h" -#endif +#include #define YY_INT_ALIGNED short int diff --git a/src/StepFile/step.lex b/src/StepFile/step.lex index a2a401da51..30d4a7e937 100644 --- a/src/StepFile/step.lex +++ b/src/StepFile/step.lex @@ -33,9 +33,7 @@ // This file is generated, do not modify it directly; edit source file step.lex instead. // Pre-include stdlib.h to avoid redefinition of integer type macros (INT8_MIN and similar in generated code) -#if !defined(_MSC_VER) || (_MSC_VER >= 1600) // Visual Studio 2010+ -#include "stdint.h" -#endif +#include } %{