Skip to content

Commit a7976f7

Browse files
committed
Merge latest uClibc++
2 parents b0f7e7d + 6687fc9 commit a7976f7

42 files changed

Lines changed: 521 additions & 393 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ bin/env_check
1919
libuClibc++*.so
2020
libuClibc++*.so.0
2121
include/system_configuration.h
22+
include/bits/
2223

2324
#
2425
# Debugging files

src/abi/libgcc_eh/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ OBJS = $(call list-archive-members,$(LIBGCC_EH))
44
libgcc_eh-$(IMPORT_LIBGCC_EH) := $(OBJS)
55

66
LIBGCC_EH_VAR := $(call variablify,$(LIBGCC_EH))
7-
LIBGCC_EH_DEP := $(LIBGCC_EH_OUT).$(LIBGCC_EH_VAR).dep
7+
LIBGCC_EH_DEP := $(LIBGCC_EH_OUT).$(call print-hash,$(LIBGCC_EH_VAR)).dep
88

99
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
1010
-include $(LIBGCC_EH_DEP)
@@ -17,7 +17,7 @@ endif
1717
$(LIBGCC_EH_DEP): $(LIBGCC_EH)
1818
$(Q)$(RM) $(LIBGCC_EH_OUT).*dep $(LIBGCC_EH_OUT)*.o
1919
$(Q)$(if $(LIBGCC_EH),(cd $(LIBGCC_EH_OUT) && $(AR) x $(LIBGCC_EH)))
20-
$(Q)echo "libgcc_eh-y := \$$(addprefix \$$(LIBGCC_EH_OUT),$(libgcc_eh-y))" > $@
20+
$(Q)printf "# %s\n\n%s\n" "$(LIBGCC_EH)" "libgcc_eh-y := \$$(addprefix \$$(LIBGCC_EH_OUT),$(libgcc_eh-y))" > $@
2121

2222
CLEAN_src/abi/libgcc_eh: ;
2323
DISTCLEAN_src/abi/libgcc_eh:

src/abi/libsupc/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ OBJS-OMIT = $(filter new_op%.o del_op%.o pure.o new_handler.o eh_alloc.o eh_glob
55
libsupc-$(IMPORT_LIBSUP) := $(filter-out $(OBJS-OMIT),$(OBJS))
66

77
LIBSUP_VAR := $(call variablify,$(LIBSUP))
8-
LIBSUP_DEP :=$(LIBSUPC_OUT).$(LIBSUP_VAR).dep
8+
LIBSUP_DEP := $(LIBSUPC_OUT).$(call print-hash,$(LIBSUP_VAR)).dep
99

1010
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
1111
-include $(LIBSUP_DEP)
@@ -17,7 +17,7 @@ endif
1717
$(LIBSUP_DEP): $(LIBSUP) $(LIBSUPC_OUT)Makefile.in
1818
$(Q)$(RM) $(LIBSUPC_OUT).*dep $(LIBSUPC_OUT)*.o
1919
$(Q)$(if $(LIBSUP),(cd $(LIBSUPC_OUT) && $(AR) x $(LIBSUP) && $(RM) $(OBJS-OMIT)))
20-
$(Q)echo "libsupc-y := \$$(addprefix \$$(LIBSUPC_OUT),$(libsupc-y))" > $@
20+
$(Q)printf "# %s\n\n%s\n" "$(LIBSUP)" "libsupc-y := \$$(addprefix \$$(LIBSUPC_OUT),$(libsupc-y))" > $@
2121

2222
CLEAN_src/abi/libsupc: ;
2323
DISTCLEAN_src/abi/libsupc:

src/associative_base

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ public:
200200
}
201201
void erase(iterator first, iterator last){
202202
while(first != last){
203-
backing.erase(first.base_iterator());
204-
++first;
203+
first = backing.erase(first.base_iterator());
205204
}
206205
}
207206

src/basic_definitions

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,28 @@
3939
#define __UCLIBCXX_NORETURN
4040
#endif
4141

