CppCMS
cppcms/defs.h
00001 
00002 //                                                                             
00003 //  Copyright (C) 2008-2012  Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>     
00004 //                                                                             
00005 //  See accompanying file COPYING.TXT file for licensing details.
00006 //
00008 #ifndef CPPCMS_DEFS_H
00009 #define CPPCMS_DEFS_H
00010 
00011 #if defined(__WIN32) || defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__)
00012 #       if defined(DLL_EXPORT)
00013 #               if defined(CPPCMS_SOURCE) || defined(CPPCMS_LOCALE_SOURCE)
00014 #                       define CPPCMS_API __declspec(dllexport)
00015 #               else
00016 #                       define CPPCMS_API __declspec(dllimport)
00017 #               endif
00018 #       else
00019 #               define CPPCMS_API
00020 #       endif
00021 #else // ELF BINARIES
00022 #       define CPPCMS_API
00023 #endif
00024 
00025 #if (defined(WIN32) || defined(_WIN32) || defined(__WIN32)) && !defined(__CYGWIN__)
00026 #define CPPCMS_WIN_NATIVE
00027 #endif
00028 #if defined(__CYGWIN__)
00029 #define CPPCMS_CYGWIN
00030 #endif
00031 
00032 #if defined(CPPCMS_WIN_NATIVE) || defined(CPPCMS_CYGWIN)
00033 #define CPPCMS_WIN32
00034 #endif
00035 
00036 #if !defined(CPPCMS_WIN_NATIVE)
00037 #define CPPCMS_POSIX
00038 #endif
00039 
00040 #if defined __GNUC__ || defined __clang__ 
00041 #define CPPCMS_DEPRECATED __attribute__((deprecated))
00042 #elif defined _MSC_VER
00043 #define CPPCMS_DEPRECATED __declspec(deprecated)
00044 #else
00045 #define CPPCMS_DEPRECATED
00046 #endif
00047 
00048 #endif /// CPPCMS_DEFS_H