From 5e80d6f5f090b7d259788c8fc158fa72b2ea4c7c Mon Sep 17 00:00:00 2001 From: Felix Nawothnig <felix.nawothnig@t-online.de> Date: Fri, 2 Apr 2004 23:28:31 +0000 Subject: [PATCH] Define all macros described on MSDN. --- include/msvcrt/limits.h | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/include/msvcrt/limits.h b/include/msvcrt/limits.h index fa310a532f3..209f2609314 100644 --- a/include/msvcrt/limits.h +++ b/include/msvcrt/limits.h @@ -1,17 +1,39 @@ #ifndef __WINE_LIMITS_H #define __WINE_LIMITS_H -#define INT_MAX 2147483647 -#define INT_MIN (-2147483648) -#define SHRT_MAX 32767 -#define SHRT_MIN (-32768) +#define CHAR_BIT 8 +#define MB_LEN_MAX 2 -#ifdef __cplusplus -extern "C" { -#endif +#define SCHAR_MIN (-0x80) +#define SCHAR_MAX 0x7f +#define UCHAR_MAX 0xff -#ifdef __cplusplus -} +#ifdef __CHAR_UNSIGNED__ +# define CHAR_MIN 0 +# define CHAR_MAX UCHAR_MAX +#else +# define CHAR_MIN SCHAR_MIN +# define CHAR_MAX SCHAR_MAX #endif +#define SHRT_MIN (-0x8000) +#define SHRT_MAX 0x7fff +#define USHRT_MAX 0xffff + +#define INT_MIN (-0x80000000) +#define INT_MAX 0x7fffffff +#define UINT_MAX 0xffffffff + +#define LONG_MIN (-0x80000000L) +#define LONG_MAX 0x7fffffffL +#define ULONG_MAX 0xffffffffUL + +#define _I64_MAX (((__int64)0x7fffffff << 32) | 0xffffffff) +#define _I64_MIN (-_I64_MAX-1) +#define _UI64_MAX (((unsigned __int64)0xffffffff << 32) | 0xffffffff) + +#define I64_MIN _I64_MIN +#define I64_MAX _I64_MAX +#define UI64_MAX _UI64_MAX + #endif /* __WINE_LIMITS_H */ -- GitLab