File size: 5,149 Bytes
985c397
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
// SPDX-License-Identifier: LGPL-2.1-or-later

/***************************************************************************
 *   Copyright (c) 2004 Jürgen Riegel <juergen.riegel@web.de>              *
 *                                                                         *
 *   This file is part of the FreeCAD CAx development system.              *
 *                                                                         *
 *   This library is free software; you can redistribute it and/or         *
 *   modify it under the terms of the GNU Library General Public           *
 *   License as published by the Free Software Foundation; either          *
 *   version 2 of the License, or (at your option) any later version.      *
 *                                                                         *
 *   This library  is distributed in the hope that it will be useful,      *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU Library General Public License for more details.                  *
 *                                                                         *
 *   You should have received a copy of the GNU Library General Public     *
 *   License along with this library; see the file COPYING.LIB. If not,    *
 *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
 *   Suite 330, Boston, MA  02111-1307, USA                                *
 *                                                                         *
 ***************************************************************************/
/** \file FCConfig.h
 *  \brief Include all needed defines and macros
 *  Here all defines and macro switching is done for FreeCAD.
 *  Every used library has its own section to define the configuration.
 *  This file keeps the makefiles and project files cleaner.
 */


#ifndef FC_CONFIG_H
#define FC_CONFIG_H


//**************************************************************************
// switching the operating systems

// First check for *WIN64* since the *WIN32* are also set on 64-bit platforms
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__)
# ifndef FC_OS_WIN32
#  define FC_OS_WIN32
# endif
# ifndef FC_OS_WIN64
#  define FC_OS_WIN64
# endif
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
# ifndef FC_OS_WIN32
#  define FC_OS_WIN32
# endif
# if defined(__MINGW32__)
#  if HAVE_CONFIG_H
#   include <config.h>
#  endif  // HAVE_CONFIG_H
# endif
#elif defined(__MWERKS__) && defined(__INTEL__)
# ifndef FC_OS_WIN32
#  define FC_OS_WIN32
# endif
#elif defined(__APPLE__)
# ifndef FC_OS_MACOSX
#  define FC_OS_MACOSX
# endif
#elif defined(linux) || defined(__linux) || defined(__linux__) || defined(__GLIBC__)
# ifndef FC_OS_LINUX
#  define FC_OS_LINUX
# endif
#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
# ifndef FC_OS_BSD
#  define FC_OS_BSD
# endif
#elif defined(__CYGWIN__)
# ifndef FC_OS_CYGWIN
#  define FC_OS_CYGWIN
// Avoid conflicts with Inventor
#  define HAVE_INT8_T
#  define HAVE_UINT8_T
#  define HAVE_INT16_T
#  define HAVE_UINT16_T
#  define HAVE_INT32_T
#  define HAVE_UINT32_T
#  define HAVE_INT64_T
#  define HAVE_UINT64_T
#  define HAVE_INTPTR_T
#  define HAVE_UINTPTR_T
# endif
#else
# error "FreeCAD is not ported to this OS yet. For help see www.freecad.org"
#endif

#ifdef FC_OS_WIN32
# define PATHSEP '\\'
#else
# define PATHSEP '/'
#endif

//**************************************************************************
// Standard types for Windows

#if defined(__MINGW32__)
// nothing specific here
#elif defined(FC_OS_WIN64) || defined(FC_OS_WIN32)

# ifndef HAVE_INT8_T
#  define HAVE_INT8_T
typedef signed char int8_t;
# endif

# ifndef HAVE_UINT8_T
#  define HAVE_UINT8_T
typedef unsigned char uint8_t;
# endif

# ifndef HAVE_INT16_T
#  define HAVE_INT16_T
typedef short int16_t;
# endif

# ifndef HAVE_UINT16_T
#  define HAVE_UINT16_T
typedef unsigned short uint16_t;
# endif

# ifndef HAVE_INT32_T
#  define HAVE_INT32_T
typedef int int32_t;
# endif

# ifndef HAVE_UINT32_T
#  define HAVE_UINT32_T
typedef unsigned int uint32_t;
# endif

# ifndef HAVE_INT64_T
#  define HAVE_INT64_T
typedef __int64 int64_t;
# endif

# ifndef HAVE_UINT64_T
#  define HAVE_UINT64_T
typedef unsigned __int64 uint64_t;
# endif

#endif


//**************************************************************************
// Windows import export DLL defines
#ifndef BaseExport
# define BaseExport
#endif
#ifndef GuiExport
# define GuiExport
#endif
#ifndef AppExport
# define AppExport
#endif
#ifndef DataExport
# define DataExport
#endif


//**************************************************************************
// point at which warnings of overly long specifiers disabled (needed for VC6)
#ifdef _MSC_VER
# pragma warning(disable : 4251)
# pragma warning(disable : 4996)  // suppress deprecated warning for e.g. open()
# if defined(WIN64) || defined(_WIN64) || defined(__WIN64__)
#  pragma warning(disable : 4244)
#  pragma warning(disable : 4267)
# endif
#endif


#endif  // FC_CONFIG_H