Use stdint.h types throughout PDFium.
[pdfium.git] / core / include / fxcrt / fx_safe_types.h
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CORE_INCLUDE_FXCRT_FX_SAFE_TYPES_H_
6 #define CORE_INCLUDE_FXCRT_FX_SAFE_TYPES_H_
7
8 #include <stdlib.h>  // For size_t.
9
10 #include "../../../third_party/base/numerics/safe_math.h"
11 #include "fx_stream.h"  // for FX_FILESIZE.
12 #include "fx_system.h"
13
14 typedef pdfium::base::CheckedNumeric<FX_DWORD> FX_SAFE_DWORD;
15 typedef pdfium::base::CheckedNumeric<int32_t> FX_SAFE_INT32;
16 typedef pdfium::base::CheckedNumeric<size_t> FX_SAFE_SIZE_T;
17 typedef pdfium::base::CheckedNumeric<FX_FILESIZE> FX_SAFE_FILESIZE;
18
19 #endif  // CORE_INCLUDE_FXCRT_FX_SAFE_TYPES_H_