clover/api: Support MSVC
Three things: 1. MSVC dislikes mismatching declaration/definition of __declspec(dllexport). Since CL headers don't have the declspec, the implementations should't either. 2. An unnamed brace-initialization gets deduced as an initializer list, instead of a brace-constructed string. Just add the type name. 3. posix_memalign doesn't exist on Windows. Reviewed-by: Francisco Jerez <currojerez@riseup.net> Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7680>
This commit is contained in:
@@ -123,7 +123,7 @@ clCreateProgramWithBinary(cl_context d_ctx, cl_uint n,
|
||||
return { CL_INVALID_VALUE, {} };
|
||||
|
||||
try {
|
||||
std::stringbuf bin( { (char*)p, l } );
|
||||
std::stringbuf bin( std::string{ (char*)p, l } );
|
||||
std::istream s(&bin);
|
||||
|
||||
return { CL_SUCCESS, module::deserialize(s) };
|
||||
|
||||
Reference in New Issue
Block a user