libpsynth 0.2.1
/home/raskolnikov/dev/psynth/trunk/src/psynth/base/compat.hpp
Go to the documentation of this file.
00001 
00012 /*
00013  *  Copyright (C) 2010 Juan Pedro Bolivar Puente
00014  *
00015  *  This file is part of Psychosynth.
00016  *   
00017  *  Psychosynth is free software: you can redistribute it and/or modify
00018  *  it under the terms of the GNU General Public License as published by
00019  *  the Free Software Foundation, either version 3 of the License, or
00020  *  (at your option) any later version.
00021  *
00022  *  Psychosynth is distributed in the hope that it will be useful,
00023  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00024  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00025  *  GNU General Public License for more details.
00026  *
00027  *  You should have received a copy of the GNU General Public License
00028  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00029  *
00030  */
00031 
00032 #ifndef PSYNTH_BASE_COMPAT_H_
00033 #define PSYNTH_BASE_COMPAT_H_
00034 
00035 //#define PSYNTH_REDUCE_CODE_BLOAT
00036 
00037 #ifdef _DEBUG
00038 #    define PSYNTH_FORCEINLINE inline
00039 #else
00040 #ifdef NDEBUG
00041 #if   defined(_MSC_VER)
00042 #    define PSYNTH_FORCEINLINE __forceinline
00043 #elif defined(__GNUC__) && __GNUC__ > 3
00044 #    define PSYNTH_FORCEINLINE inline __attribute__ ((always_inline))
00045 #else
00046 #    define PSYNTH_FORCEINLINE inline
00047 #endif
00048 #else
00049 #    define PSYNTH_FORCEINLINE inline
00050 #endif
00051 #endif
00052 
00059 #if !defined(__hpux) && !defined(sun) && \
00060     !defined(__sun) && !defined(__osf__)
00061 #    define PSYNTH_NONWORD_POINTER_ALIGNMENT_SUPPORTED
00062 #endif
00063 
00064 #ifdef NDEBUG
00065 #define PSYNTH_DEBUG 0
00066 #else
00067 #define PSYNTH_DEBUG 1
00068 #endif
00069 
00070 #endif /* PSYNTH_BASE_COMPAT_H_ */