osinttypes.h revision 6e8cce623b6e4fe0c9e4af605d675dd9d0338c38
1/* Copyright (c) 2012 The Chromium 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 NACL_IO_OSINTTYPES_H_ 6#define NACL_IO_OSINTTYPES_H_ 7 8/* Define printf/scanf format strings for size_t. */ 9 10#if defined(WIN32) 11 12#if !defined(PRIuS) 13#define PRIuS "Iu" 14#endif 15 16#if !defined(SCNuS) 17#define SCNuS "Iu" 18#endif 19 20#else 21 22#if !defined(__STDC_FORMAT_MACROS) 23#define __STDC_FORMAT_MACROS 1 24#endif 25#include <inttypes.h> 26 27#if !defined(PRIuS) 28#define PRIuS "zu" 29#endif 30 31#if !defined(SCNuS) 32#define SCNuS "zu" 33#endif 34 35#endif 36 37#if !defined(__native_client__) 38#define PRIoff "ld" 39#else 40#define PRIoff "lld" 41#endif 42 43#endif /* NACL_IO_OSINTTYPES_H_ */ 44