#pragma once
// azaraC - src/internal/avr_std/climits
// Minimal <climits> shim for the Arduino AVR toolchain.
// Neither avr-libc nor the GCC freestanding headers ship <limits.h>;
// use GCC builtin constants instead (correct for AVR: char = 8 bit,
// int = 16 bit, long = 32 bit).

#if defined(AZARAC_AVR_STUB)
#include <climits>
#else
#define CHAR_BIT   8
#define SCHAR_MIN  (-128)
#define SCHAR_MAX  127
#define UCHAR_MAX  255
#define SHRT_MIN   (-32768)
#define SHRT_MAX   32767
#define USHRT_MAX  65535
#define INT_MIN    (-INT_MAX - 1)
#define INT_MAX    __INT_MAX__
#define UINT_MAX   (INT_MAX * 2U + 1U)
#define LONG_MIN   (-LONG_MAX - 1L)
#define LONG_MAX   __LONG_MAX__
#define ULONG_MAX  (LONG_MAX * 2UL + 1UL)
#define LLONG_MIN  (-LLONG_MAX - 1LL)
#define LLONG_MAX  __LONG_LONG_MAX__
#define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
#endif
