Ordo  0.3.4
Symmetric Cryptography Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
interface.h
Go to the documentation of this file.
1 /*===-- common/interface.h -----------------------------*- PUBLIC -*- H -*-===*/
13 /*===----------------------------------------------------------------------===*/
14 
15 #ifndef ORDO_INTERFACE_H
16 #define ORDO_INTERFACE_H
17 
19 #include <stddef.h>
20 #include <stdint.h>
23 /*===----------------------------------------------------------------------===*/
24 
25 #if defined(BUILDING_ORDO) || defined(BUILDING_ordo)
26  #if defined(ORDO_EXPORTS) || defined(ordo_EXPORTS)
27  #define BUILD_SHARED
28  #endif
29 #else
30  #if !defined(ORDO_STATIC_LIB)
31  #define USING_SHARED
32  #endif
33 #endif
34 
35 #if defined(__MINGW32__) || defined(_MSC_VER)
36  #if defined(BUILD_SHARED)
37  #define ORDO_PUBLIC __declspec(dllexport)
38  #define ORDO_HIDDEN
39  #elif defined(USING_SHARED)
40  #define ORDO_PUBLIC __declspec(dllimport)
41  #define ORDO_HIDDEN
42  #else
43  #define ORDO_PUBLIC
44  #define ORDO_HIDDEN
45  #endif
46 #elif defined(__clang__) || defined(__INTEL_COMPILER) || defined(__GNUC__)
47  #if defined(BUILD_SHARED)
48  #define ORDO_PUBLIC __attribute__((visibility("default")))
49  #define ORDO_HIDDEN __attribute__((visibility("hidden")))
50  #elif defined(USING_SHARED)
51  #define ORDO_PUBLIC __attribute__((visibility("default")))
52  #define ORDO_HIDDEN __attribute__((visibility("hidden")))
53  #else
54  #define ORDO_PUBLIC
55  #define ORDO_HIDDEN
56  #endif
57 #else
58  #error "Unsupported compiler!"
59 #endif
60 
61 #if defined(__clang__)
62  #define RESTRICT __restrict__
63 #elif defined(__INTEL_COMPILER)
64  #define RESTRICT restrict
65 #elif defined(__GNUC__)
66  #define RESTRICT __restrict__
67 #elif defined(_MSC_VER)
68  #define RESTRICT __restrict
69 #endif
70 
71 #undef BUILD_SHARED
72 #undef USING_SHARED
73 
74 /*===----------------------------------------------------------------------===*/
75 
76 #include "ordo/definitions.h"
77 
78 /*===----------------------------------------------------------------------===*/
79 
80 #endif