wcstoll.c\stdlib\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/stdlib/wcstoll.c
blob: ddfea74bd15de8dde96348e0fd6df16b6a0f6adc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <wchar.h>
#include <stdlib.h>
#include <inttypes.h>
#include <errno.h>
#include <limits.h>
long long wcstoll(const wchar_t *s, wchar_t **p, int base)
{
	intmax_t x = wcstoimax(s, p, base);
	if (x > LLONG_MAX) {
		errno = ERANGE;
		return LLONG_MAX;
	} else if (x < LLONG_MIN) {
		errno = ERANGE;
		return LLONG_MIN;
	}
	return x;
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月08日 02:36:48 +0000

AltStyle によって変換されたページ (->オリジナル) /