CloverBootloader/rEFIt_UEFI/PlatformPOSIX/include/XToolsConf.h
jief666 946a6428b5 Remove the trim to the first space for PartNo, Vendor, SerialNo.
Refactor ACPI_NAME_LIST as XString8Array.
Create ACPI_RENAME_DEVICE and ACPI_NAME to replace ACPI_NAME_LIST.
Change RAM_SLOT_INFO and MEM_STRUCTURE into class.
Improve XObjArray::RemoveWithoutFreeingAtIndex.
Create XStringArray::ExtractFromPos.
Move CheckFatalError and CheckError to BasicIO.
2021-04-05 11:57:55 +03:00

34 lines
790 B
C
Executable File

#ifndef __XTOOLSCONF_H__
#define __XTOOLSCONF_H__
#include <posix/posix.h>
#define xsize size_t
//#define xisize INTN
#ifdef _MSC_VER
#define MAX_XSIZE SIZE_MAX
#else
#define MAX_XSIZE SIZE_T_MAX
#endif
//#define MAX_XISIZE MAX_INTN
#define XStringGrowByDefault 10
#define XArrayGrowByDefault 8
#define XBufferGrowByDefault 16
/* For convience, operator [] is define with int parameter.
* Defining __XTOOLS_CHECK_OVERFLOW__ make a check that the parameter is >= 0
* TODO : make new XString using __XTOOLS_CHECK_OVERFLOW__
*/
#define __XTOOLS_CHECK_OVERFLOW__
#define Xrealloc(ptr, newsize, oldsize) realloc(ptr, newsize)
#include <posix/posix.h>
#define XTOOLS_VA_LIST va_list
#define XTOOLS_VA_START va_start
#define XTOOLS_VA_END va_end
#endif