From 9c65b1c84ce7ad98f74d56c89b87944aa350f809 Mon Sep 17 00:00:00 2001 From: theraven Date: Fri, 11 Sep 2009 10:28:49 +0000 Subject: [PATCH] Added types support to blocks runtime, tidied up UNIX98 stuff. --- GNUmakefile | 2 +- blocks_runtime.m | 4 +--- lock.h | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index b54575e..acd2caf 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -53,7 +53,7 @@ libobjc_HEADER_FILES = \ # Deprecated functions are only deprecated for external use, not for us because # 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 # useful on compilers that support C99 (currently only clang), so there is no # benefit from supporting platforms with no C99 compiler. diff --git a/blocks_runtime.m b/blocks_runtime.m index 45c0e27..6e5aa5a 100644 --- a/blocks_runtime.m +++ b/blocks_runtime.m @@ -30,9 +30,6 @@ #include #include -// 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 */ @interface Dummy - (id)retain; @@ -194,6 +191,7 @@ struct StackBlockClass { void (*copy_helper)(void *dst, void *src); void (*dispose_helper)(void *src); } *descriptor; + const char *types; }; diff --git a/lock.h b/lock.h index 0b8dbcd..12c3221 100644 --- a/lock.h +++ b/lock.h @@ -13,8 +13,6 @@ typedef HANDLE mutex_t; # define DESTROY_LOCK(x) CloseHandle(*x) #else -#define _XOPEN 500 -#define __USE_UNIX98 1 # include typedef pthread_mutex_t mutex_t;