| 1 | //===----------------------------------------------------------------------===// |
| 2 | // DuckDB |
| 3 | // |
| 4 | // duckdb/main/winapi.hpp |
| 5 | // |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #ifndef DUCKDB_API |
| 12 | #if defined(_WIN32) && !defined(__MINGW32__) |
| 13 | #if defined(DUCKDB_BUILD_LIBRARY) && !defined(DUCKDB_BUILD_LOADABLE_EXTENSION) |
| 14 | #define DUCKDB_API __declspec(dllexport) |
| 15 | #else |
| 16 | #define DUCKDB_API __declspec(dllimport) |
| 17 | #endif |
| 18 | #else |
| 19 | #define DUCKDB_API |
| 20 | #endif |
| 21 | #endif |
| 22 | |
| 23 | #ifndef DUCKDB_EXTENSION_API |
| 24 | #ifdef _WIN32 |
| 25 | #ifdef DUCKDB_BUILD_LOADABLE_EXTENSION |
| 26 | #define DUCKDB_EXTENSION_API __declspec(dllexport) |
| 27 | #else |
| 28 | #define DUCKDB_EXTENSION_API |
| 29 | #endif |
| 30 | #else |
| 31 | #define DUCKDB_EXTENSION_API __attribute__((visibility("default"))) |
| 32 | #endif |
| 33 | #endif |
| 34 | |