42+
#ifdef __GCC__
43+
# ifndef _UCXX_NOTHROW
44+
# ifndef __cplusplus
45+
# define _UCXX_NOTHROW __attribute__((__nothrow__))
46+
# endif
47+
# endif
48+
#endif
49+
#ifdef __cplusplus
50+
# if __cplusplus >= 201103L
51+
# define _UCXX_NOEXCEPT noexcept
52+
# define _UCXX_USE_NOEXCEPT noexcept
53+
# define _UCXX_THROW(_EXCEPTION)
54+
# else
55+
# define _UCXX_NOEXCEPT
56+
# define _UCXX_USE_NOEXCEPT throw()
57+
# define _UCXX_THROW(_EXCEPTION) throw(_EXCEPTION)
58+
# endif
59+
# ifndef _UCXX_NOTHROW
60+
# define _UCXX_NOTHROW _UCXX_USE_NOEXCEPT
61+
# endif
62+
#endif
63+
4264
#ifdef __UCLIBCXX_HAS_TLS__
4365
#define __UCLIBCXX_TLS __thread
4466
#else

src/char_traits

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ namespace std{
5252
static char_type to_char_type(const int_type & i);
5353

5454
inline static int_type to_int_type(const char_type & c){
55-
return (short int)(unsigned char)c;
55+
return static_cast<short int>(static_cast<unsigned char>(c));
5656
}
5757

5858
inline static bool eq_int_type(const int_type & a, const int_type & b){
@@ -71,7 +71,7 @@ namespace std{
7171
}
7272

7373
inline static char_type* move(char_type* s1, const char_type* s2, size_t n){
74-
return (char*) memmove(s1, s2, n);
74+
return static_cast<char*>(memmove(s1, s2, n));
7575
}
7676

7777
inline static char_type* copy(char_type* s1, const char_type* s2, size_t n){
@@ -82,7 +82,7 @@ namespace std{
8282
}
8383

8484
inline static char_type* assign(char_type* s, size_t n, char_type a){
85-
return (char *)memset(s, a, n);
85+
return static_cast<char *>(memset(s, a, n));
8686
}
8787

8888
inline static int compare(const char_type* s1, const char_type* s2, size_t n){

src/cstdio

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@
2121
#ifndef __HEADER_CSTDIO
2222
#define __HEADER_CSTDIO 1
2323

24+
#undef clearerr
25+
#undef feof
26+
#undef ferror
27+
#undef fgetc
28+
#undef fputc
29+
#undef getc
30+
#undef getchar
31+
#undef putc
32+
#undef putchar
2433

2534
namespace std{
2635
using ::FILE;
@@ -48,6 +57,7 @@ namespace std{
4857
using ::getc;
4958
using ::getchar;
5059
#if __cplusplus <= 201103L
60+
// LWG 2249
5161
using ::gets;
5262
#endif
5363
using ::perror;
@@ -64,7 +74,9 @@ namespace std{
6474
using ::sprintf;
6575
using ::sscanf;
6676
using ::tmpfile;
77+
#ifdef _GLIBCXX_USE_TMPNAM
6778
using ::tmpnam;
79+
#endif
6880
using ::ungetc;
6981
using ::vfprintf;
7082
using ::vprintf;

src/del_op.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <cstdlib>
2525
#include <func_exception>
2626

27-
_UCXXEXPORT void operator delete(void* ptr) throw(){
27+
_UCXXEXPORT void operator delete(void* ptr) _UCXX_USE_NOEXCEPT{
2828
free(ptr);
2929
}
3030

src/del_opnt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "func_exception"
2323

2424
#ifndef NO_NOTHROW
25-
_UCXXEXPORT void operator delete(void* ptr, const std::nothrow_t& ) throw() {
25+
_UCXXEXPORT void operator delete(void* ptr, const std::nothrow_t& ) _UCXX_USE_NOEXCEPT {
2626
free(ptr);
2727
}
2828
#endif

src/del_ops.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
#include "cstdlib"
2323
#include "func_exception"
2424

25-
_UCXXEXPORT void operator delete(void* ptr, std::size_t) throw(){
25+
_UCXXEXPORT void operator delete(void* ptr, std::size_t) _UCXX_USE_NOEXCEPT{
2626
::operator delete (ptr);
2727
}

0 commit comments

Comments
 (0)