macros.h

Go to the documentation of this file.
00001 
00007 /*
00008     This library is free software; you can redistribute it and/or
00009     modify it under the terms of the GNU Lesser General Public
00010     License as published by the Free Software Foundation; either
00011     version 2.1 of the License, or (at your option) any later version.
00012 
00013     This library is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016     Lesser General Public License for more details.
00017 
00018     You should have received a copy of the GNU Lesser General Public
00019     License along with this library; if not, write to the Free Software
00020     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021 */
00022 
00023 #ifndef OMGUI_MACROS_H
00024 #define OMGUI_MACROS_H
00025 
00026 // http://www.ohse.de/uwe/articles/gcc-attributes.html seems a good overview
00027 // of when a certain attribute was introduced to gcc
00028 
00029 #if __GNUC__
00030 #   define GCC_VERSION (__GNUC__ * 10000 \
00031                       + __GNUC_MINOR__ * 100 \
00032                       + __GNUC_PATCH_LEVEL)
00033 #else
00034 #   define GCC_VERSION 0
00035 #endif
00036 
00037 /*
00038     Microsoft Visual C++ 7.1:   _MSC_VER = 1310
00039     Microsoft Visual C++ 7.0:   _MSC_VER = 1300
00040     Microsoft Visual C++ 6.0:   _MSC_VER = 1200
00041     Microsoft Visual C++ 5.0:   _MSC_VER = 1100
00042 */
00043 
00044 #if GCC_VERSION >= 30100
00045 
00051 #   define OMGUI_DEPRECATED(x) x __attribute__((__deprecated__))
00052 #elif _MSC_VER >= 1300
00053 #   define OMGUI_DEPRECATED(x) __declspec(deprecated) x
00054 #else
00055 #   define OMGUI_DEPRECATED(x) x
00056 #endif
00057 
00058 #endif // OMGUI_MACROS_H

doxygen SourceForge.net Logo