From 6ef90c4f095b03be889cfd94a924bb3f94514b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 3 Sep 2012 10:47:45 -0400 Subject: [PATCH] include: cleanup api.h --- CMakeLists.txt | 6 ++++-- include/freerdp/api.h | 34 ++++++++++++++++------------------ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fe9716389..9c69342e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,8 +79,10 @@ if(CMAKE_COMPILER_IS_GNUCC) endif() if(MSVC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gd /MT") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /O2 /Ob2") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gd") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MT") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /O2") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Ob2") if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_AMD64_") else() diff --git a/include/freerdp/api.h b/include/freerdp/api.h index 1c2ba7a28..4bb44159a 100644 --- a/include/freerdp/api.h +++ b/include/freerdp/api.h @@ -17,10 +17,20 @@ * limitations under the License. */ -#ifndef __FREERDP_API_H -#define __FREERDP_API_H +#ifndef FREERDP_API_H +#define FREERDP_API_H -#define FREERDP_INTERFACE_VERSION 4 +#ifdef _WIN32 +#define FREERDP_CC __cdecl +#else +#define FREERDP_CC +#endif + +#ifdef _WIN32 +#define INLINE __inline +#else +#define INLINE inline +#endif #if defined _WIN32 || defined __CYGWIN__ #ifdef FREERDP_EXPORTS @@ -38,25 +48,13 @@ #endif #else #if __GNUC__ >= 4 - #define FREERDP_API __attribute__ ((visibility("default"))) + #define FREERDP_API __attribute__ ((visibility("default"))) #else - #define FREERDP_API + #define FREERDP_API #endif #endif -#ifdef _WIN32 -#define FREERDP_CC __cdecl -#else -#define FREERDP_CC -#endif - -#ifdef _WIN32 -#define INLINE __inline -#else -#define INLINE inline -#endif - #define IFCALL(_cb, ...) do { if (_cb != NULL) { _cb( __VA_ARGS__ ); } } while (0) #define IFCALLRET(_cb, _ret, ...) do { if (_cb != NULL) { _ret = _cb( __VA_ARGS__ ); } } while (0) -#endif +#endif /* FREERDP_API */