Comments (5)
EABase was designed to include "inttypes.h" directly for you so there is no need to include inttypes after EABase.
from eastl.
In practice it is a problem, because another software package I use includes inttypes.h in its public headers. So it is not something that I can work around that easily.
from eastl.
You can try defining 'EA_COMPILER_HAS_C99_FORMAT_MACROS' before EABase as it prevents the definition of the C99 format specifiers you cite are causing the problem. Other than that I don't have any other ideas as the C standard doesn't specify a method to prevent inttypes.h from defining them.
from eastl.
The following changes fix the problem for me, and the test suite still passes. Is it something that could be included main line?
diff --git a/test/packages/EABase/include/Common/EABase/eabase.h b/test/packages/EABase/include/Common/EABase/eabase.h
index 4fd16e5..089e3bb 100644
--- a/test/packages/EABase/include/Common/EABase/eabase.h
+++ b/test/packages/EABase/include/Common/EABase/eabase.h
@@ -114,8 +114,8 @@
#define __STDC_FORMAT_MACROS
#endif
// The GCC PSP compiler defines standard int types (e.g. uint32_t) but not PRId8, etc.
- // MSVC doesn't include an inttypes.h header.
- #if !defined(EA_COMPILER_MSVC)
+ // Old MSVC versions do not include an inttypes.h header.
+ #if !defined(EA_COMPILER_MSVC) || _MSC_VER >= 1900
#include <inttypes.h> // PRId8, SCNd8, etc.
#endif
#if defined(_MSC_VER)
@@ -355,7 +355,7 @@
typedef double double_t;
#endif
-#if defined(EA_COMPILER_HAS_INTTYPES) && !defined(EA_COMPILER_MSVC)
+#if defined(EA_COMPILER_HAS_INTTYPES) && (!defined(EA_COMPILER_MSVC) || _MSC_VER >= 1900)
#define EA_COMPILER_HAS_C99_FORMAT_MACROS
#endif
from eastl.
I did some googling but I couldn't find the anything about MS now including the inttypes.h file which is part of the C99 standard.
from eastl.
Related Issues (20)
- Incorrect behaviour of vector (and other) with switched off exceptions HOT 1
- [MSVC][std:c++latest] EASTL failed to build with msvc due to error C2338 on Windows
- Eastl is susport windows kernel? HOT 1
- Building EASTL HOT 1
- [MSVC][std:c++latest] EASTL build failed due to error C2666: 'TestLruCacheInternal::Foo::operator ==': overloaded functions have similar conversions HOT 2
- intrusive_slist is not implemented
- No signed tarball for releases
- Build with Clang15 results in warnings about deprecated builtins HOT 1
- Inquiry about the expected behavior of the comparison operators in RingBuffer HOT 1
- compilation error due to `std::remove_reference` HOT 5
- Tests fail to compile: error: use of undeclared identifier 'getpid'
- Tests fail to compile: error: use of undeclared identifier 'pthread_attr_get_np'
- Tests fail to link: ld: error: undefined symbol: EA::EAMain::InitializeSignalHandler()
- Consider using reset() for fast container teardown - Best pratices HOT 2
- emscripten support? HOT 1
- [Question] Should eastl::unordered_set.reserve not check if a change is required?
- Error of RBTreeDecrement function HOT 3
- Move semantic dosn't work with eastl::list HOT 2
- Critical silent bug: vector push back of an own element moves it and calls a copy constructor on the invalidated reference HOT 1
- Overriding make_unique and default_delete HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eastl.