source: cpp/PrintFloat/Standard.h @ 977

Last change on this file since 977 was 882, checked in by Maciej Komosinski, 6 years ago

#include <stddef.h> needed for macOS

File size: 1.9 KB
RevLine 
[823]1/******************************************************************************
2  Copyright (c) 2014 Ryan Juckett
3  http://www.ryanjuckett.com/
4 
5  This software is provided 'as-is', without any express or implied
6  warranty. In no event will the authors be held liable for any damages
7  arising from the use of this software.
8 
9  Permission is granted to anyone to use this software for any purpose,
10  including commercial applications, and to alter it and redistribute it
11  freely, subject to the following restrictions:
12 
13  1. The origin of this software must not be misrepresented; you must not
14     claim that you wrote the original software. If you use this software
15     in a product, an acknowledgment in the product documentation would be
16     appreciated but is not required.
17 
18  2. Altered source versions must be plainly marked as such, and must not be
19     misrepresented as being the original software.
20 
21  3. This notice may not be removed or altered from any source
22     distribution.
23******************************************************************************/
24
25#ifndef RJ__Standard_h
26#define RJ__Standard_h
27
28#if defined(WIN32) || defined(WIN64)
29        #include <stdint.h>
30#else
31        #include <inttypes.h>
32#endif
33
[882]34#if defined(LINUX) || defined(__EMSCRIPTEN__) || defined(MACOS)
[823]35        #include <stddef.h>
36#endif
37
38#include <assert.h>
39
40// Assertion macro
41#define RJ_ASSERT(condition) assert(condition)
42 
43// Boolean types
44typedef bool        tB;
45 
46// Character types
47typedef char        tC8;
48 
49// Unsigned integer types
50typedef uint8_t     tU8;
51typedef uint16_t    tU16;
52typedef uint32_t    tU32;
53typedef uint64_t    tU64;
54 
55// Signed integer types
56typedef int8_t      tS8;
57typedef int16_t     tS16;
58typedef int32_t     tS32;
59typedef int64_t     tS64;
60 
61// Floating point types
62typedef float       tF32;
63typedef double      tF64;
64
65// Size types
66typedef size_t          tSize;
67typedef ptrdiff_t       tPtrDiff;
68
69#endif
Note: See TracBrowser for help on using the repository browser.