svn diff dispatch.h Index: dispatch.h =================================================================== --- dispatch.h (revision 142) +++ dispatch.h (working copy) @@ -25,7 +25,21 @@ #include <Availability.h> #include <TargetConditionals.h> #endif
Aha, I see - thanks for the explanation. Attaching a revised version of the patch utilizing OS defines instead! Thanks for integrating the other two fixes! Joakim ps Anyone else having issues with extremely slow delivery of posts to the list? It can take literally many hours between a post being available from the archives at macosforge until the post actually turns up through email (all directly addressed emails comes at once though, so it is not a problem with our mail delivery... ----- + +#if defined (__SVR4) && defined (__sun) +#ifndef __BEGIN_DECLS +# if defined(__cplusplus) +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS }; +# else /* __BEGIN_DECLS */ +# define __BEGIN_DECLS +# define __END_DECLS +# endif /* __BEGIN_DECLS */ +#endif /* __BEGIN_DECLS */ +#else #include <sys/cdefs.h> +#endif + #include <stddef.h> #include <stdint.h> #include <stdbool.h> ----- On 6 nov 2009, at 23.29, Robert Watson wrote:
On Fri, 6 Nov 2009, Joakim Johansson wrote:
Added the checking for cdefs.h that does not exist on all platforms, also added the __BEGIN_DECLS here as they are usually from cdefs.h and are not available on Solaris.
Perhaps this should be broken out to a DISPATCH_SHIMS_CDEFS instead?
Unfortunately, we can't rely on config.h-based tests in the public headers, so this particular formulation of conditional cdefs.h inclusion won't work here (although it was fine in private.h, which I've committed as r141). Maybe we need to go with OS defines here for that reason.
Robert
Joakim
octo.tbricks.com:gcd/trunk/dispatch> svn diff Index: dispatch.h =================================================================== --- dispatch.h (revision 140) +++ dispatch.h (working copy) @@ -25,7 +25,20 @@ #include <Availability.h> #include <TargetConditionals.h> #endif +#if HAVE_SYS_CDEFS_H #include <sys/cdefs.h> +#endif + +#ifndef __BEGIN_DECLS +# if defined(__cplusplus) +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS }; +# else /* __BEGIN_DECLS */ +# define __BEGIN_DECLS +# define __END_DECLS +# endif /* __BEGIN_DECLS */ +#endif /* __BEGIN_DECLS */ + #include <stddef.h> #include <stdint.h> #include <stdbool.h>
_______________________________________________ libdispatch-dev mailing list libdispatch-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/libdispatch-dev