Home | History | Annotate | Download | only in include
      1 /* ===-- inttypes.h - stub SDK header for compiler-rt -----------------------===
      2  *
      3  *                     The LLVM Compiler Infrastructure
      4  *
      5  * This file is dual licensed under the MIT and the University of Illinois Open
      6  * Source Licenses. See LICENSE.TXT for details.
      7  *
      8  * ===-----------------------------------------------------------------------===
      9  *
     10  * This is a stub SDK header file. This file is not part of the interface of
     11  * this library nor an official version of the appropriate SDK header. It is
     12  * intended only to stub the features of this header required by compiler-rt.
     13  *
     14  * ===-----------------------------------------------------------------------===
     15  */
     16 
     17 #ifndef __INTTYPES_H__
     18 #define __INTTYPES_H__
     19 
     20 #if __WORDSIZE == 64
     21 #define __INTTYPE_PRI64__ "l"
     22 #else
     23 #define __INTTYPE_PRI64__ "ll"
     24 #endif
     25 
     26 #define PRId8  "hhd"
     27 #define PRId16 "hd"
     28 #define PRId32 "d"
     29 #define PRId64 __INTTYPE_PRI64__ "d"
     30 
     31 #define PRIi8  "hhi"
     32 #define PRIi16 "hi"
     33 #define PRIi32 "i"
     34 #define PRIi64 __INTTYPE_PRI64__ "i"
     35 
     36 #define PRIo8  "hho"
     37 #define PRIo16 "ho"
     38 #define PRIo32 "o"
     39 #define PRIo64 __INTTYPE_PRI64__ "o"
     40 
     41 #define PRIu8  "hhu"
     42 #define PRIu16 "hu"
     43 #define PRIu32 "u"
     44 #define PRIu64 __INTTYPE_PRI64__ "u"
     45 
     46 #define PRIx8  "hhx"
     47 #define PRIx16 "hx"
     48 #define PRIx32 "x"
     49 #define PRIx64 __INTTYPE_PRI64__ "x"
     50 
     51 #define PRIX8  "hhX"
     52 #define PRIX16 "hX"
     53 #define PRIX32 "X"
     54 #define PRIX64 __INTTYPE_PRI64__ "X"
     55 
     56 #define SCNd8  "hhd"
     57 #define SCNd16 "hd"
     58 #define SCNd32 "d"
     59 #define SCNd64 __INTTYPE_PRI64__ "d"
     60 
     61 #define SCNi8  "hhi"
     62 #define SCNi16 "hi"
     63 #define SCNi32 "i"
     64 #define SCNi64 __INTTYPE_PRI64__ "i"
     65 
     66 #define SCNo8  "hho"
     67 #define SCNo16 "ho"
     68 #define SCNo32 "o"
     69 #define SCNo64 __INTTYPE_PRI64__ "o"
     70 
     71 #define SCNu8  "hhu"
     72 #define SCNu16 "hu"
     73 #define SCNu32 "u"
     74 #define SCNu64 __INTTYPE_PRI64__ "u"
     75 
     76 #define SCNx8  "hhx"
     77 #define SCNx16 "hx"
     78 #define SCNx32 "x"
     79 #define SCNx64 __INTTYPE_PRI64__ "x"
     80 
     81 #define SCNX8  "hhX"
     82 #define SCNX16 "hX"
     83 #define SCNX32 "X"
     84 #define SCNX64 __INTTYPE_PRI64__ "X"
     85 
     86 #endif  /* __INTTYPES_H__ */
     87