source: main/trunk/greenstone2/build-src/packages/isis-gdl/IsisTypes.h@ 26670

Last change on this file since 26670 was 8752, checked in by jrm21, 19 years ago

fix for gcc-3.4 - need to get double_t definition from math.h

  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1/**********************************************************************
2 *
3 * IsisTypes.h
4 * Copyright (C) 2003 UNESCO
5 *
6 * A component of the Greenstone digital library software
7 * from the New Zealand Digital Library Project at the
8 * University of Waikato, New Zealand.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *
24 *********************************************************************/
25
26///////////////////////////////////////////////////////////////////////////////
27// isisType.h
28
29
30#ifndef __ISIS_TYPE_H__
31#define __ISIS_TYPE_H__
32
33#include "DLLCode.h"
34
35#ifdef __USE_ISOC99 // get double_t type from math.h
36#include <math.h>
37#endif
38namespace isis
39{
40
41
42// ----------------------------------------
43// Type definitions common to all platforms
44// ----------------------------------------
45typedef char int8_t; // 8-bit signed value
46typedef unsigned char uint8_t; // 8-bit unsigned value
47typedef int int32_t; // Word size (4 bytes)
48typedef unsigned int uint32_t; // Unsigned word size (4 bytes)
49typedef long long32_t; // Long word (4 bytes)
50typedef unsigned long ulong32_t; // Unsigned long word (4 bytes)
51typedef short int16_t; // short word (2 bytes)
52typedef unsigned short uint16_t; // Unsigned short word (2 bytes)
53#ifndef __USE_ISOC99 // gnu lic math.h has a double_t
54typedef double double_t; // Double precision floating point (8 bytes)
55#endif
56
57
58// --------------------------------------------------------------
59// Platform/compiler specific INT64 types
60// --------------------------------------------------------------
61#if defined (__64_BIT_FILE_SYSTEM__)
62#include "TYPES64.H"
63#endif
64} // namespace isis
65
66namespace isis
67{
68 typedef isis::int16_t db_t;
69 typedef isis::int16_t server_t;
70 typedef isis::int16_t IsisClientId;
71 typedef isis::uint32_t mfn_t;
72}
73// typedef char int8_t; // 8-bit signed value
74typedef unsigned char uint8_t; // 8-bit unsigned value
75typedef int int32_t; // Word size (4 bytes)
76typedef unsigned int uint32_t; // Unsigned word size (4 bytes)
77typedef long long32_t; // Long word (4 bytes)
78typedef unsigned long ulong32_t; // Unsigned long word (4 bytes)
79typedef short int16_t; // short word (2 bytes)
80typedef unsigned short uint16_t; // Unsigned short word (2 bytes)
81#ifndef __USE_ISOC99 // gnu lic math.h has a double_t
82typedef double double_t; // Double precision floating point (8 bytes) // ****
83#endif
84
85typedef uint32_t xrf_page_no_t;
86
87typedef uint32_t mst_page_no_t;
88typedef uint16_t mst_offset_t;
89typedef uint32_t mfn_t;
90typedef uint32_t mfrl_t;
91
92typedef isis::uint32_t file_size_t;
93
94
95#endif // __ISIS_TYPE_H__
96
97
98
Note: See TracBrowser for help on using the repository browser.