[PATCH 3/4] include: Switch if to ifdef

Rosen Penev rosenp at gmail.com
Sat Aug 3 01:55:57 UTC 2019


Throws -Wundef warning in modern compilers.

Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 include/cstdio | 2 +-
 include/new    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/cstdio b/include/cstdio
index 8699385..f959ff5 100644
--- a/include/cstdio
+++ b/include/cstdio
@@ -65,7 +65,7 @@ namespace std{
 	using ::sprintf;
 	using ::sscanf;
 	using ::tmpfile;
-#if _GLIBCXX_USE_TMPNAM
+#ifdef _GLIBCXX_USE_TMPNAM
 	using ::tmpnam;
 #endif
 	using ::ungetc;
diff --git a/include/new b/include/new
index 6214b11..1dc33a4 100644
--- a/include/new
+++ b/include/new
@@ -39,13 +39,13 @@ namespace std{
 
 _UCXXEXPORT void* operator new(std::size_t numBytes) _UCXX_THROW(std::bad_alloc);
 _UCXXEXPORT void operator delete(void* ptr) _UCXX_USE_NOEXCEPT;
-#if __cpp_sized_deallocation
+#ifdef __cpp_sized_deallocation
 _UCXXEXPORT void operator delete(void* ptr, std::size_t) _UCXX_USE_NOEXCEPT;
 #endif
 
 _UCXXEXPORT void* operator new[](std::size_t numBytes) _UCXX_THROW(std::bad_alloc);
 _UCXXEXPORT void operator delete[](void * ptr) _UCXX_USE_NOEXCEPT;
-#if __cpp_sized_deallocation
+#ifdef __cpp_sized_deallocation
 _UCXXEXPORT void operator delete[](void * ptr, std::size_t) _UCXX_USE_NOEXCEPT;
 #endif
 
-- 
2.17.1



More information about the uClibc mailing list