6
6
7
7
#include < stdlib.h>
8
8
9
- extern " C" void __cxa_pure_virtual (void ) {}
10
- extern " C" void __cxa_deleted_virtual (void ) {}
11
- extern " C" int __cxa_atexit (void (*func) (void *), void * arg, void * dso_handle) {
9
+ namespace std {
10
+ void __throw_length_error (const char * __s __attribute__ ((unused))) {}
11
+ void __throw_bad_alloc () {}
12
+ void __throw_bad_function_call () {}
13
+ };
14
+
15
+ extern " C" {
16
+
17
+ void * __dso_handle = (void *) &__dso_handle;
18
+
19
+ void __cxa_pure_virtual (void ) {}
20
+ void __cxa_deleted_virtual (void ) {}
21
+ int __cxa_atexit (void (*func) (void *), void * arg, void * dso_handle) {
12
22
(void )func; (void )arg; (void )dso_handle; // unused
13
23
return 0 ;
14
24
}
15
- extern " C" int atexit (void (*func)(void )) {
25
+
26
+ int atexit (void (*func)(void )) {
16
27
(void )func;
17
28
return 0 ;
18
29
}
19
30
20
- namespace std {
21
- void __throw_length_error (const char * __s __attribute__ ((unused))) {}
22
- void __throw_bad_alloc () {}
23
- void __throw_bad_function_call () {}
24
- };
25
-
26
- extern " C" int strcmp (const char * s1, const char * s2) {
31
+ int strcmp (const char * s1, const char * s2) {
27
32
while (*s1 && (*s1 == *s2))
28
33
{
29
34
s1++;
@@ -32,4 +37,4 @@ extern "C" int strcmp(const char* s1, const char* s2) {
32
37
return *(const unsigned char *)s1 - *(const unsigned char *)s2;
33
38
}
34
39
35
- extern " C" void * __dso_handle = ( void *) &__dso_handle;
40
+ } /* extern "C" */
0 commit comments