FastLED 3.9.15
Loading...
Searching...
No Matches
export.h
Go to the documentation of this file.
1#pragma once
2
5
6#ifndef FASTLED_EXPORT
7 #if defined(__EMSCRIPTEN__)
8 #include <emscripten.h>
9 #define FASTLED_EXPORT EMSCRIPTEN_KEEPALIVE
10 #elif defined(_WIN32) || defined(_WIN64)
11 // Windows DLL export/import
12 #ifdef FASTLED_BUILDING_DLL
13 #define FASTLED_EXPORT __declspec(dllexport)
14 #else
15 #define FASTLED_EXPORT __declspec(dllimport)
16 #endif
17 #elif defined(__GNUC__) && (__GNUC__ >= 4)
18 // GCC/Clang visibility attributes
19 #define FASTLED_EXPORT __attribute__((visibility("default")))
20 #elif defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x550)
21 // Sun Studio visibility attributes
22 #define FASTLED_EXPORT __global
23 #else
24 // Fallback for other platforms
25 #define FASTLED_EXPORT
26 #endif
27#endif
28
29#ifndef FASTLED_CALL
30 #if defined(_WIN32) || defined(_WIN64)
31 // Windows calling convention
32 #define FASTLED_CALL __stdcall
33 #else
34 // Unix-like platforms - no special calling convention
35 #define FASTLED_CALL
36 #endif
37#endif
38
40#define FASTLED_API FASTLED_EXPORT FASTLED_CALL