Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
grassroots_util_library.h
Go to the documentation of this file.
1 /*
2 ** Copyright 2014-2016 The Earlham Institute
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
16 
22 #ifndef GRASSROOTS_UTIL_LIBRARY_H
23 #define GRASSROOTS_UTIL_LIBRARY_H
24 
25 
26 
27 #include "library.h"
28 
29 /*
30 ** Now we use the generic helper definitions above to define LIB_API and LIB_LOCAL.
31 ** LIB_API is used for the public API symbols. It either DLL imports or DLL exports
32 ** (or does nothing for static build)
33 ** LIB_LOCAL is used for non-api symbols.
34 */
35 
36 #ifdef SHARED_LIBRARY /* defined if LIB is compiled as a DLL */
37 
38  #ifdef GRASSROOTS_UTIL_LIBRARY_EXPORTS /* defined if we are building the LIB DLL (instead of using it) */
39  #define GRASSROOTS_UTIL_API LIB_HELPER_SYMBOL_EXPORT
40  #else /* GRASSROOTS_UTIL_LIBRARY_EXPORTS is not defined */
41  #define GRASSROOTS_UTIL_API LIB_HELPER_SYMBOL_IMPORT
42  #endif
43 
44  #define GRASSROOTS_UTIL_LOCAL LIB_HELPER_SYMBOL_LOCAL
45 
46 #else /* SHARED_LIBRARY is not defined, we're building a static library */
47  #define GRASSROOTS_UTIL_API
48  #define GRASSROOTS_UTIL_LOCAL
49 #endif /* #ifdef GRASSROOTS_UTIL_LIBRARY_EXPORTS */
50 
51 
52 #ifdef __cplusplus
53  extern "C" {
54 #endif
55 
56 #ifdef __cplusplus
57 }
58 #endif
59 
60 
61 #endif /* #ifndef GRASSROOTS_UTIL_LIBRARY_H */
62 
63 
library.h