~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to storage/ndb/include/ndb_types.h.in

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2003 MySQL AB
 
2
 
 
3
   This program is free software; you can redistribute it and/or modify
 
4
   it under the terms of the GNU General Public License as published by
 
5
   the Free Software Foundation; version 2 of the License.
 
6
 
 
7
   This program is distributed in the hope that it will be useful,
 
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
   GNU General Public License for more details.
 
11
 
 
12
   You should have received a copy of the GNU General Public License
 
13
   along with this program; if not, write to the Free Software
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
 
 
16
/**
 
17
 * @file ndb_types.h
 
18
 */
 
19
 
 
20
#ifndef NDB_TYPES_H
 
21
#define NDB_TYPES_H
 
22
 
 
23
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(_WIN64)
 
24
#define NDB_SIZEOF_CHARP SIZEOF_CHARP
 
25
#define NDB_SIZEOF_CHAR SIZEOF_CHAR
 
26
#define NDB_SIZEOF_SHORT 2
 
27
#define NDB_SIZEOF_INT SIZEOF_INT
 
28
#define NDB_SIZEOF_LONG SIZEOF_LONG
 
29
#define NDB_SIZEOF_LONG_LONG SIZEOF_LONG_LONG
 
30
typedef unsigned __int64 Uint64;
 
31
typedef   signed __int64 Int64;
 
32
#else
 
33
#define NDB_SIZEOF_CHARP @NDB_SIZEOF_CHARP@
 
34
#define NDB_SIZEOF_CHAR @NDB_SIZEOF_CHAR@
 
35
#define NDB_SIZEOF_INT @NDB_SIZEOF_INT@
 
36
#define NDB_SIZEOF_SHORT @NDB_SIZEOF_SHORT@
 
37
#define NDB_SIZEOF_LONG @NDB_SIZEOF_LONG@
 
38
#define NDB_SIZEOF_LONG_LONG @NDB_SIZEOF_LONG_LONG@
 
39
typedef unsigned long long Uint64;
 
40
typedef   signed long long Int64;
 
41
#endif
 
42
 
 
43
typedef   signed char  Int8;
 
44
typedef unsigned char  Uint8;
 
45
typedef   signed short Int16;
 
46
typedef unsigned short Uint16;
 
47
typedef   signed int   Int32;
 
48
typedef unsigned int   Uint32;
 
49
 
 
50
typedef unsigned int UintR;
 
51
 
 
52
#ifdef __SIZE_TYPE__
 
53
  typedef __SIZE_TYPE__ UintPtr;
 
54
#elif NDB_SIZEOF_CHARP == 4
 
55
  typedef Uint32 UintPtr;
 
56
#elif NDB_SIZEOF_CHARP == 8
 
57
  typedef Uint64 UintPtr;
 
58
#else
 
59
  #error "Unknown size of (char *)"
 
60
#endif
 
61
 
 
62
#if ! (NDB_SIZEOF_CHAR == 1)
 
63
#error "Invalid define for Uint8"
 
64
#endif
 
65
 
 
66
#if ! (NDB_SIZEOF_SHORT == 2)
 
67
#error "Invalid define for Uint16"
 
68
#endif
 
69
 
 
70
#if ! (NDB_SIZEOF_INT == 4)
 
71
#error "Invalid define for Uint32"
 
72
#endif
 
73
 
 
74
#if ! (NDB_SIZEOF_LONG_LONG == 8)
 
75
#error "Invalid define for Uint64"
 
76
#endif
 
77
 
 
78
#include "ndb_constants.h"
 
79
 
 
80
#endif