Skip to content

add strtoll and strtoull to libc minimal #44005

@MeisterBob

Description

@MeisterBob

Origin

I don't know where the original source is, I took it from strtol/strtoul and changed the types from long to long long.

Purpose

strtoll and strtoull convert strings to (unsigned) long long.

Mode of integration

The addition would be in the main tree.

Pull Request

#39612

Description

The actual minimal libc has no strtoll/strtoull support, but i.e. civetweb requires those functions. One could use newlibc to gain access to strtoll/strtoull but civetweb has compatibility issue with newlibc. Even if those issues where solved the addition memory required by newlibc is way to much just for those two functions.

Also the lack of string conversion functions lead to multiple local implementations i.e. in #43289 and (libc_extension.h)[https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/net/civetweb/common/include/libc_extensions.h].

For further reference there is a thread in discord discussing this topic.

Dependencies

none

Revision

see PR

License

BSD-4-Clause-UC

Metadata

Metadata

Assignees

Labels

EnhancementChanges/Updates/Additions to existing features

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions