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? 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>