System.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Open Source Robotics Foundation
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 */
17 #ifndef IGNITION_MATH_SYSTEM_HH_
18 #define IGNITION_MATH_SYSTEM_HH_
19 
20 #if defined(__GNUC__)
21 #define IGN_DEPRECATED(version) __attribute__((deprecated))
22 #define IGN_FORCEINLINE __attribute__((always_inline))
23 #elif defined(_WIN32)
24 #define IGN_DEPRECATED(version)
25 #define IGN_FORCEINLINE __forceinline
26 #else
27 #define IGN_DEPRECATED(version) ()
28 #define IGN_FORCEINLINE
29 #endif
30 
39 #if defined _WIN32 || defined __CYGWIN__
40  #ifdef BUILDING_DLL
41  #ifdef __GNUC__
42  #define IGNITION_VISIBLE __attribute__ ((dllexport))
43  #else
44  #define IGNITION_VISIBLE __declspec(dllexport)
45  #endif
46  #else
47  #ifdef __GNUC__
48  #define IGNITION_VISIBLE __attribute__ ((dllimport))
49  #else
50  #define IGNITION_VISIBLE __declspec(dllimport)
51  #endif
52  #endif
53  #define IGNITION_HIDDEN
54 #else
55  #if __GNUC__ >= 4
56  #define IGNITION_VISIBLE __attribute__ ((visibility ("default")))
57  #define IGNITION_HIDDEN __attribute__ ((visibility ("hidden")))
58  #else
59  #define IGNITION_VISIBLE
60  #define IGNITION_HIDDEN
61  #endif
62 #endif
63 
64 #endif