Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/elmergrid/src/metis-5.1.0/GKlib/gk_arch.h
3206 views
1
/*!
2
\file gk_arch.h
3
\brief This file contains various architecture-specific declerations
4
5
\date Started 3/27/2007
6
\author George
7
\version\verbatim $Id: gk_arch.h 10711 2011-08-31 22:23:04Z karypis $ \endverbatim
8
*/
9
10
#ifndef _GK_ARCH_H_
11
#define _GK_ARCH_H_
12
13
/*************************************************************************
14
* Architecture-specific differences in header files
15
**************************************************************************/
16
#ifdef LINUX
17
#if !defined(__USE_XOPEN)
18
#define __USE_XOPEN
19
#endif
20
#if !defined(_XOPEN_SOURCE)
21
#define _XOPEN_SOURCE 600
22
#endif
23
#if !defined(__USE_XOPEN2K)
24
#define __USE_XOPEN2K
25
#endif
26
#endif
27
28
29
#ifdef HAVE_EXECINFO_H
30
#include <execinfo.h>
31
#endif
32
33
#ifdef __MINGW32__
34
#include "stdint.h"
35
#include "inttypes.h"
36
#include "sys/stat.h"
37
#else
38
#ifdef __MSC__
39
#include "ms_stdint.h"
40
#include "ms_inttypes.h"
41
#include "ms_stat.h"
42
#else
43
#ifndef SUNOS
44
#include <stdint.h>
45
#endif
46
#include <inttypes.h>
47
#include <sys/types.h>
48
#include <sys/resource.h>
49
#include <sys/time.h>
50
#endif
51
#endif
52
53
/*************************************************************************
54
* Architecture-specific modifications
55
**************************************************************************/
56
#ifdef WIN32
57
typedef ptrdiff_t ssize_t;
58
#endif
59
60
61
#ifdef SUNOS
62
#define PTRDIFF_MAX INT64_MAX
63
#endif
64
65
#ifdef __MSC__
66
/* MSC does not have rint() function */
67
#define rint(x) ((int)((x)+0.5))
68
69
/* MSC does not have INFINITY defined */
70
#ifndef INFINITY
71
#define INFINITY FLT_MAX
72
#endif
73
#endif
74
75
#endif
76
77