1 // Copyright (c) 2017 The LevelDB Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. See the AUTHORS file for names of contributors. 4 5 #ifndef STORAGE_LEVELDB_INCLUDE_EXPORT_H_ 6 #define STORAGE_LEVELDB_INCLUDE_EXPORT_H_ 7 8 #if !defined(LEVELDB_EXPORT) 9 10 #if defined(LEVELDB_SHARED_LIBRARY) 11 #if defined(_WIN32) 12 13 #if defined(LEVELDB_COMPILE_LIBRARY) 14 #define LEVELDB_EXPORT __declspec(dllexport) 15 #else 16 #define LEVELDB_EXPORT __declspec(dllimport) 17 #endif // defined(LEVELDB_COMPILE_LIBRARY) 18 19 #else // defined(_WIN32) 20 #if defined(LEVELDB_COMPILE_LIBRARY) 21 #define LEVELDB_EXPORT __attribute__((visibility("default"))) 22 #else 23 #define LEVELDB_EXPORT 24 #endif 25 #endif // defined(_WIN32) 26 27 #else // defined(LEVELDB_SHARED_LIBRARY) 28 #define LEVELDB_EXPORT 29 #endif 30 31 #endif // !defined(LEVELDB_EXPORT) 32 33 #endif // STORAGE_LEVELDB_INCLUDE_EXPORT_H_ 34