CloverBootloader/Xcode/cpp_tests/Include/XToolsConf.h

30 lines
734 B
C
Raw Normal View History

2020-04-26 15:07:30 +02:00
#ifndef __XTOOLSCONF_H__
#define __XTOOLSCONF_H__
#include <posix.h>
#include <stdarg.h>
#include "../../../rEFIt_UEFI/Platform/Posix/abort.h"
#define xsize size_t
//#define xisize INTN
2020-04-25 11:59:07 +02:00
#ifdef _MSC_VER
#define MAX_XSIZE SIZE_MAX
#else
#define MAX_XSIZE SIZE_T_MAX
2020-04-25 11:59:07 +02:00
#endif
//#define MAX_XISIZE MAX_INTN
2020-04-24 11:30:09 +02:00
#define XStringGrowByDefault 10
#define XArrayGrowByDefault 8
2020-08-13 14:07:40 +02:00
#define XBufferGrowByDefault 16
/* For convience, operator [] is define with int parameter.
2020-04-24 11:30:09 +02:00
* Defining __XTOOLS_CHECK_OVERFLOW__ make a check that the parameter is >= 0
* TODO : make new XString using __XTOOLS_CHECK_OVERFLOW__
*/
2020-04-24 11:30:09 +02:00
#define __XTOOLS_CHECK_OVERFLOW__
2020-04-24 11:30:09 +02:00
#define Xrealloc(ptr, newsize, oldsize) realloc(ptr, newsize)
2020-03-26 13:59:20 +01:00
#endif