1#ifndef RUBY_BACKWARD2_INTTYPES_H
2#define RUBY_BACKWARD2_INTTYPES_H
32# define PRI_INT_PREFIX ""
35#ifndef PRI_LONG_PREFIX
36# define PRI_LONG_PREFIX "l"
39#ifndef PRI_SHORT_PREFIX
40# define PRI_SHORT_PREFIX "h"
46# define PRI_64_PREFIX PRI_LONG_PREFIX
47#elif SIZEOF_LONG_LONG == 8
48# define PRI_64_PREFIX PRI_LL_PREFIX
52# define PRIdPTR PRI_PTR_PREFIX"d"
53# define PRIiPTR PRI_PTR_PREFIX"i"
54# define PRIoPTR PRI_PTR_PREFIX"o"
55# define PRIuPTR PRI_PTR_PREFIX"u"
56# define PRIxPTR PRI_PTR_PREFIX"x"
57# define PRIXPTR PRI_PTR_PREFIX"X"
60#ifndef RUBY_PRI_VALUE_MARK
61# define RUBY_PRI_VALUE_MARK "\v"
64#if defined PRIdPTR && !defined PRI_VALUE_PREFIX
65# define PRIdVALUE PRIdPTR
66# define PRIoVALUE PRIoPTR
67# define PRIuVALUE PRIuPTR
68# define PRIxVALUE PRIxPTR
69# define PRIXVALUE PRIXPTR
70# define PRIsVALUE PRIiPTR"" RUBY_PRI_VALUE_MARK
72# define PRIdVALUE PRI_VALUE_PREFIX"d"
73# define PRIoVALUE PRI_VALUE_PREFIX"o"
74# define PRIuVALUE PRI_VALUE_PREFIX"u"
75# define PRIxVALUE PRI_VALUE_PREFIX"x"
76# define PRIXVALUE PRI_VALUE_PREFIX"X"
77# define PRIsVALUE PRI_VALUE_PREFIX"i" RUBY_PRI_VALUE_MARK
80#ifndef PRI_VALUE_PREFIX
81# define PRI_VALUE_PREFIX ""
84#ifdef PRI_TIMET_PREFIX
86#elif SIZEOF_TIME_T == SIZEOF_INT
87# define PRI_TIMET_PREFIX
88#elif SIZEOF_TIME_T == SIZEOF_LONG
89# define PRI_TIMET_PREFIX "l"
90#elif SIZEOF_TIME_T == SIZEOF_LONG_LONG
91# define PRI_TIMET_PREFIX PRI_LL_PREFIX
94#ifdef PRI_PTRDIFF_PREFIX
96#elif SIZEOF_PTRDIFF_T == SIZEOF_INT
97# define PRI_PTRDIFF_PREFIX ""
98#elif SIZEOF_PTRDIFF_T == SIZEOF_LONG
99# define PRI_PTRDIFF_PREFIX "l"
100#elif SIZEOF_PTRDIFF_T == SIZEOF_LONG_LONG
101# define PRI_PTRDIFF_PREFIX PRI_LL_PREFIX
105# define PRIdPTRDIFF PRI_PTRDIFF_PREFIX"d"
106# define PRIiPTRDIFF PRI_PTRDIFF_PREFIX"i"
107# define PRIoPTRDIFF PRI_PTRDIFF_PREFIX"o"
108# define PRIuPTRDIFF PRI_PTRDIFF_PREFIX"u"
109# define PRIxPTRDIFF PRI_PTRDIFF_PREFIX"x"
110# define PRIXPTRDIFF PRI_PTRDIFF_PREFIX"X"
113#ifdef PRI_SIZE_PREFIX
115#elif SIZEOF_SIZE_T == SIZEOF_INT
116# define PRI_SIZE_PREFIX ""
117#elif SIZEOF_SIZE_T == SIZEOF_LONG
118# define PRI_SIZE_PREFIX "l"
119#elif SIZEOF_SIZE_T == SIZEOF_LONG_LONG
120# define PRI_SIZE_PREFIX PRI_LL_PREFIX
124# define PRIdSIZE PRI_SIZE_PREFIX"d"
125# define PRIiSIZE PRI_SIZE_PREFIX"i"
126# define PRIoSIZE PRI_SIZE_PREFIX"o"
127# define PRIuSIZE PRI_SIZE_PREFIX"u"
128# define PRIxSIZE PRI_SIZE_PREFIX"x"
129# define PRIXSIZE PRI_SIZE_PREFIX"X"
Thin wrapper to ruby/config.h.
C99 shim for <inttypes.h>