ulib Remove machine/limits.h std/limits.h std/stdlib.h

This commit is contained in:
2025-09-20 10:47:04 +02:00
parent 3f0231be3f
commit e245ecca3c
4 changed files with 1 additions and 49 deletions

View File

@ -1,25 +0,0 @@
#ifndef ULIB_MACHINE_LIMITS_H_
#define ULIB_MACHINE_LIMITS_H_
#define CHAR_BIT (8)
#define SHORT_BIT (16)
#define WCHAR_BIT (16)
#define INT_BIT (32)
#define LONG_LONG_BIT (64)
#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 (-2147483648)
#define INT_MAX (2147483647)
#define UINT_MAX (4294967295U)
#define LONG_MAX (2147483647L)
#define LONG_MIN (-2147483648L)
#define ULONG_MAX (18446744073709551615UL)
#define LLONG_MAX (9223372036854775807LL)
#define LLONG_MIN (-9223372036854775808LL)
#define ULLONG_MAX (18446744073709551615ULL)
#endif // ULIB_MACHINE_LIMITS_H_

View File

@ -1,6 +0,0 @@
#ifndef ULIB_STD_LIMITS_H_
#define ULIB_STD_LIMITS_H_
#include <machine/limits.h>
#endif // ULIB_STD_LIMITS_H_

View File

@ -1,17 +0,0 @@
#ifndef ULIB_STD_STDLIB_H_
#define ULIB_STD_STDLIB_H_
#include <uprintf.h>
#include <string/conv.h>
#define printf uprintf
#define sprintf usprintf
#define vsprintf uvsprintf
#define snprintf usnprintf
#define vsnprintf uvsnprintf
#define vprintf uvprintf
#define strtoul string_conv_strtoul
#define strtol string_conv_strtol
#endif // ULIB_STD_STDLIB_H_

View File

@ -1,8 +1,8 @@
#include <stdint.h>
#include <stddef.h>
#include <machine/limits.h>
#include <string/char.h>
#include <uprintf.h>
#include <limits.h>
// https://android.googlesource.com/platform/bionic/+/ics-mr0/libc/stdlib/strtoul.c
unsigned long string_conv_strtoul(const char *nptr, char **endptr, int base)