zhensydow/opencl — pull request #17 by axman6 (2011-12-18 04:19:32+00:00)
Title: Support compilation on OS X when Apple's blocks are used in stdlib.h, as well as fixes to CL/cl.h when CL_API_SUFFIX__VERSION_1_2 is undefined

The fix turned out to be pretty simple, just tell CPP that __BLOCKS__ should be undefined when compiling on OS X.

Once I fixed this, I found that CL_API_SUFFIX__VERSION_1_2 was undefined when compiling on OS X, so I wrapped all function declarations in #ifdefs to avoid the issue. I'm not sure if this is the correct way to fix this, but it does work.