libsmbios_c library
types.h
Go to the documentation of this file.
1// vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=c:
2/*
3 * Copyright (C) 2005 Dell Inc.
4 * by Michael Brown <Michael_E_Brown@dell.com>
5 * Licensed under the Open Software License version 2.1
6 *
7 * Alternatively, you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published
9 * by the Free Software Foundation; either version 2 of the License,
10 * or (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 * See the GNU General Public License for more details.
16 */
17
18
19#ifndef TYPES_H
20#define TYPES_H
21
22// compat header should always be first header
23#include "smbios_c/compat.h"
24
25#include <stdbool.h>
26
27#ifndef TYPE_DEFINED_U8
28#define TYPE_DEFINED_U8
29typedef unsigned char u8;
30#endif
31#ifndef TYPE_DEFINED_U16
32#define TYPE_DEFINED_U16
33typedef unsigned short u16;
34#endif
35#ifndef TYPE_DEFINED_U32
36#define TYPE_DEFINED_U32
37typedef unsigned int u32;
38#endif
39
40
41#ifndef TYPE_DEFINED_S8
42#define TYPE_DEFINED_S8
43typedef signed char s8;
44#endif
45#ifndef TYPE_DEFINED_S16
46#define TYPE_DEFINED_S16
47typedef signed short s16;
48#endif
49#ifndef TYPE_DEFINED_S32
50#define TYPE_DEFINED_S32
51typedef signed int s32;
52#endif
53
54#ifndef TYPE_DEFINED_U64
55#define TYPE_DEFINED_U64
56#if defined(LIBSMBIOS_C_HAS_LONG_LONG)
57typedef unsigned long long u64;
58#elif defined(LIBSMBIOS_C_HAS_MS_INT64)
59typedef unsigned __int64 u64;
60#else
61#error "No LONG LONG or __INT64 support. Current compiler config is not supported."
62#endif
63#endif
64
65#ifndef TYPE_DEFINED_S64
66#define TYPE_DEFINED_S64
67#if defined(LIBSMBIOS_C_HAS_LONG_LONG)
68typedef signed long long s64;
69#elif defined(LIBSMBIOS_C_HAS_MS_INT64)
70typedef signed __int64 s64;
71#else
72#error "No LONG LONG or __INT64 support. Current compiler config is not supported."
73#endif
74#endif
75
76#endif /* TYPES_H */
signed int s32
Definition types.h:51
unsigned int u32
Definition types.h:37
signed char s8
Definition types.h:43
signed short s16
Definition types.h:47
unsigned short u16
Definition types.h:33
unsigned char u8
Definition types.h:29