spandsp: inttypes.h Source File

spandsp 0.0.6

inttypes.h
1/*
2 * SpanDSP - a series of DSP components for telephony
3 *
4 * inttypes.h - a fudge for MSVC, which lacks this header
5 *
6 * Written by Steve Underwood <steveu@coppice.org>
7 *
8 * Copyright (C) 2006 Michael Jerris
9 *
10 *
11 * This file is released in the public domain.
12 *
13 */
14
15#if !defined(_INTTYPES_H_)
16#define _INTTYPES_H_
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22typedef __int8 __int8_t;
23typedef __int16 __int16_t;
24typedef __int32 __int32_t;
25typedef __int64 __int64_t;
26
27typedef unsigned __int8 uint8_t;
28typedef unsigned __int16 uint16_t;
29typedef unsigned __int32 uint32_t;
30typedef unsigned __int64 uint64_t;
31typedef __int8 int8_t;
32typedef __int16 int16_t;
33typedef __int32 int32_t;
34typedef __int64 int64_t;
35
36#if !defined(INFINITY)
37#define INFINITY 0x7FFFFFFF
38#endif
39
40#if !defined(UINT8_MAX)
41#define UINT8_MAX 0xFF
42#endif
43#if !defined(UINT16_MAX)
44#define UINT16_MAX 0xFFFF
45#endif
46
47#if !defined(INT16_MAX)
48#define INT16_MAX 0x7FFF
49#endif
50#if !defined(INT16_MIN)
51#define INT16_MIN (-INT16_MAX - 1)
52#endif
53
54#if !defined(INT32_MAX)
55#define INT32_MAX (2147483647)
56#endif
57#if !defined(INT32_MIN)
58#define INT32_MIN (-2147483647 - 1)
59#endif
60
61#define PRId8 "d"
62#define PRId16 "d"
63#define PRId32 "ld"
64#define PRId64 "lld"
65
66#define PRIu8 "u"
67#define PRIu16 "u"
68#define PRIu32 "lu"
69#define PRIu64 "llu"
70
71#ifdef __cplusplus
72}
73#endif
74
75#endif