From 44b34b32029c14d55abdea6cc1e8a52fafc9805d Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 10 Jan 2022 11:37:07 +0100 Subject: [PATCH 1/2] Revert "change include directives to use double quotes" This does not seem to be a complete and proper fix for the conflict between uclibc++ new/delete and the ones defined by the AVR core, since it only fixes conflicts in the header files, but source files might still produce linker errors. So better revert it and stay closer to upstream uclibc++ sources. This reverts commit 84b4a911b8228bf3dfb4133f3992ddad36366a3a. --- src/Arduino_AVRSTL.cpp | 2 +- src/Arduino_AVRSTL.h | 2 +- src/abi/abi.cpp | 6 +++--- src/algorithm | 8 ++++---- src/algorithm.cpp | 2 +- src/array | 4 ++-- src/associative_base | 10 +++++----- src/associative_base.cpp | 2 +- src/basic_definitions | 2 +- src/bitset | 12 ++++++------ src/bitset.cpp | 2 +- src/char_traits | 10 +++++----- src/char_traits.cpp | 4 ++-- src/complex | 4 ++-- src/complex.cpp | 2 +- src/cstdio | 2 +- src/cstdlib | 2 +- src/cstring | 2 +- src/ctime | 2 +- src/cwchar | 2 +- src/del_opnt.cpp | 6 +++--- src/del_ops.cpp | 6 +++--- src/del_opvnt.cpp | 6 +++--- src/del_opvs.cpp | 6 +++--- src/deque | 6 +++--- src/deque.cpp | 2 +- src/eh_alloc.cpp | 8 ++++---- src/eh_globals.cpp | 8 ++++---- src/exception | 2 +- src/exception.cpp | 2 +- src/func_exception | 4 ++-- src/func_exception.cpp | 8 ++++---- src/functional | 2 +- src/iomanip | 4 ++-- src/iomanip.cpp | 2 +- src/ios | 8 ++++---- src/ios.cpp | 8 ++++---- src/iosfwd | 6 +++--- src/iostream | 12 ++++++------ src/iostream.cpp | 2 +- src/istream | 10 +++++----- src/istream.cpp | 2 +- src/istream_helpers | 6 +++--- src/iterator | 10 +++++----- src/iterator.cpp | 2 +- src/iterator_base | 2 +- src/limits | 2 +- src/limits.cpp | 2 +- src/list | 8 ++++---- src/list.cpp | 2 +- src/locale | 6 +++--- src/locale.cpp | 10 +++++----- src/map | 10 +++++----- src/map.cpp | 2 +- src/memory | 12 ++++++------ src/new | 6 +++--- src/new_handler.cpp | 2 +- src/new_opnt.cpp | 6 +++--- src/new_opvnt.cpp | 6 +++--- src/numeric | 4 ++-- src/numeric.cpp | 2 +- src/ostream | 10 +++++----- src/ostream.cpp | 2 +- src/ostream_helpers | 10 +++++----- src/ostream_helpers.cpp | 2 +- src/queue | 8 ++++---- src/queue.cpp | 2 +- src/serstream | 12 ++++++------ src/set | 12 ++++++------ src/set.cpp | 2 +- src/sstream | 14 +++++++------- src/sstream.cpp | 2 +- src/stack | 4 ++-- src/stack.cpp | 2 +- src/stdexcept | 6 +++--- src/stdexcept.cpp | 4 ++-- src/streambuf | 10 +++++----- src/streambuf.cpp | 2 +- src/string | 14 +++++++------- src/string.cpp | 10 +++++----- src/string_iostream | 10 +++++----- src/support | 6 +++--- src/support.cpp | 2 +- src/type_traits | 8 ++++---- src/typeinfo | 2 +- src/typeinfo.cpp | 2 +- src/unwind-cxx.h | 6 +++--- src/utility | 2 +- src/utility.cpp | 2 +- src/valarray | 6 +++--- src/valarray.cpp | 2 +- src/vector | 14 +++++++------- src/vector.cpp | 2 +- 93 files changed, 247 insertions(+), 247 deletions(-) diff --git a/src/Arduino_AVRSTL.cpp b/src/Arduino_AVRSTL.cpp index ad8bc10..3c00976 100644 --- a/src/Arduino_AVRSTL.cpp +++ b/src/Arduino_AVRSTL.cpp @@ -1,4 +1,4 @@ -#include "Arduino_AVRSTL.h" +#include #include // diff --git a/src/Arduino_AVRSTL.h b/src/Arduino_AVRSTL.h index d692afa..35a5ade 100644 --- a/src/Arduino_AVRSTL.h +++ b/src/Arduino_AVRSTL.h @@ -10,7 +10,7 @@ #define ARDUINOSTL_M_H #include -#include "serstream" +#include // Create cout and cin.. there doesn't seem to be a way // to control what serial device at runtime. Grr. diff --git a/src/abi/abi.cpp b/src/abi/abi.cpp index 94f966c..ecc2048 100644 --- a/src/abi/abi.cpp +++ b/src/abi/abi.cpp @@ -17,9 +17,9 @@ USA. */ -#include "cstdlib" -#include "typeinfo" -#include "basic_definitions" +#include +#include +#include /* This file implements a number of the language support features * needed to deal with the C++ abi, as originally documented in the diff --git a/src/algorithm b/src/algorithm index 1e981d7..5240349 100644 --- a/src/algorithm +++ b/src/algorithm @@ -15,10 +15,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "cstdlib" -#include "iterator" -#include "utility" -#include "functional" +#include +#include +#include +#include #ifndef __STD_HEADER_ALGORITHM #define __STD_HEADER_ALGORITHM 1 diff --git a/src/algorithm.cpp b/src/algorithm.cpp index 74ba15c..e21b14e 100644 --- a/src/algorithm.cpp +++ b/src/algorithm.cpp @@ -18,7 +18,7 @@ */ -#include "algorithm" +#include namespace std{ diff --git a/src/array b/src/array index ce4ab00..094ecf9 100644 --- a/src/array +++ b/src/array @@ -1,8 +1,8 @@ #ifndef __ARRAY__ #define __ARRAY__ -#include "cstddef" -#include "initializer_list" +#include +#include namespace std { diff --git a/src/associative_base b/src/associative_base index 62a162a..27ae0ef 100644 --- a/src/associative_base +++ b/src/associative_base @@ -18,11 +18,11 @@ -#include "memory" -#include "utility" -#include "iterator" -#include "functional" -#include "list" +#include +#include +#include +#include +#include #ifndef __STD_HEADER_ASSOCIATIVE_BASE diff --git a/src/associative_base.cpp b/src/associative_base.cpp index 583ae46..cc2d20e 100644 --- a/src/associative_base.cpp +++ b/src/associative_base.cpp @@ -17,7 +17,7 @@ */ -#include "associative_base" +#include namespace std{ diff --git a/src/basic_definitions b/src/basic_definitions index 40e4a4b..d4b6cd5 100644 --- a/src/basic_definitions +++ b/src/basic_definitions @@ -18,7 +18,7 @@ #ifndef __BASIC_DEFINITIONS #define __BASIC_DEFINITIONS 1 -#include "system_configuration.h" +#include #pragma GCC visibility push(default) diff --git a/src/bitset b/src/bitset index bdc30dd..50d5404 100644 --- a/src/bitset +++ b/src/bitset @@ -17,12 +17,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" -#include "cstddef" -#include "climits" -#include "func_exception" -#include "string" -#include "iosfwd" +#include +#include +#include +#include +#include +#include #ifndef __STD_BITSET_HEADER #define __STD_BITSET_HEADER 1 diff --git a/src/bitset.cpp b/src/bitset.cpp index acd881b..f1ece31 100644 --- a/src/bitset.cpp +++ b/src/bitset.cpp @@ -17,7 +17,7 @@ */ -#include "bitset" +#include namespace std{ diff --git a/src/char_traits b/src/char_traits index 99a5490..36eae36 100644 --- a/src/char_traits +++ b/src/char_traits @@ -16,14 +16,14 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" +#include #include -#include "exception" -#include "memory" +#include +#include #ifdef __UCLIBCXX_HAS_WCHAR__ -#include "cwchar" -#include "cwctype" +#include +#include #endif #ifndef __HEADER_CHAR_TRAITS diff --git a/src/char_traits.cpp b/src/char_traits.cpp index e5030ad..2a91bd9 100644 --- a/src/char_traits.cpp +++ b/src/char_traits.cpp @@ -21,8 +21,8 @@ #define __UCLIBCXX_COMPILE_CHAR_TRAITS__ 1 -#include "basic_definitions" -#include "char_traits" +#include +#include namespace std{ diff --git a/src/complex b/src/complex index b737180..61e489e 100644 --- a/src/complex +++ b/src/complex @@ -17,8 +17,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "istream" -#include "ostream" +#include +#include #ifndef __STD_HEADER_COMPLEX #define __STD_HEADER_COMPLEX 1 diff --git a/src/complex.cpp b/src/complex.cpp index 764b0c2..6b895a8 100644 --- a/src/complex.cpp +++ b/src/complex.cpp @@ -16,7 +16,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "complex" +#include namespace std{ diff --git a/src/cstdio b/src/cstdio index aa38877..8f4df27 100644 --- a/src/cstdio +++ b/src/cstdio @@ -16,7 +16,7 @@ */ #include -#include "basic_definitions" +#include #ifndef __HEADER_CSTDIO #define __HEADER_CSTDIO 1 diff --git a/src/cstdlib b/src/cstdlib index 0114824..e45261a 100644 --- a/src/cstdlib +++ b/src/cstdlib @@ -17,7 +17,7 @@ */ #include -#include "basic_definitions" +#include #ifndef __HEADER_CSTDLIB #define __HEADER_CSTDLIB 1 diff --git a/src/cstring b/src/cstring index e40c11d..de8589b 100644 --- a/src/cstring +++ b/src/cstring @@ -16,7 +16,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "cstddef" +#include #include #ifndef __HEADER_CSTRING diff --git a/src/ctime b/src/ctime index 136d71b..1b4c09b 100644 --- a/src/ctime +++ b/src/ctime @@ -46,7 +46,7 @@ #pragma GCC system_header -#include "cstddef" +#include #include diff --git a/src/cwchar b/src/cwchar index 6a851e4..03fae09 100644 --- a/src/cwchar +++ b/src/cwchar @@ -16,7 +16,7 @@ */ #include -#include "basic_definitions" +#include #ifndef __HEADER_CWCHAR #define __HEADER_CWCHAR 1 diff --git a/src/del_opnt.cpp b/src/del_opnt.cpp index 71627bb..96cb03b 100644 --- a/src/del_opnt.cpp +++ b/src/del_opnt.cpp @@ -17,9 +17,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "new" -#include "cstdlib" -#include "func_exception" +#include +#include +#include #ifndef NO_NOTHROW _UCXXEXPORT void operator delete(void* ptr, const std::nothrow_t& ) throw() { diff --git a/src/del_ops.cpp b/src/del_ops.cpp index 3c7d413..e292b03 100644 --- a/src/del_ops.cpp +++ b/src/del_ops.cpp @@ -18,9 +18,9 @@ */ /* C++14 sized deallocation */ -#include "new" -#include "cstdlib" -#include "func_exception" +#include +#include +#include _UCXXEXPORT void operator delete(void* ptr, std::size_t) throw(){ ::operator delete (ptr); diff --git a/src/del_opvnt.cpp b/src/del_opvnt.cpp index 27ba445..f2a2a36 100644 --- a/src/del_opvnt.cpp +++ b/src/del_opvnt.cpp @@ -17,9 +17,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "new" -#include "cstdlib" -#include "func_exception" +#include +#include +#include #ifndef NO_NOTHROW _UCXXEXPORT void operator delete[](void* ptr, const std::nothrow_t& ) throw(){ diff --git a/src/del_opvs.cpp b/src/del_opvs.cpp index aa22016..1c92d1f 100644 --- a/src/del_opvs.cpp +++ b/src/del_opvs.cpp @@ -18,9 +18,9 @@ */ /* C++14 sized deallocation */ -#include "new" -#include "cstdlib" -#include "func_exception" +#include +#include +#include _UCXXEXPORT void operator delete[](void * ptr, std::size_t) throw(){ ::operator delete[] (ptr); diff --git a/src/deque b/src/deque index 80dd94b..ff07ab5 100644 --- a/src/deque +++ b/src/deque @@ -17,9 +17,9 @@ */ -#include "memory" -#include "iterator" -#include "stdexcept" +#include +#include +#include #pragma GCC visibility push(default) diff --git a/src/deque.cpp b/src/deque.cpp index 2842a83..c515580 100644 --- a/src/deque.cpp +++ b/src/deque.cpp @@ -17,7 +17,7 @@ */ -#include "deque" +#include namespace std{ diff --git a/src/eh_alloc.cpp b/src/eh_alloc.cpp index 6310f33..cdf28e0 100644 --- a/src/eh_alloc.cpp +++ b/src/eh_alloc.cpp @@ -17,12 +17,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "cstdlib" -#include "cstring" -#include "func_exception" +#include +#include +#include //This is a system-specific header which does all of the error-handling management -#include "unwind-cxx.h" +#include namespace __cxxabiv1 { diff --git a/src/eh_globals.cpp b/src/eh_globals.cpp index bac0bc2..38d4583 100644 --- a/src/eh_globals.cpp +++ b/src/eh_globals.cpp @@ -17,12 +17,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "cstdlib" -#include "cstring" -#include "func_exception" +#include +#include +#include //This is a system-specific header which does all of the error-handling management -#include "unwind-cxx.h" +#include //The following functionality is derived from reading of the GNU libstdc++ code and making it...simple diff --git a/src/exception b/src/exception index 38b6dae..bdf393e 100644 --- a/src/exception +++ b/src/exception @@ -37,7 +37,7 @@ #ifndef __EXCEPTION__ #define __EXCEPTION__ -#include "basic_definitions" +#include extern "C++" { diff --git a/src/exception.cpp b/src/exception.cpp index c7955b2..82021dd 100644 --- a/src/exception.cpp +++ b/src/exception.cpp @@ -18,7 +18,7 @@ */ -#include "exception" +#include //We can't do this yet because gcc is too stupid to be able to handle //different implementations of exception class. diff --git a/src/func_exception b/src/func_exception index 9d525d4..1b7bdd8 100644 --- a/src/func_exception +++ b/src/func_exception @@ -17,8 +17,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" -#include "exception" +#include +#include #ifndef HEADER_IMPLEMENTATION_FUNC_EXCEPTION diff --git a/src/func_exception.cpp b/src/func_exception.cpp index c295ba3..fab095f 100644 --- a/src/func_exception.cpp +++ b/src/func_exception.cpp @@ -17,10 +17,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "exception" -#include "func_exception" -#include "stdexcept" -#include "cstdlib" +#include +#include +#include +#include namespace std{ diff --git a/src/functional b/src/functional index 361e057..b7932e2 100644 --- a/src/functional +++ b/src/functional @@ -19,7 +19,7 @@ #ifndef __STD_HEADER_FUNCTIONAL #define __STD_HEADER_FUNCTIONAL 1 -#include "basic_definitions" +#include #pragma GCC visibility push(default) diff --git a/src/iomanip b/src/iomanip index f455773..14a8260 100644 --- a/src/iomanip +++ b/src/iomanip @@ -17,8 +17,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "exception" -#include "ios" +#include +#include #ifndef __STD_IOMANIP #define __STD_IOMANIP 1 diff --git a/src/iomanip.cpp b/src/iomanip.cpp index c35d256..c5e60cc 100644 --- a/src/iomanip.cpp +++ b/src/iomanip.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "iomanip" +#include namespace std{ diff --git a/src/ios b/src/ios index d601187..63dc4ed 100644 --- a/src/ios +++ b/src/ios @@ -17,10 +17,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" -#include "cstddef" -#include "locale" -#include "iosfwd" +#include +#include +#include +#include #ifndef __HEADER_STD_IOS #define __HEADER_STD_IOS 1 diff --git a/src/ios.cpp b/src/ios.cpp index 10d19b7..6d83cef 100644 --- a/src/ios.cpp +++ b/src/ios.cpp @@ -19,10 +19,10 @@ #define __UCLIBCXX_COMPILE_IOS__ 1 -#include "ios" -#include "ostream" -#include "istream" -#include "cstdio" +#include +#include +#include +#include namespace std{ diff --git a/src/iosfwd b/src/iosfwd index ff01335..2c14725 100644 --- a/src/iosfwd +++ b/src/iosfwd @@ -17,9 +17,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" -#include "char_traits" -#include "memory" +#include +#include +#include #ifndef __HEADER_STD_IOSFWD diff --git a/src/iostream b/src/iostream index e95447b..64b5f06 100644 --- a/src/iostream +++ b/src/iostream @@ -17,16 +17,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" +#include #ifndef __HEADER_STD_IOSTREAM #define __HEADER_STD_IOSTREAM 1 -#include "iosfwd" -#include "ios" -#include "istream" -#include "ostream" -#include "string_iostream" +#include +#include +#include +#include +#include #pragma GCC visibility push(default) diff --git a/src/iostream.cpp b/src/iostream.cpp index a7e3266..7a190a2 100644 --- a/src/iostream.cpp +++ b/src/iostream.cpp @@ -19,7 +19,7 @@ #define __UCLIBCXX_COMPILE_IOSTREAM__ 1 -#include "iostream" +#include namespace std{ diff --git a/src/istream b/src/istream index af99999..a6fe3de 100644 --- a/src/istream +++ b/src/istream @@ -17,11 +17,11 @@ USA. */ -#include "ios" -#include "cctype" -#include "streambuf" -#include "istream_helpers" -#include "ostream" +#include +#include +#include +#include +#include #ifndef __STD_HEADER_ISTREAM #define __STD_HEADER_ISTREAM 1 diff --git a/src/istream.cpp b/src/istream.cpp index 81feed3..9e96139 100644 --- a/src/istream.cpp +++ b/src/istream.cpp @@ -20,7 +20,7 @@ #define __UCLIBCXX_COMPILE_ISTREAM__ 1 -#include "istream" +#include namespace std{ diff --git a/src/istream_helpers b/src/istream_helpers index 23bf3e1..baa8c2c 100644 --- a/src/istream_helpers +++ b/src/istream_helpers @@ -17,10 +17,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "ios" -#include "cctype" +#include +#include -#include "string" +#include #ifndef __STD_HEADER_ISTREAM_HELPERS #define __STD_HEADER_ISTREAM_HELPERS 1 diff --git a/src/iterator b/src/iterator index bcf90b7..d38fa1c 100644 --- a/src/iterator +++ b/src/iterator @@ -17,11 +17,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" -#include "iosfwd" -#include "cstddef" -#include "char_traits" -#include "iterator_base" +#include +#include +#include +#include +#include diff --git a/src/iterator.cpp b/src/iterator.cpp index 517a1d2..2e21517 100644 --- a/src/iterator.cpp +++ b/src/iterator.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "iterator" +#include namespace std{ diff --git a/src/iterator_base b/src/iterator_base index 333cbf8..1cae589 100644 --- a/src/iterator_base +++ b/src/iterator_base @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" +#include #ifndef __STD_HEADER_ITERATOR_BASE #define __STD_HEADER_ITERATOR_BASE 1 diff --git a/src/limits b/src/limits index 4747f82..e275eb5 100644 --- a/src/limits +++ b/src/limits @@ -16,7 +16,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "climits" +#include #ifndef __STD_HEADER_LIMITS #define __STD_HEADER_LIMITS 1 diff --git a/src/limits.cpp b/src/limits.cpp index 7f0f226..0fd42d5 100644 --- a/src/limits.cpp +++ b/src/limits.cpp @@ -17,7 +17,7 @@ */ -#include "limits" +#include namespace std{ diff --git a/src/list b/src/list index 782f92d..04afa2d 100644 --- a/src/list +++ b/src/list @@ -17,10 +17,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "memory" -#include "iterator" -#include "algorithm" -#include "initializer_list" +#include +#include +#include +#include #ifndef __STD_HEADER_LIST #define __STD_HEADER_LIST 1 diff --git a/src/list.cpp b/src/list.cpp index 716d839..cfc44e0 100644 --- a/src/list.cpp +++ b/src/list.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "list" +#include namespace std{ diff --git a/src/locale b/src/locale index cbe0628..96e6bc9 100644 --- a/src/locale +++ b/src/locale @@ -17,9 +17,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" -#include "cstddef" -#include "string" +#include +#include +#include #ifndef __HEADER_STD_LOCALE #define __HEADER_STD_LOCALE 1 diff --git a/src/locale.cpp b/src/locale.cpp index bca1e20..bc41792 100644 --- a/src/locale.cpp +++ b/src/locale.cpp @@ -17,11 +17,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "locale" -#include "cstring" -#include "string" -#include "stdexcept" -#include "cctype" +#include +#include +#include +#include +#include namespace std{ diff --git a/src/map b/src/map index 2809ec9..44be710 100644 --- a/src/map +++ b/src/map @@ -18,11 +18,11 @@ -#include "memory" -#include "utility" -#include "iterator" -#include "associative_base" -#include "initializer_list" +#include +#include +#include +#include +#include #ifndef __STD_HEADER_MAP diff --git a/src/map.cpp b/src/map.cpp index 7fd96bd..06e56a0 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -17,7 +17,7 @@ */ -#include "map" +#include namespace std{ diff --git a/src/memory b/src/memory index 5db1671..2a7ce8c 100644 --- a/src/memory +++ b/src/memory @@ -17,12 +17,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "new" -#include "cstddef" -#include "cstdlib" -#include "iterator_base" -#include "utility" -#include "cstdio" +#include +#include +#include +#include +#include +#include #ifndef HEADER_STD_MEMORY #define HEADER_STD_MEMORY 1 diff --git a/src/new b/src/new index f353f06..12b52a4 100644 --- a/src/new +++ b/src/new @@ -17,9 +17,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" -#include "exception" -#include "cstddef" +#include +#include +#include #ifndef __STD_NEW_OPERATOR #define __STD_NEW_OPERATOR 1 diff --git a/src/new_handler.cpp b/src/new_handler.cpp index 5a82e66..1d85ee3 100644 --- a/src/new_handler.cpp +++ b/src/new_handler.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "new" +#include const std::nothrow_t std::nothrow = { }; diff --git a/src/new_opnt.cpp b/src/new_opnt.cpp index 30fc4c7..cffce61 100644 --- a/src/new_opnt.cpp +++ b/src/new_opnt.cpp @@ -17,9 +17,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "new" -#include "cstdlib" -#include "func_exception" +#include +#include +#include #ifndef NO_NOTHROW _UCXXEXPORT void* operator new(std::size_t numBytes, const std::nothrow_t& ) throw(){ diff --git a/src/new_opvnt.cpp b/src/new_opvnt.cpp index 3061199..3ea592a 100644 --- a/src/new_opvnt.cpp +++ b/src/new_opvnt.cpp @@ -17,9 +17,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "new" -#include "cstdlib" -#include "func_exception" +#include +#include +#include #ifndef NO_NOTHROW _UCXXEXPORT void* operator new[](std::size_t numBytes, const std::nothrow_t& ) throw(){ diff --git a/src/numeric b/src/numeric index c980eed..25d1b27 100644 --- a/src/numeric +++ b/src/numeric @@ -17,8 +17,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" -#include "exception" +#include +#include #ifndef __STD_NUMERIC_HEADER #define __STD_NUMERIC_HEADER 1 diff --git a/src/numeric.cpp b/src/numeric.cpp index aa6b8bd..eb93f2e 100644 --- a/src/numeric.cpp +++ b/src/numeric.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "numeric" +#include namespace std{ diff --git a/src/ostream b/src/ostream index 31673df..b112e94 100644 --- a/src/ostream +++ b/src/ostream @@ -17,15 +17,15 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" +#include #ifndef STD_HEADER_OSTREAM #define STD_HEADER_OSTREAM 1 -#include "iosfwd" -#include "streambuf" -#include "cstdio" -#include "ostream_helpers" +#include +#include +#include +#include #pragma GCC visibility push(default) diff --git a/src/ostream.cpp b/src/ostream.cpp index 6204769..0973871 100644 --- a/src/ostream.cpp +++ b/src/ostream.cpp @@ -19,7 +19,7 @@ #define __UCLIBCXX_COMPILE_OSTREAM__ 1 -#include "ostream" +#include namespace std{ diff --git a/src/ostream_helpers b/src/ostream_helpers index ef4c95e..813f573 100644 --- a/src/ostream_helpers +++ b/src/ostream_helpers @@ -18,11 +18,11 @@ */ #include -#include "basic_definitions" -#include "cstddef" -#include "ios" -#include "cctype" -#include "string" +#include +#include +#include +#include +#include #include // for floor() #ifndef __STD_HEADER_OSTREAM_HELPERS diff --git a/src/ostream_helpers.cpp b/src/ostream_helpers.cpp index 68499f0..004ce6f 100644 --- a/src/ostream_helpers.cpp +++ b/src/ostream_helpers.cpp @@ -6,7 +6,7 @@ * */ -#include "ostream_helpers" +#include #include namespace std { diff --git a/src/queue b/src/queue index 26f1781..b817b1d 100644 --- a/src/queue +++ b/src/queue @@ -15,10 +15,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" -#include "deque" -#include "vector" -#include "functional" +#include +#include +#include +#include #ifndef __HEADER_STD_QUEUE #define __HEADER_STD_QUEUE 1 diff --git a/src/queue.cpp b/src/queue.cpp index 99eaede..356efeb 100644 --- a/src/queue.cpp +++ b/src/queue.cpp @@ -16,7 +16,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "queue" +#include namespace std{ diff --git a/src/serstream b/src/serstream index a09a727..b6eb7bd 100644 --- a/src/serstream +++ b/src/serstream @@ -43,13 +43,13 @@ #ifndef __810370EC_AD69_4ef7_91F5_B1AA16F14712 #define __810370EC_AD69_4ef7_91F5_B1AA16F14712 -#include "basic_definitions" +#include -#include "iosfwd" -#include "ios" -#include "istream" -#include "ostream" -#include "iostream" +#include +#include +#include +#include +#include #include namespace std diff --git a/src/set b/src/set index 3da7af1..f376e47 100644 --- a/src/set +++ b/src/set @@ -18,12 +18,12 @@ -#include "memory" -#include "utility" -#include "iterator" -#include "deque" -#include "functional" -#include "associative_base" +#include +#include +#include +#include +#include +#include #ifndef __STD_HEADER_SET #define __STD_HEADER_SET diff --git a/src/set.cpp b/src/set.cpp index 251de50..61ec56a 100644 --- a/src/set.cpp +++ b/src/set.cpp @@ -17,7 +17,7 @@ */ -#include "set" +#include namespace std{ diff --git a/src/sstream b/src/sstream index f419c64..2969853 100644 --- a/src/sstream +++ b/src/sstream @@ -17,17 +17,17 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" +#include #ifndef HEADER_STD_SSTREAM #define HEADER_STD_SSTREAM 1 -#include "iosfwd" -#include "ios" -#include "istream" -#include "ostream" -#include "iostream" -#include "string" +#include +#include +#include +#include +#include +#include #pragma GCC visibility push(default) diff --git a/src/sstream.cpp b/src/sstream.cpp index c8c30d4..e712b67 100644 --- a/src/sstream.cpp +++ b/src/sstream.cpp @@ -19,7 +19,7 @@ #define __UCLIBCXX_COMPILE_SSTREAM__ 1 -#include "sstream" +#include namespace std{ diff --git a/src/stack b/src/stack index add7bfb..d4861b3 100644 --- a/src/stack +++ b/src/stack @@ -15,8 +15,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" -#include "deque" +#include +#include #ifndef __HEADER_STD_STACK #define __HEADER_STD_STACK 1 diff --git a/src/stack.cpp b/src/stack.cpp index 4e37ba0..53a21bb 100644 --- a/src/stack.cpp +++ b/src/stack.cpp @@ -16,7 +16,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "stack" +#include namespace std{ diff --git a/src/stdexcept b/src/stdexcept index 1e62afb..7557f24 100644 --- a/src/stdexcept +++ b/src/stdexcept @@ -17,9 +17,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" -#include "exception" -#include "string" +#include +#include +#include #ifndef HEADER_STD_EXCEPTIONS #define HEADER_STD_EXCEPTIONS 1 diff --git a/src/stdexcept.cpp b/src/stdexcept.cpp index 85289d5..90dccc7 100644 --- a/src/stdexcept.cpp +++ b/src/stdexcept.cpp @@ -17,8 +17,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "exception" -#include "stdexcept" +#include +#include #ifdef __UCLIBCXX_EXCEPTION_SUPPORT__ diff --git a/src/streambuf b/src/streambuf index b2481ca..0daa388 100644 --- a/src/streambuf +++ b/src/streambuf @@ -17,15 +17,15 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" -#include "locale" -#include "string" -#include "iosfwd" +#include +#include +#include +#include #ifndef HEADER_STD_STREAMBUF #define HEADER_STD_STREAMBUF 1 -#include "ios" +#include #pragma GCC visibility push(default) diff --git a/src/streambuf.cpp b/src/streambuf.cpp index 1647b60..5417324 100644 --- a/src/streambuf.cpp +++ b/src/streambuf.cpp @@ -19,7 +19,7 @@ #define __UCLIBCXX_COMPILE_STREAMBUF__ 1 -#include "streambuf" +#include namespace std{ diff --git a/src/string b/src/string index fa974c9..d22f051 100644 --- a/src/string +++ b/src/string @@ -17,17 +17,17 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" -#include "char_traits" +#include +#include #include -#include "func_exception" -#include "memory" -#include "vector" +#include +#include +#include #ifdef __UCLIBCXX_HAS_WCHAR__ -#include "cwchar" -#include "cwctype" +#include +#include #endif #ifndef __HEADER_STD_STRING diff --git a/src/string.cpp b/src/string.cpp index 73c3eb6..1edf69b 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -19,12 +19,12 @@ #define __UCLIBCXX_COMPILE_STRING__ 1 -#include "basic_definitions" -#include "char_traits" -#include "string" -#include "string_iostream" +#include +#include +#include +#include #include -#include "ostream" +#include namespace std{ diff --git a/src/string_iostream b/src/string_iostream index ebbe65d..355fd58 100644 --- a/src/string_iostream +++ b/src/string_iostream @@ -17,13 +17,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "istream" -#include "ostream" -#include "string" +#include +#include +#include #ifdef __UCLIBCXX_HAS_WCHAR__ -#include "cwchar" -#include "cwctype" +#include +#include #endif #ifndef __HEADER_STD_STRING_IOSTREAM diff --git a/src/support b/src/support index 1c06faf..9279987 100644 --- a/src/support +++ b/src/support @@ -17,9 +17,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "exception" -#include "cstdlib" -#include "typeinfo" +#include +#include +#include #ifndef HEADER_ULC_SUPPORT #define HEADER_ULC_SUPPORT 1 diff --git a/src/support.cpp b/src/support.cpp index 24989e1..1ec0264 100644 --- a/src/support.cpp +++ b/src/support.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "support" +#include /*extern "C" void *__cxa_allocate_exception(size_t thrown_size){ void * retval; diff --git a/src/type_traits b/src/type_traits index b97950f..fa1de40 100644 --- a/src/type_traits +++ b/src/type_traits @@ -16,11 +16,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" +#include #include -#include "exception" -#include "memory" -#include "char_traits" +#include +#include +#include #ifndef __HEADER_TYPE_TRAITS #define __HEADER_TYPE_TRAITS 1 diff --git a/src/typeinfo b/src/typeinfo index 17d7b04..88a2639 100644 --- a/src/typeinfo +++ b/src/typeinfo @@ -35,7 +35,7 @@ #ifndef __TYPEINFO__ #define __TYPEINFO__ -#include "exception" +#include extern "C++" { diff --git a/src/typeinfo.cpp b/src/typeinfo.cpp index ef9dad8..b8ea301 100644 --- a/src/typeinfo.cpp +++ b/src/typeinfo.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "typeinfo" +#include namespace std{ diff --git a/src/unwind-cxx.h b/src/unwind-cxx.h index e8a5b24..e001343 100644 --- a/src/unwind-cxx.h +++ b/src/unwind-cxx.h @@ -35,9 +35,9 @@ // Level 2: C++ ABI -#include "typeinfo" -#include "exception" -#include "cstddef" +#include +#include +#include #include "unwind.h" #ifdef __aarch64__ diff --git a/src/utility b/src/utility index 8e7081d..0da354e 100644 --- a/src/utility +++ b/src/utility @@ -18,7 +18,7 @@ */ -#include "basic_definitions" +#include #ifndef __STD_HEADER_UTILITY diff --git a/src/utility.cpp b/src/utility.cpp index 6b792a6..b2f8995 100644 --- a/src/utility.cpp +++ b/src/utility.cpp @@ -18,7 +18,7 @@ */ -#include "utility" +#include namespace std{ diff --git a/src/valarray b/src/valarray index 316c90e..09d929c 100644 --- a/src/valarray +++ b/src/valarray @@ -17,13 +17,13 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "basic_definitions" +#include #ifndef __HEADER_STD_VALARRAY #define __HEADER_STD_VALARRAY 1 -#include "cstddef" -#include "cmath" +#include +#include #pragma GCC visibility push(default) diff --git a/src/valarray.cpp b/src/valarray.cpp index c0c2c1a..e4bd504 100644 --- a/src/valarray.cpp +++ b/src/valarray.cpp @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "valarray" +#include namespace std{ diff --git a/src/vector b/src/vector index 78a6c5d..f8cb410 100644 --- a/src/vector +++ b/src/vector @@ -18,13 +18,13 @@ */ -#include "basic_definitions" -#include "memory" -#include "iterator" -#include "func_exception" -#include "algorithm" -#include "type_traits" -#include "initializer_list" +#include +#include +#include +#include +#include +#include +#include #ifndef __STD_HEADER_VECTOR #define __STD_HEADER_VECTOR diff --git a/src/vector.cpp b/src/vector.cpp index 224d0cb..5ee0de1 100644 --- a/src/vector.cpp +++ b/src/vector.cpp @@ -20,7 +20,7 @@ #define __UCLIBCXX_COMPILE_VECTOR__ 1 -#include "vector" +#include namespace std{ From e67ddd68d816332ff26db9ba966c81f52b3be73f Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 10 Jan 2022 12:30:32 +0100 Subject: [PATCH 2/2] fix: Only define new/del when AVR core does not provide Since AVR core 1.8.3, it provides an (incomplete) new header that breaks compilation of the uclibc++ new/delete .cpp files. Since 1.8.4 it provides a complete new header, but that also introduces a linker duplicate symbol issue for std::nothrow. This commit adds a USING_NEW_FROM_UCLIBC define to our new include file, which allows detecting which version of the new include is used. That define is used to completely skip all new/delete code (all new_*.cpp and del_*.cpp files) when the new header from the AVR-core is used. This should fix all conflicts, except: - On AVR core 1.8.3, new/delete is now incomplete. However, the missing functions (array placement new, placement delete, nothrow versions and delete with size) are probably not commonly used. - If another library *also* offers , then things might break in different ways. Again, this is a rare corner case. - This no longer provides set_new_handler, which the AVR core declares but does not define. However, since the uclibc++ version did not actually *use* the handler passed, not defining it is probably better. --- src/del_op.cpp | 7 ++----- src/del_opnt.cpp | 4 ++-- src/del_ops.cpp | 2 ++ src/del_opv.cpp | 7 ++----- src/del_opvnt.cpp | 4 ++-- src/del_opvs.cpp | 2 ++ src/new | 2 ++ src/new_handler.cpp | 2 ++ src/new_op.cpp | 7 ++----- src/new_opnt.cpp | 4 ++-- src/new_opv.cpp | 6 ++---- src/new_opvnt.cpp | 4 ++-- 12 files changed, 24 insertions(+), 27 deletions(-) diff --git a/src/del_op.cpp b/src/del_op.cpp index e6b584f..8d755b7 100644 --- a/src/del_op.cpp +++ b/src/del_op.cpp @@ -17,15 +17,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -// Arduino 1.0 contains an implementation for this. -#if ARDUINO < 100 - #include #include #include +#if defined(USING_NEW_FROM_UCLIBC) && ARDUINO < 100 _UCXXEXPORT void operator delete(void* ptr) throw(){ free(ptr); } - -#endif +#endif // defined(USING_NEW_FROM_UCLIBC) && ARDUINO < 100 diff --git a/src/del_opnt.cpp b/src/del_opnt.cpp index 96cb03b..f42a9fe 100644 --- a/src/del_opnt.cpp +++ b/src/del_opnt.cpp @@ -21,8 +21,8 @@ #include #include -#ifndef NO_NOTHROW +#if defined(USING_NEW_FROM_UCLIBC) && !defined(NO_NOTHROW) _UCXXEXPORT void operator delete(void* ptr, const std::nothrow_t& ) throw() { free(ptr); } -#endif +#endif // defined(USING_NEW_FROM_UCLIBC) && !defined(NO_NOTHROW) diff --git a/src/del_ops.cpp b/src/del_ops.cpp index e292b03..6c673ca 100644 --- a/src/del_ops.cpp +++ b/src/del_ops.cpp @@ -22,6 +22,8 @@ #include #include +#if defined(USING_NEW_FROM_UCLIBC) _UCXXEXPORT void operator delete(void* ptr, std::size_t) throw(){ ::operator delete (ptr); } +#endif // defined(USING_NEW_FROM_UCLIBC) diff --git a/src/del_opv.cpp b/src/del_opv.cpp index 1690f88..c19539c 100644 --- a/src/del_opv.cpp +++ b/src/del_opv.cpp @@ -17,9 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -// Arduino 1.0 contains an implementation for this. -#if ARDUINO < 100 - +#if defined(USING_NEW_FROM_UCLIBC) && ARDUINO < 100 #include #include #include @@ -27,5 +25,4 @@ _UCXXEXPORT void operator delete[](void * ptr) throw(){ free(ptr); } - -#endif +#endif // defined(USING_NEW_FROM_UCLIBC) && ARDUINO < 100 diff --git a/src/del_opvnt.cpp b/src/del_opvnt.cpp index f2a2a36..0f964c7 100644 --- a/src/del_opvnt.cpp +++ b/src/del_opvnt.cpp @@ -21,8 +21,8 @@ #include #include -#ifndef NO_NOTHROW +#if defined(USING_NEW_FROM_UCLIBC) && !defined(NO_NOTHROW) _UCXXEXPORT void operator delete[](void* ptr, const std::nothrow_t& ) throw(){ free(ptr); } -#endif +#endif // defined(USING_NEW_FROM_UCLIBC) && !defined(NO_NOTHROW) diff --git a/src/del_opvs.cpp b/src/del_opvs.cpp index 1c92d1f..6609c6b 100644 --- a/src/del_opvs.cpp +++ b/src/del_opvs.cpp @@ -22,6 +22,8 @@ #include #include +#if defined(USING_NEW_FROM_UCLIBC) _UCXXEXPORT void operator delete[](void * ptr, std::size_t) throw(){ ::operator delete[] (ptr); } +#endif // defined(USING_NEW_FROM_UCLIBC) diff --git a/src/new b/src/new index 12b52a4..9705479 100644 --- a/src/new +++ b/src/new @@ -24,6 +24,8 @@ #ifndef __STD_NEW_OPERATOR #define __STD_NEW_OPERATOR 1 +#define USING_NEW_FROM_UCLIBC + #pragma GCC visibility push(default) namespace std{ diff --git a/src/new_handler.cpp b/src/new_handler.cpp index 1d85ee3..f05e25e 100644 --- a/src/new_handler.cpp +++ b/src/new_handler.cpp @@ -19,6 +19,7 @@ #include +#if defined(USING_NEW_FROM_UCLIBC) const std::nothrow_t std::nothrow = { }; //Name selected to be compatable with g++ code @@ -29,3 +30,4 @@ _UCXXEXPORT std::new_handler std::set_new_handler(std::new_handler new_p) throw( __new_handler = new_p; return retval; } +#endif // defined(USING_NEW_FROM_UCLIBC) diff --git a/src/new_op.cpp b/src/new_op.cpp index 355087e..4a1243f 100644 --- a/src/new_op.cpp +++ b/src/new_op.cpp @@ -17,13 +17,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -// Arduino 1.0 contains an implementation for this. -#if ARDUINO < 100 - #include #include #include +#if defined(USING_NEW_FROM_UCLIBC) && ARDUINO < 100 _UCXXEXPORT void* operator new(std::size_t numBytes) throw(std::bad_alloc){ //C++ stardard 5.3.4.8 requires that a valid pointer be returned for //a call to new(0). Thus: @@ -36,5 +34,4 @@ _UCXXEXPORT void* operator new(std::size_t numBytes) throw(std::bad_alloc){ } return p; } - -#endif +#endif // defined(USING_NEW_FROM_UCLIBC) && ARDUINO < 100 diff --git a/src/new_opnt.cpp b/src/new_opnt.cpp index cffce61..a6bd729 100644 --- a/src/new_opnt.cpp +++ b/src/new_opnt.cpp @@ -21,8 +21,8 @@ #include #include -#ifndef NO_NOTHROW +#if defined(USING_NEW_FROM_UCLIBC) && !defined(NO_NOTHROW) _UCXXEXPORT void* operator new(std::size_t numBytes, const std::nothrow_t& ) throw(){ return malloc(numBytes); } -#endif +#endif // defined(USING_NEW_FROM_UCLIBC) && !defined(NO_NOTHROW) diff --git a/src/new_opv.cpp b/src/new_opv.cpp index b531825..3fc3bdf 100644 --- a/src/new_opv.cpp +++ b/src/new_opv.cpp @@ -17,13 +17,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -// Arduino 1.0 contains an implementation for this. -#if ARDUINO < 100 - #include #include #include +#if defined(USING_NEW_FROM_UCLIBC) && ARDUINO < 100 _UCXXEXPORT void* operator new[](std::size_t numBytes) throw(std::bad_alloc){ //C++ stardard 5.3.4.8 requires that a valid pointer be returned for //a call to new(0). Thus: @@ -37,4 +35,4 @@ _UCXXEXPORT void* operator new[](std::size_t numBytes) throw(std::bad_alloc){ return p; } -#endif +#endif // defined(USING_NEW_FROM_UCLIBC) && ARDUINO < 100 diff --git a/src/new_opvnt.cpp b/src/new_opvnt.cpp index 3ea592a..2afbc0b 100644 --- a/src/new_opvnt.cpp +++ b/src/new_opvnt.cpp @@ -21,8 +21,8 @@ #include #include -#ifndef NO_NOTHROW +#if defined(USING_NEW_FROM_UCLIBC) && !defined(NO_NOTHROW) _UCXXEXPORT void* operator new[](std::size_t numBytes, const std::nothrow_t& ) throw(){ return malloc(numBytes); } -#endif +#endif // defined(USING_NEW_FROM_UCLIBC) && !defined(NO_NOTHROW)