1/***************************************************************************
2 *                                  _   _ ____  _
3 *  Project                     ___| | | |  _ \| |
4 *                             / __| | | | |_) | |
5 *                            | (__| |_| |  _ <| |___
6 *                             \___|\___/|_| \_\_____|
7 *
8 * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
9 *
10 * This software is licensed as described in the file COPYING, which
11 * you should have received as part of this distribution. The terms
12 * are also available at http://curl.haxx.se/docs/copyright.html.
13 *
14 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 * copies of the Software, and permit persons to whom the Software is
16 * furnished to do so, under the terms of the COPYING file.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 ***************************************************************************/
22/* Simple hack trying to get a valid printf format string for size_t.
23 * If that fails for your platform you can define your own _FMT_SIZE_T,
24 * f.e.: -D_FMT_SIZE_T="zd"
25 */
26#ifndef _PRINTF_MACRO_H
27#define _PRINTF_MACRO_H
28
29#ifndef _FMT_SIZE_T
30#ifdef WIN32
31#define _FMT_SIZE_T "Id"
32#else
33/*
34"zd" is a GNU extension to POSIX; so we dont use it for size_t but hack around
35#define _FMT_SIZE_T "zd"
36*/
37#ifdef __x86_64__
38#define _FMT_SIZE_T "lu"
39#else
40#define _FMT_SIZE_T "u"
41#endif /* __x86_64__ */
42#endif /* WIN32 */
43#endif /* !_FMT_SIZE_T */
44
45#endif /* !_PRINTF_MACRO_H */
46