source: Sophya/trunk/SophyaLib/BaseTools/machdefs_mkmf.h@ 3722

Last change on this file since 3722 was 3535, checked in by ansari, 17 years ago

Oubli suppression OS_AIX ds machdefs_mkmf.h , Reza 12/10/2008

File size: 7.9 KB
Line 
1#ifndef MACHDEFS_SEEN
2#define MACHDEFS_SEEN
3
4/* -------------- List of flags (and description) -------------------
5 - SO_ARCH64 : select 64 bits architecture (default 32 bits)
6 - SO_NOFPIC : disable fPIC flag (Position Independent Code) default fPIC enabled
7 - SO_SASIZET64 : select 64 bits size for array indices (default 32 bits)
8 - SO_BOUNDCHECKING : activate bound checking (in accessing array elements)
9 - SOPHYA_DEBUG : debug flag ( --> if set, SO_BOUNDCHECKING is also set)
10 ------------------------------------------------------------------ */
11
12#ifdef SOPHYA_DEBUG
13#define SO_BOUNDCHECKING
14#endif
15
16/***********************************************************************/
17/* Find hardware, OS and compiler combination */
18/***********************************************************************/
19
20#if defined(OSF1)
21#define MACH_ALPHA
22#endif
23
24#if defined(_AIX) || defined(AIX)
25#define MACH_IBMRS
26#endif
27
28#if defined(__hpux__) || defined(HPUX)
29#define MACH_HP
30#endif
31
32#if defined(SunOS) || defined ( sun )
33#define MACH_SUN
34#endif
35
36#ifdef IRIX64
37#define MACH_SGI
38#endif
39
40#ifdef __APPLE__
41#ifdef __MACH__
42#ifdef __POWERPC__
43#define MACH_POWERPC
44#else
45#define MACH_INTEL
46#endif
47#endif
48#endif
49
50#if defined(Linux) || defined(linux)
51#if defined(__alpha__)
52#define MACH_ALPHA
53#elif defined(powerpc)
54#define MACH_POWERPC
55#elif defined(__i386__)
56#define MACH_INTEL
57#else
58#define MACH_AMD
59/* $CHECK$ (Reza Avril 2007): Il faut affiner ce test pour
60 determiner correctement le type de processeur */
61#endif
62#endif
63
64/***********************************************************************/
65/* Hardware/OS dependent stuff */
66/***********************************************************************/
67
68/* --------------------------------------------------------------- */
69/* 1/ typedefs for different size integers and floats */
70/* --------------------------------------------------------------- */
71
72/* --- Avr2007: The following typdefs should be OK for most system */
73/* and compilers: OSF, Linux, AIX, SGI, MacOSX, Sun, HP */
74
75typedef signed char int_1;
76typedef unsigned char uint_1;
77typedef short int_2;
78typedef unsigned short uint_2;
79typedef int int_4;
80typedef unsigned int uint_4;
81typedef long long int_8;
82typedef unsigned long long uint_8;
83typedef float r_4;
84typedef double r_8;
85
86/* --------------------------------------------------------------- */
87/* 2/ Endiannes (/ byteswap for different processors) */
88/* --------------------------------------------------------------- */
89/*
90 ==> POWERPC, IBMRS, HP_UX, IRIX64, SunSPARC (?) :
91 BigEndian ( SWAP=SWAPDEFAUT=0)
92 ==> ALPHA, INTEL, AMD :
93 LittleEndian ( SWAP=SWAPDEFAUT=1)
94*/
95
96#if defined(MACH_ALPHA) || defined(MACH_INTEL) || defined(MACH_AMD)
97#define IS_BIG_ENDIAN 0
98#else
99#define IS_BIG_ENDIAN 1
100#endif
101
102/* ---- La taille des index des tableaux ---- */
103#ifdef SO_SASIZET64
104typedef int_8 sa_size_t ;
105#else
106typedef int_4 sa_size_t ;
107#endif
108
109
110/***********************************************************************/
111/* Find Compiler */
112/***********************************************************************/
113
114/* __DECCXX : DEC CXX, version >= 6 is required */
115/* __GNUG__ : GNU C++ 2.8.1, egcs ?? */
116/* __aCC__ : aCC on HP */
117/* __KCC__ : KCC, version >= 3.3 is required */
118/* __SGICC__ : SGI (IRIX64) CC compiler */
119/* __INTEL_COMPILER : : INTEL compiler */
120/* __IBMCPP__ : AIX (IBM) xlC c++ compiler */
121
122/***********************************************************************/
123/* Compiler-specific stuff */
124/***********************************************************************/
125
126/* ANSI_TEMPLATES : use ANSI syntax for explicit templates */
127/* GNUG_TEMPLATES : use GNU syntax for explicit templates */
128/* PRAGMA_TEMPLATES : use pragma template, a la cxx */
129/* COMPILER_EXCEPTIONS : knows about exceptions --- required ? */
130/* STREAMPOS_IS_CLASS : streampos is a real class */
131/* ITER_TAG : use iter_tag for iterator qualifiers in STL */
132/* NO_STRSTREAM : does not have strstream */
133/* HAS_IOS_BIN */
134/* HAS_IOS_NOCREATE */
135/* HAS_VEC_NEW : operator new[] */
136/* CC_HAS_RTTI_SUPPORT has Run Time Type Identification support */
137/* ANSI_IO : rdbuf()->pubseekoff rather than seekg */
138/* HAS_STR_NPOS : has string::npos and not a global NPOS */
139/* NO_IOS_COMPLEX : does not have operator << defined for complex */
140/* DECL_TEMP_SPEC : Template specialization declaration */
141/* TSNMLUPG4 : Two stage name look-up scheme (g++>3.4) */
142
143
144/* (STREAMPOS_IS_CLASS non-active: ca compile sans sur gcc3.2 et cxx)
145 rz+cmv 11/02/03 */
146
147/* The following is true for most compilers */
148
149#ifndef HAS_VEC_NEW
150#define HAS_VEC_NEW
151#endif
152
153#ifndef COMPILER_EXCEPTIONS
154#define COMPILER_EXCEPTIONS
155#endif
156
157#ifndef CC_HAS_RTTI_SUPPORT
158#define CC_HAS_RTTI_SUPPORT
159#endif
160
161
162#ifndef DECL_TEMP_SPEC
163#define DECL_TEMP_SPEC
164#endif
165
166/* Most compilers dot not implement two level name lookup for templates
167 introduced by gcc >= 3.4
168*/
169#ifdef TSNMLUPG4
170#undef TSNMLUPG4
171#endif
172
173/* now the specific things */
174
175#ifdef __GNUC__
176#define GCC_VERSION (__GNUC__ * 1000 \
177 + __GNUC_MINOR__ * 100 \
178 + __GNUC_PATCHLEVEL__)
179#define ANSI_TEMPLATES
180/*
181if (__GNUC__ >= 3)
182define STREAMPOS_IS_CLASS
183endif
184*/
185#define GNU_TEMPLATES
186#define HAS_STR_NPOS
187#define HAS_IOS_BIN
188#define HAS_IOS_NOCREATE
189#if ( GCC_VERSION >= 3000 )
190#undef DECL_TEMP_SPEC
191#define DECL_TEMP_SPEC template <>
192#endif
193#if ( GCC_VERSION >= 3400 )
194/* Two level name look-up scheme for templates introduced from gcc 3.4 */
195#define TSNMLUPG4
196#endif
197
198#endif
199
200#ifdef __DECCXX
201#define HAS_STR_NPOS
202#define ITER_TAG
203#define __CXX_PRAGMA_TEMPLATES__
204#define PRAGMA_TEMPLATES
205#endif
206
207#if defined (__aCC__)
208#ifndef ANSI_TEMPLATES
209#define ANSI_TEMPLATES
210#endif
211#endif
212
213#if defined(__KCC__)
214/* KCC V 3.2 ne compile pas i/ostream s ; long p = s.tellg(); OK en V 3.3 */
215#define HAS_STR_NPOS
216#ifndef ANSI_TEMPLATES
217#define ANSI_TEMPLATES
218#endif
219#endif
220
221#if defined(__SGICC__)
222#define HAS_STR_NPOS
223#ifndef ANSI_TEMPLATES
224#define ANSI_TEMPLATES
225#endif
226#undef DECL_TEMP_SPEC
227#define DECL_TEMP_SPEC template <>
228#endif
229
230#if defined(__IBMCPP__)
231/* IBM xlC compiler support Added : dec 2005 */
232#ifndef ANSI_TEMPLATES
233#define ANSI_TEMPLATES
234#endif
235#undef DECL_TEMP_SPEC
236#define DECL_TEMP_SPEC template <>
237#endif
238
239/* Get things has homogeneous as possible between compilers */
240
241#ifdef HAS_STR_NPOS
242#define NPOS string::npos
243#else
244#define NPOS (size_t)-1
245#endif
246
247#ifndef __GNUG__
248#define __PRETTY_FUNCTION__ __FILE__ " __LINE__ "
249#ifndef __FUNCTION__
250#define __FUNCTION__ __FILE__ " __LINE__ "
251#endif
252#ifndef __KCC__
253#define __attribute__(_x_)
254#endif
255#endif
256
257
258#ifdef HAS_IOS_BIN
259#define IOS_BIN ios::binary
260#else
261#define IOS_BIN 0
262#endif
263
264
265#ifdef Darwin
266#define NO_VALUES_H
267#include "osx_values.h"
268#endif
269
270
271#ifdef __cplusplus
272/* Standard C++ library classes are in the namespace std */
273namespace std { }
274using namespace std;
275/*******************************************/
276/* SOPHYA classes are in namespace SOPHYA */
277/* namespace SOPHYA {} */
278/* using namespace SOPHYA; */
279/* Please use instead: sopnamsp.h */
280/*******************************************/
281#endif
282
283#endif
Note: See TracBrowser for help on using the repository browser.