5275
|
1 /* |
|
2 |
|
3 Copyright (C) 2005 John W. Eaton |
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
5307
|
19 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
20 02110-1301, USA. |
5275
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_oct_types_h) |
|
25 #define octave_oct_types_h 1 |
|
26 |
|
27 typedef @OCTAVE_IDX_TYPE@ octave_idx_type; |
|
28 |
5828
|
29 #if defined (HAVE_STDINT_H) |
|
30 #include <stdint.h> |
|
31 #elif defined (HAVE_INTTYPES_H) |
|
32 #include <inttypes.h> |
|
33 #else |
|
34 |
6058
|
35 #if defined (HAVE_LIMITS_H) |
|
36 #include <limits.h> |
|
37 #endif |
|
38 |
5828
|
39 #if CHAR_BIT == 8 |
|
40 typedef signed char int8_t; |
|
41 typedef unsigned char uint8_t; |
|
42 #else |
|
43 #error "CHAR_BIT is not 8!" |
|
44 #endif |
|
45 |
|
46 #if SIZEOF_SHORT == 2 |
|
47 typedef short int16_t; |
|
48 typedef unsigned short uint16_t; |
|
49 #elif SIZEOF_INT == 2 |
|
50 typedef long int16_t; |
|
51 typedef unsigned long uint16_t; |
|
52 #else |
|
53 #error "No 2 byte integer type found!" |
|
54 #endif |
|
55 |
|
56 #if SIZEOF_INT == 4 |
|
57 typedef int int32_t; |
|
58 typedef unsigned int uint32_t; |
|
59 #elif SIZEOF_LONG == 4 |
|
60 typedef long int32_t; |
|
61 typedef unsigned long uint32_t; |
|
62 #else |
|
63 #error "No 4 byte integer type found!" |
|
64 #endif |
|
65 |
|
66 #if SIZEOF_LONG == 8 |
|
67 typedef long int64_t; |
|
68 typedef unsigned long uint64_t; |
|
69 #elif SIZEOF_LONG_LONG == 8 |
|
70 typedef long long int64_t; |
|
71 typedef unsigned long long uint64_t; |
|
72 #endif |
|
73 |
|
74 #endif |
|
75 |
5275
|
76 #endif |
|
77 |
|
78 /* |
|
79 ;;; Local Variables: *** |
|
80 ;;; mode: C++ *** |
|
81 ;;; End: *** |
|
82 */ |