| 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 21637 2018-01-03 22:37:24Z 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 __MSC__ |
| 30 |
#include "gk_ms_stdint.h" |
| 31 |
#include "gk_ms_inttypes.h" |
| 32 |
#include "gk_ms_stat.h" |
| 33 |
#else |
| 34 |
#ifndef SUNOS |
| 35 |
#include <stdint.h> |
| 36 |
#endif |
| 37 |
#include <inttypes.h> |
| 38 |
#include <sys/types.h> |
| 39 |
#ifndef __MINGW32__ |
| 40 |
#include <sys/resource.h> |
| 41 |
#endif |
| 42 |
#include <sys/time.h> |
| 43 |
#include <unistd.h> |
| 44 |
#endif |
| 45 |
|
| 46 |
|
| 47 |
/************************************************************************* |
| 48 |
* Architecture-specific modifications |
| 49 |
**************************************************************************/ |
| 50 |
#ifdef WIN32 |
| 51 |
typedef ptrdiff_t ssize_t; |
| 52 |
#endif |
| 53 |
|
| 54 |
|
| 55 |
#ifdef SUNOS |
| 56 |
#define PTRDIFF_MAX INT64_MAX |
| 57 |
#endif |
| 58 |
|
| 59 |
/* MSC does not have INFINITY defined */ |
| 60 |
// #ifndef INFINITY |
| 61 |
// #define INFINITY FLT_MAX |
| 62 |
// #endif |
| 63 |
|
| 64 |
#endif |