Bumping gaia.json for 1 gaia revision(s) a=gaia-bump
[gecko.git] / mfbt / SizePrintfMacros.h
blobec55c62c59554115c15f65c39284858c95c76b8c
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 /* Implements (nonstandard) PRI{ouxX}SIZE format macros for size_t types. */
9 #ifndef mozilla_SizePrintfMacros_h_
10 #define mozilla_SizePrintfMacros_h_
13 * MSVC's libc does not support C99's %z format length modifier for size_t
14 * types. Instead, we use Microsoft's nonstandard %I modifier for size_t, which
15 * is unsigned __int32 on 32-bit platforms and unsigned __int64 on 64-bit
16 * platforms:
18 * http://msdn.microsoft.com/en-us/library/tcxf1dw6.aspx
21 #if defined(XP_WIN)
22 # define PRIoSIZE "Io"
23 # define PRIuSIZE "Iu"
24 # define PRIxSIZE "Ix"
25 # define PRIXSIZE "IX"
26 #else
27 # define PRIoSIZE "zo"
28 # define PRIuSIZE "zu"
29 # define PRIxSIZE "zx"
30 # define PRIXSIZE "zX"
31 #endif
33 #endif /* mozilla_SizePrintfMacros_h_ */