APIBaseC.h (1340B)
1 /** @file 2 @brief Header providing basic C macros for defining API headers. 3 4 Must be c-safe! 5 6 @date 2014 7 8 @author 9 Sensics, Inc. 10 <http://sensics.com/osvr> 11 */ 12 13 /* 14 // Copyright 2014 Sensics, Inc. 15 // 16 // Licensed under the Apache License, Version 2.0 (the "License"); 17 // you may not use this file except in compliance with the License. 18 // You may obtain a copy of the License at 19 // 20 // http://www.apache.org/licenses/LICENSE-2.0 21 // 22 // Unless required by applicable law or agreed to in writing, software 23 // distributed under the License is distributed on an "AS IS" BASIS, 24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 25 // See the License for the specific language governing permissions and 26 // limitations under the License. 27 */ 28 29 #ifndef INCLUDED_APIBaseC_h_GUID_C5A2E769_2ADC_429E_D250_DF0883E6E5DB 30 #define INCLUDED_APIBaseC_h_GUID_C5A2E769_2ADC_429E_D250_DF0883E6E5DB 31 32 #ifdef __cplusplus 33 # define OSVR_C_ONLY(X) 34 # define OSVR_CPP_ONLY(X) X 35 # define OSVR_EXTERN_C_BEGIN extern "C" { 36 # define OSVR_EXTERN_C_END } 37 # define OSVR_INLINE inline 38 #else 39 # define OSVR_C_ONLY(X) X 40 # define OSVR_CPP_ONLY(X) 41 # define OSVR_EXTERN_C_BEGIN 42 # define OSVR_EXTERN_C_END 43 # ifdef _MSC_VER 44 # define OSVR_INLINE static __inline 45 # else 46 # define OSVR_INLINE static inline 47 # endif 48 #endif 49 50 #endif