CVC3
os.h
Go to the documentation of this file.
1 /*****************************************************************************/
2 /*!
3  * \file os.h
4  * \brief Abstraction over different operating systems.
5  *
6  * Author: Alexander Fuchs
7  *
8  * Created: Fri Feb 16 12:00:00 2007
9  *
10  * <hr>
11  *
12  * License to use, copy, modify, sell and/or distribute this software
13  * and its documentation for any purpose is hereby granted without
14  * royalty, subject to the terms and conditions defined in the \ref
15  * LICENSE file provided with this distribution.
16  *
17  * <hr>
18  *
19  */
20 /*****************************************************************************/
21 
22 #ifndef _cvc3__windows_h_
23 #define _cvc3__windows_h_
24 
25 
26 // define if cvc3lib built as a dll, comment if cvc3lib is linked statically
27 // #define CVC_DLL_LINKAGE
28 // library export of C++ symbols for C++ windows interface
29 
30 // for dynamic binding dll export needed
31 #ifdef CVC_DLL_LINKAGE
32  #ifdef CVC_DLL_EXPORT
33  #define CVC_DLL __declspec(dllexport)
34  #elif CVC_DLL_IMPORT
35  #define CVC_DLL __declspec(dllimport)
36  #else
37  #define CVC_DLL
38  #endif
39 
40 // for static binding dll export not needed
41 #else
42 #define CVC_DLL
43 
44 #endif
45 
46 #ifndef _LINUX_WINDOWS_CROSS_COMPILE
47 /// MS C++ specific settings
48 #ifdef _MSC_VER
49 
50 // CLR specific settings
51 // #ifdef _MANAGED
52 
53 // if lex files are created with cygwin they require isatty,
54 // which in MS VS C++ requires using _isatty
55 #include <io.h>
56 #define isatty _isatty
57 
58 // C99 stdint data types
59 typedef signed __int8 int8_t;
60 typedef signed __int16 int16_t;
61 typedef signed __int32 int32_t;
62 typedef signed __int64 int64_t;
63 typedef unsigned __int8 uint8_t;
64 typedef unsigned __int16 uint16_t;
65 typedef unsigned __int32 uint32_t;
66 typedef unsigned __int64 uint64_t;
67 
68 // unix specific settings
69 #else
70 
71 // C99 data types
72 // (should) provide:
73 // int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_tm
74 // intptr_t, uintptr_t
75 #include <stdint.h>
76 
77 #endif
78 
79 #else
80 // Cross-compile include the same as for unix
81 #include <stdint.h>
82 #endif
83 
84 
85 
86 #endif