File tree Expand file tree Collapse file tree 5 files changed +9
-3
lines changed Expand file tree Collapse file tree 5 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ void *objc_atomic_malloc(size_t size)
14
14
return malloc (size );
15
15
}
16
16
17
- #ifdef __MINGW32__
17
+ #if defined( __MINGW32__ ) || defined( _WINDOWS )
18
18
void * objc_valloc (size_t size )
19
19
{
20
20
return malloc (size );
Original file line number Diff line number Diff line change 1
1
#include < stdio.h>
2
2
#include < stdlib.h>
3
3
#include " objc/runtime.h"
4
+ #include " visibility.h"
4
5
5
6
static void objc_enumeration_mutation_fallback (id object)
6
7
{
@@ -13,7 +14,7 @@ static void objc_enumeration_mutation_fallback(id object)
13
14
// This function is exported as a weak symbol to enable GNUstep or some other
14
15
// framework to replace it trivially. On platforms with linkers that cannot handle weak exports,
15
16
// the objc_enumeration_mutation hook is the preferred override point.
16
- void __attribute__ ((weak)) objc_enumerationMutation(id obj)
17
+ void WEAK_EXPORT objc_enumerationMutation (id obj)
17
18
{
18
19
_objc_enumeration_mutation (obj);
19
20
}
Original file line number Diff line number Diff line change @@ -127,7 +127,11 @@ typedef signed char BOOL;
127
127
# ifdef __vxwords
128
128
typedef int BOOL ;
129
129
# else
130
+ # if defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
131
+ typedef int BOOL ;
132
+ # else
130
133
typedef unsigned char BOOL ;
134
+ # endif
131
135
# endif
132
136
# endif
133
137
Original file line number Diff line number Diff line change 1
- #ifdef __MINGW32__
1
+ #if defined( __MINGW32__ ) || defined( _WINDOWS )
2
2
#include <windows.h>
3
3
static unsigned sleep (unsigned seconds )
4
4
{
Original file line number Diff line number Diff line change 22
22
23
23
#define LIKELY (x ) __builtin_expect(x, 1)
24
24
#define UNLIKELY (x ) __builtin_expect(x, 0)
25
+ #define WEAK_EXPORT __attribute__((weak))
You can’t perform that action at this time.
0 commit comments