CVC3

os.h

Go to the documentation of this file.
00001 /*****************************************************************************/
00002 /*!
00003  * \file os.h
00004  * \brief Abstraction over different operating systems.
00005  *
00006  * Author: Alexander Fuchs
00007  *
00008  * Created: Fri Feb 16 12:00:00 2007
00009  *
00010  * <hr>
00011  *
00012  * License to use, copy, modify, sell and/or distribute this software
00013  * and its documentation for any purpose is hereby granted without
00014  * royalty, subject to the terms and conditions defined in the \ref
00015  * LICENSE file provided with this distribution.
00016  *
00017  * <hr>
00018  *
00019  */
00020 /*****************************************************************************/
00021 
00022 #ifndef _cvc3__windows_h_
00023 #define _cvc3__windows_h_
00024 
00025 
00026 // define if cvc3lib built as a dll, comment if cvc3lib is linked statically
00027 // #define CVC_DLL_LINKAGE
00028 // library export of C++ symbols for C++ windows interface
00029 
00030 // for dynamic binding dll export needed
00031 #ifdef CVC_DLL_LINKAGE
00032  #ifdef CVC_DLL_EXPORT
00033  #define CVC_DLL __declspec(dllexport)
00034  #elif CVC_DLL_IMPORT
00035  #define CVC_DLL __declspec(dllimport)
00036  #else
00037  #define CVC_DLL
00038  #endif
00039 
00040 // for static binding dll export not needed
00041 #else
00042 #define CVC_DLL
00043 
00044 #endif
00045 
00046 #ifndef _LINUX_WINDOWS_CROSS_COMPILE
00047 /// MS C++ specific settings
00048 #ifdef _MSC_VER
00049 
00050 // CLR specific settings
00051 //  #ifdef _MANAGED
00052 
00053 // if lex files are created with cygwin they require isatty,
00054 // which in MS VS C++ requires using _isatty
00055 #include <io.h>
00056 #define isatty _isatty
00057 
00058 // C99 stdint data types
00059 typedef signed __int8        int8_t;
00060 typedef signed __int16       int16_t;
00061 typedef signed __int32       int32_t;
00062 typedef signed __int64       int64_t;
00063 typedef unsigned __int8      uint8_t;
00064 typedef unsigned __int16     uint16_t;
00065 typedef unsigned __int32     uint32_t;
00066 typedef unsigned __int64     uint64_t;
00067 
00068 // unix specific settings
00069 #else
00070 
00071 // C99 data types
00072 // (should) provide:
00073 // int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_tm
00074 // intptr_t, uintptr_t
00075 #include <stdint.h>
00076 
00077 #endif
00078 
00079 #else
00080 // Cross-compile include the same as for unix
00081 #include <stdint.h>
00082 #endif
00083 
00084 
00085 
00086 #endif