File: psitypes.h

package info (click to toggle)
psicode 3.4.0-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, stretch
  • size: 46,416 kB
  • ctags: 18,563
  • sloc: cpp: 291,425; ansic: 12,788; fortran: 10,489; perl: 3,206; sh: 2,702; makefile: 2,205; ruby: 2,178; yacc: 110; lex: 53
file content (51 lines) | stat: -rw-r--r-- 1,077 bytes parent folder | download | duplicates (4)
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

#ifndef _psi_include_psitypes_h_
#define _psi_include_psitypes_h_

#include <psiconfig.h>

/*
  Define Psi data types here
*/

/* default PSI floating-point type */
typedef double PSI_FLOAT;

/* default PSI 64-bit integer */
#ifdef HAVE_STDINT_H

#include <stdint.h>
typedef int_least64_t PSI_INT_LEAST64; 

#else

#include <climits>

#if defined(ULONGLONG_MAX) && !defined(ULLONG_MAX)
#    define ULLONG_MAX ULONGLONG_MAX
#endif

#if defined(ULLONG_MAX) && !defined(ULONGLONG_MAX)
#    define ULONGLONG_MAX ULLONG_MAX
#endif

# ifdef ULLONG_MAX
#   if ULONGLONG_MAX == (0xffffffffffffffffuLL) /* uLL reqd for xlC */
     typedef long long PSI_INT_LEAST64; 
#   else
#     error defaults not correct; you must hand modify psitypes.h
#   endif
# elif ULONG_MAX != 0xffffffff

#   if ULONG_MAX == 18446744073709551615 /* 2**64 - 1 */
     typedef long PSI_INT_LEAST64;
#   else
#     error defaults not correct; you must hand modify scint.h
#   endif
# else /* assume no 64-bit integers */
#   error 64 bit integer types are required
# endif

#endif /* HAVE_STDINT_H */

#endif