Blender  V2.93
BLI_sys_types.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
34 #pragma once
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 #if defined(__linux__) || defined(__GNU__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
41  defined(__FreeBSD_kernel__) || defined(__HAIKU__)
42 
43 /* Linux-i386, Linux-Alpha, Linux-PPC */
44 # include <stdint.h>
45 
46 /* XXX */
47 # ifndef UINT64_MAX
48 # define UINT64_MAX 18446744073709551615
49 typedef uint8_t u_int8_t;
50 typedef uint16_t u_int16_t;
51 typedef uint32_t u_int32_t;
52 typedef uint64_t u_int64_t;
53 # endif
54 
55 #elif defined(__APPLE__)
56 
57 # include <inttypes.h>
58 
59 /* MSVC >= 2010 */
60 #elif defined(_MSC_VER)
61 # include <stdint.h>
62 
63 #else
64 
65 /* FreeBSD, Solaris */
66 # include <stdint.h>
67 # include <sys/types.h>
68 
69 #endif /* ifdef platform for types */
70 
71 #include <stdbool.h>
72 #include <stddef.h> /* size_t define */
73 
74 #ifndef __cplusplus
75 # if defined(__APPLE__) || defined(__NetBSD__)
76 /* The <uchar.h> standard header is missing on macOS. */
77 typedef unsigned int char32_t;
78 # else
79 # include <uchar.h>
80 # endif
81 #endif
82 
83 typedef unsigned int uint;
84 typedef unsigned short ushort;
85 typedef unsigned long ulong;
86 typedef unsigned char uchar;
87 
88 #ifdef __cplusplus
89 }
90 #endif
unsigned char uchar
Definition: BLI_sys_types.h:86
unsigned long ulong
Definition: BLI_sys_types.h:85
unsigned int uint
Definition: BLI_sys_types.h:83
unsigned short ushort
Definition: BLI_sys_types.h:84
unsigned short uint16_t
Definition: stdint.h:82
unsigned int uint32_t
Definition: stdint.h:83
unsigned char uint8_t
Definition: stdint.h:81
unsigned __int64 uint64_t
Definition: stdint.h:93