Added types support to blocks runtime, tidied up UNIX98 stuff.

main
theraven 17 years ago
parent 102084ab7c
commit 9c65b1c84c

@ -53,7 +53,7 @@ libobjc_HEADER_FILES = \
# Deprecated functions are only deprecated for external use, not for us because # Deprecated functions are only deprecated for external use, not for us because
# we are special, precious, little flowers. # we are special, precious, little flowers.
libobjc_CPPFLAGS += -D__OBJC_RUNTIME_INTERNAL__=1 libobjc_CPPFLAGS += -D__OBJC_RUNTIME_INTERNAL__=1 -D_XOPEN_VERSION=500
# Note to Riccardo. Please do not 'fix' C99isms in this. The new ABI is only # Note to Riccardo. Please do not 'fix' C99isms in this. The new ABI is only
# useful on compilers that support C99 (currently only clang), so there is no # useful on compilers that support C99 (currently only clang), so there is no
# benefit from supporting platforms with no C99 compiler. # benefit from supporting platforms with no C99 compiler.

@ -30,9 +30,6 @@
#include <string.h> #include <string.h>
#include <limits.h> #include <limits.h>
// FIXME: Before we finalise the ABI for blocks, I wish to modify clang to emit
// type information for the block function.
/* Makes the compiler happy even without Foundation */ /* Makes the compiler happy even without Foundation */
@interface Dummy @interface Dummy
- (id)retain; - (id)retain;
@ -194,6 +191,7 @@ struct StackBlockClass {
void (*copy_helper)(void *dst, void *src); void (*copy_helper)(void *dst, void *src);
void (*dispose_helper)(void *src); void (*dispose_helper)(void *src);
} *descriptor; } *descriptor;
const char *types;
}; };

@ -13,8 +13,6 @@ typedef HANDLE mutex_t;
# define DESTROY_LOCK(x) CloseHandle(*x) # define DESTROY_LOCK(x) CloseHandle(*x)
#else #else
#define _XOPEN 500
#define __USE_UNIX98 1
# include <pthread.h> # include <pthread.h>
typedef pthread_mutex_t mutex_t; typedef pthread_mutex_t mutex_t;

Loading…
Cancel
Save