[6127] | 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 |
|
---|
[8752] | 35 | #ifdef __USE_ISOC99 // get double_t type from math.h
|
---|
| 36 | #include <math.h>
|
---|
| 37 | #endif
|
---|
[6127] | 38 | namespace isis
|
---|
| 39 | {
|
---|
| 40 |
|
---|
| 41 |
|
---|
| 42 | // ----------------------------------------
|
---|
| 43 | // Type definitions common to all platforms
|
---|
| 44 | // ----------------------------------------
|
---|
| 45 | typedef char int8_t; // 8-bit signed value
|
---|
| 46 | typedef unsigned char uint8_t; // 8-bit unsigned value
|
---|
| 47 | typedef int int32_t; // Word size (4 bytes)
|
---|
| 48 | typedef unsigned int uint32_t; // Unsigned word size (4 bytes)
|
---|
| 49 | typedef long long32_t; // Long word (4 bytes)
|
---|
| 50 | typedef unsigned long ulong32_t; // Unsigned long word (4 bytes)
|
---|
| 51 | typedef short int16_t; // short word (2 bytes)
|
---|
| 52 | typedef unsigned short uint16_t; // Unsigned short word (2 bytes)
|
---|
[6189] | 53 | #ifndef __USE_ISOC99 // gnu lic math.h has a double_t
|
---|
[6127] | 54 | typedef double double_t; // Double precision floating point (8 bytes)
|
---|
[6189] | 55 | #endif
|
---|
[6127] | 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 |
|
---|
| 66 | namespace isis
|
---|
| 67 | {
|
---|
[8752] | 68 | typedef isis::int16_t db_t;
|
---|
[6127] | 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
|
---|
| 74 | typedef unsigned char uint8_t; // 8-bit unsigned value
|
---|
[7286] | 75 | typedef int int32_t; // Word size (4 bytes)
|
---|
| 76 | typedef unsigned int uint32_t; // Unsigned word size (4 bytes)
|
---|
[6127] | 77 | typedef long long32_t; // Long word (4 bytes)
|
---|
| 78 | typedef unsigned long ulong32_t; // Unsigned long word (4 bytes)
|
---|
| 79 | typedef short int16_t; // short word (2 bytes)
|
---|
| 80 | typedef unsigned short uint16_t; // Unsigned short word (2 bytes)
|
---|
[7100] | 81 | #ifndef __USE_ISOC99 // gnu lic math.h has a double_t
|
---|
| 82 | typedef double double_t; // Double precision floating point (8 bytes) // ****
|
---|
| 83 | #endif
|
---|
[6127] | 84 |
|
---|
| 85 | typedef uint32_t xrf_page_no_t;
|
---|
| 86 |
|
---|
| 87 | typedef uint32_t mst_page_no_t;
|
---|
| 88 | typedef uint16_t mst_offset_t;
|
---|
| 89 | typedef uint32_t mfn_t;
|
---|
| 90 | typedef uint32_t mfrl_t;
|
---|
| 91 |
|
---|
| 92 | typedef isis::uint32_t file_size_t;
|
---|
| 93 |
|
---|
| 94 |
|
---|
| 95 | #endif // __ISIS_TYPE_H__
|
---|
| 96 |
|
---|
| 97 |
|
---|
| 98 |
|
---|