Skip to content

Commit e551385

Browse files
authored
Remove __stdcall warnings in ARM (KhronosGroup#302)
* Remove __stdcall warnings in x64 and ARM * Refactor conditions * Remove undef * Apply corrections
1 parent 6c4028a commit e551385

1 file changed

Lines changed: 12 additions & 16 deletions

File tree

CL/cl_platform.h

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,20 @@
2323
extern "C" {
2424
#endif
2525

26-
#if defined(_WIN32)
27-
#if !defined(CL_API_ENTRY)
28-
#define CL_API_ENTRY
29-
#endif
30-
#if !defined(CL_API_CALL)
31-
#define CL_API_CALL __stdcall
32-
#endif
33-
#if !defined(CL_CALLBACK)
34-
#define CL_CALLBACK __stdcall
35-
#endif
36-
#else
37-
#if !defined(CL_API_ENTRY)
38-
#define CL_API_ENTRY
39-
#endif
40-
#if !defined(CL_API_CALL)
26+
#if !defined(CL_API_ENTRY)
27+
#define CL_API_ENTRY
28+
#endif
29+
#if !defined(CL_API_CALL)
30+
#if defined(_WIN32) && !defined(__aarch64__) && !defined(__arm64__)
31+
#define CL_API_CALL __stdcall
32+
#else
4133
#define CL_API_CALL
4234
#endif
43-
#if !defined(CL_CALLBACK)
35+
#endif
36+
#if !defined(CL_CALLBACK)
37+
#if defined(_WIN32) && !defined(__aarch64__) && !defined(__arm64__)
38+
#define CL_CALLBACK __stdcall
39+
#else
4440
#define CL_CALLBACK
4541
#endif
4642
#endif

0 commit comments

Comments
 (0)