provide gcc 2.95 variadic macro

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29485 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2010-02-05 20:57:36 +00:00
parent 85ec0e519b
commit fb3ec312b6

View file

@ -19,6 +19,9 @@ typedef retTy(^name)(argTys, ## __VA_ARGS__)
/* Fall-back versions for when the compiler doesn't have native blocks support.
*/
#else
#if (GCC_VERSION >= 3000)
#define DEFINE_BLOCK_TYPE(name, retTy, argTys, ...) \
typedef struct {\
void *isa;\
@ -28,5 +31,21 @@ typedef retTy(^name)(argTys, ## __VA_ARGS__)
} *name
#define CALL_BLOCK(block, args, ...) \
block->invoke(block, args, ## __VA_ARGS__)
#else /* GCC_VERSION >= 3000 */
#define DEFINE_BLOCK_TYPE(name, retTy, argTys, args...) \
typedef struct {\
void *isa;\
int flags;\
int reserved;\
retTy (*invoke)(void*, argTys, args);\
} *name
#define CALL_BLOCK(block, args...) \
block->invoke(block, args)
#endif /* GCC_VERSION >= 3000 */
#endif