~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

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