libsmbios_c library
|
00001 // vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=c: 00002 /* 00003 * Copyright (C) 2005 Dell Inc. 00004 * by Michael Brown <Michael_E_Brown@dell.com> 00005 * Licensed under the Open Software License version 2.1 00006 * 00007 * Alternatively, you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published 00009 * by the Free Software Foundation; either version 2 of the License, 00010 * or (at your option) any later version. 00011 00012 * This program is distributed in the hope that it will be useful, but 00013 * WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00015 * See the GNU General Public License for more details. 00016 */ 00017 00018 00019 #ifndef TYPES_H 00020 #define TYPES_H 00021 00022 // compat header should always be first header 00023 #include "smbios/compat.h" 00024 00025 #ifndef TYPE_DEFINED_U8 00026 #define TYPE_DEFINED_U8 00027 typedef unsigned char u8; 00028 #endif 00029 #ifndef TYPE_DEFINED_U16 00030 #define TYPE_DEFINED_U16 00031 typedef unsigned short u16; 00032 #endif 00033 #ifndef TYPE_DEFINED_U32 00034 #define TYPE_DEFINED_U32 00035 typedef unsigned int u32; 00036 #endif 00037 00038 00039 #ifndef TYPE_DEFINED_S8 00040 #define TYPE_DEFINED_S8 00041 typedef signed char s8; 00042 #endif 00043 #ifndef TYPE_DEFINED_S16 00044 #define TYPE_DEFINED_S16 00045 typedef signed short s16; 00046 #endif 00047 #ifndef TYPE_DEFINED_S32 00048 #define TYPE_DEFINED_S32 00049 typedef signed int s32; 00050 #endif 00051 00052 #ifndef TYPE_DEFINED_U64 00053 #define TYPE_DEFINED_U64 00054 #if defined(LIBSMBIOS_HAS_LONG_LONG) 00055 typedef unsigned long long u64; 00056 #elif defined(LIBSMBIOS_HAS_MS_INT64) 00057 typedef unsigned __int64 u64; 00058 #else 00059 #error "No LONG LONG or __INT64 support. Current compiler config is not supported." 00060 #endif 00061 #endif 00062 00063 #ifndef TYPE_DEFINED_S64 00064 #define TYPE_DEFINED_S64 00065 #if defined(LIBSMBIOS_HAS_LONG_LONG) 00066 typedef signed long long s64; 00067 #elif defined(LIBSMBIOS_HAS_MS_INT64) 00068 typedef signed __int64 s64; 00069 #else 00070 #error "No LONG LONG or __INT64 support. Current compiler config is not supported." 00071 #endif 00072 #endif 00073 00074 #endif /* TYPES_H */