config.h

Go to the documentation of this file.
00001 /******************************************************************************
00002 *       SOFA, Simulation Open-Framework Architecture, version 1.0 beta 3      *
00003 *                (c) 2006-2008 MGH, INRIA, USTL, UJF, CNRS                    *
00004 *                                                                             *
00005 * This library is free software; you can redistribute it and/or modify it     *
00006 * under the terms of the GNU Lesser General Public License as published by    *
00007 * the Free Software Foundation; either version 2.1 of the License, or (at     *
00008 * your option) any later version.                                             *
00009 *                                                                             *
00010 * This library is distributed in the hope that it will be useful, but WITHOUT *
00011 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or       *
00012 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
00013 * for more details.                                                           *
00014 *                                                                             *
00015 * You should have received a copy of the GNU Lesser General Public License    *
00016 * along with this library; if not, write to the Free Software Foundation,     *
00017 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA.          *
00018 *******************************************************************************
00019 *                              SOFA :: Framework                              *
00020 *                                                                             *
00021 * Authors: M. Adam, J. Allard, B. Andre, P-J. Bensoussan, S. Cotin, C. Duriez,*
00022 * H. Delingette, F. Falipou, F. Faure, S. Fonteneau, L. Heigeas, C. Mendoza,  *
00023 * M. Nesme, P. Neumann, J-P. de la Plata Alcade, F. Poyer and F. Roy          *
00024 *                                                                             *
00025 * Contact information: contact@sofa-framework.org                             *
00026 ******************************************************************************/
00027 #ifndef SOFA_HELPER_SYSTEM_CONFIG_H
00028 #define SOFA_HELPER_SYSTEM_CONFIG_H
00029 
00030 #ifdef WIN32
00031 #ifdef _MSC_VER
00032 #ifndef NOMINMAX
00033 #define NOMINMAX
00034 #endif
00035 #define snprintf _snprintf
00036 #endif
00037 #include <windows.h>
00038 #endif
00039 
00040 #ifdef _MSC_VER
00041 # define _USE_MATH_DEFINES // required to get M_PI from math.h
00042 // Visual C++ does not include stdint.h
00043 typedef signed __int8       int8_t;
00044 typedef signed __int16      int16_t;
00045 typedef signed __int32      int32_t;
00046 typedef signed __int64      int64_t;
00047 typedef unsigned __int8     uint8_t;
00048 typedef unsigned __int16    uint16_t;
00049 typedef unsigned __int32    uint32_t;
00050 typedef unsigned __int64    uint64_t;
00051 #else
00052 #include <stdint.h>
00053 #endif
00054 
00055 #ifdef SOFA_FLOAT
00056 typedef float SReal;
00057 #else
00058 typedef double SReal;
00059 #endif
00060 
00061 #define sofa_concat(a,b) sofa_do_concat(a,b)
00062 #define sofa_do_concat(a,b) sofa_do_concat2(a,b)
00063 #define sofa_do_concat2(a,b) a##b
00064 
00065 #define sofa_tostring(a) sofa_do_tostring(a)
00066 #define sofa_do_tostring(a) #a
00067 
00068 #define SOFA_DECL_CLASS(name) extern "C" { int sofa_concat(class_,name) = 0; }
00069 #define SOFA_LINK_CLASS(name) extern "C" { extern int sofa_concat(class_,name); int sofa_concat(link_,name) = sofa_concat(class_,name); }
00070 
00071 #endif

Generated on Sun Nov 23 02:29:30 2008 for Sofa by  doxygen 1.5.7.1