Lunchbox  1.4.0
compiler.h
00001  
00002 /* Copyright (c) 2010-2012, Stefan Eilemann <eile@eyescale.ch> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef LUNCHBOX_COMPILER_H
00019 #define LUNCHBOX_COMPILER_H
00020 
00021 #ifdef _MSC_VER
00022 
00023 #  define LB_ALIGN8( var )  __declspec (align (8)) var;
00024 
00025 #  define LB_ALIGN16( var ) __declspec (align (16)) var;
00026 #else
00027 
00028 #  define LB_ALIGN8( var )  var __attribute__ ((aligned (8)));
00029 
00030 #  define LB_ALIGN16( var ) var __attribute__ ((aligned (16)));
00031 #endif
00032 
00033 #ifdef __GNUC__
00034 #  if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 0)) )
00035 #    define LB_GCC_4_0_OR_LATER
00036 #  endif
00037 #  if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) )
00038 #    define LB_GCC_4_1_OR_LATER
00039 #  endif
00040 #  if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) )
00041 #    define LB_GCC_4_2_OR_LATER
00042 #  endif
00043 #  if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) )
00044 #    define LB_GCC_4_3_OR_LATER
00045 #  endif
00046 #  if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) )
00047 #    define LB_GCC_4_4_OR_LATER
00048 #  endif
00049 #  if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) )
00050 #    define LB_GCC_4_5_OR_LATER
00051 #  endif
00052 #  if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) )
00053 #    define LB_GCC_4_6_OR_LATER
00054 #  endif
00055 #  if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) )
00056 #    define LB_GCC_4_7_OR_LATER
00057 #  endif
00058 #  if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) )
00059 #    define LB_GCC_4_8_OR_LATER
00060 #  endif
00061 #  if (( __GNUC__ > 4 ) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) )
00062 #    define LB_GCC_4_9_OR_LATER
00063 #  endif
00064 #endif // GCC
00065 
00066 #endif //LUNCHBOX_COMPILER_H