summaryrefslogtreecommitdiffstats
path: root/base/basictypes.h
blob: 76077358abca50ab33a4efdc93f32e7240af60b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_BASICTYPES_H_
#define BASE_BASICTYPES_H_

#include <limits.h>  // So we can set the bounds of our types.
#include <stddef.h>  // For size_t.
#include <stdint.h>  // For intptr_t.

#include "base/macros.h"
#include "build/build_config.h"

// DEPRECATED: Use (u)int{8,16,32,64}_t instead (and include <stdint.h>).
// http://crbug.com/138542
typedef int8_t int8;
typedef uint8_t uint8;
typedef int16_t int16;
typedef uint16_t uint16;
typedef int32_t int32;
typedef uint32_t uint32;
typedef int64_t int64;
typedef uint64_t uint64;

// DEPRECATED: Use std::numeric_limits (from <limits>) or
// (U)INT{8,16,32,64}_{MIN,MAX} in case of globals (and include <stdint.h>).
// http://crbug.com/138542
const uint8  kuint8max  =  0xFF;
const uint32 kuint32max =  0xFFFFFFFF;
const uint64 kuint64max =  0xFFFFFFFFFFFFFFFFULL;
const  int32 kint32min  = -0x7FFFFFFF - 1;
const  int32 kint32max  =  0x7FFFFFFF;
const  int64 kint64min  = -0x7FFFFFFFFFFFFFFFLL - 1;
const  int64 kint64max  =  0x7FFFFFFFFFFFFFFFLL;

#endif  // BASE_BASICTYPES_H_