My Project: /home/noptrix/ba/blackarch/packages/opendht-c/src/opendht/include/opendht/def.h Source File

My Project 3.7.7 C++ Distributed Hash Table

Loading...
Searching...
No Matches
def.h
1#pragma once
2
3// Generic helper definitions for shared library support
4#if defined _WIN32 || defined __CYGWIN__
5 #define OPENDHT_IMPORT __declspec(dllimport)
6 #define OPENDHT_EXPORT __declspec(dllexport)
7 #define OPENDHT_HIDDEN
8#else
9 #define OPENDHT_IMPORT __attribute__ ((visibility ("default")))
10 #define OPENDHT_EXPORT __attribute__ ((visibility ("default")))
11 #define OPENDHT_HIDDEN __attribute__ ((visibility ("hidden")))
12#endif
13
14// Now we use the generic helper definitions above to define OPENDHT_PUBLIC and OPENDHT_LOCAL.
15// OPENDHT_PUBLIC is used for the public API symbols. It either DLL imports or DLL exports (or does nothing for static build)
16// OPENDHT_LOCAL is used for non-api symbols.
17
18#ifdef opendht_EXPORTS // defined if OpenDHT is compiled as a shared library
19 #ifdef OPENDHT_BUILD // defined if we are building the OpenDHT shared library (instead of using it)
20 #define OPENDHT_PUBLIC OPENDHT_EXPORT
21 #else
22 #define OPENDHT_PUBLIC OPENDHT_IMPORT
23 #endif // OPENDHT_BUILD
24 #define OPENDHT_LOCAL OPENDHT_HIDDEN
25#else // opendht_EXPORTS is not defined: this means OpenDHT is a static lib.
26 #define OPENDHT_PUBLIC
27 #define OPENDHT_LOCAL
28#endif // opendht_EXPORTS
29
30
31#ifdef opendht_c_EXPORTS // defined if OpenDHT is compiled as a shared library
32 #ifdef OPENDHT_C_BUILD // defined if we are building the OpenDHT shared library (instead of using it)
33 #define OPENDHT_C_PUBLIC OPENDHT_EXPORT
34 #else
35 #define OPENDHT_C_PUBLIC OPENDHT_IMPORT
36 #endif // OPENDHT_BUILD
37 #define OPENDHT_C_LOCAL OPENDHT_HIDDEN
38#else // opendht_EXPORTS is not defined: this means OpenDHT is a static lib.
39 #define OPENDHT_C_PUBLIC
40 #define OPENDHT_C_LOCAL
41#endif // opendht_EXPORTS
42
43// bytes
44#define HASH_LEN 20u