mbox series

[XTF,0/4] Add strncmp(), strtol() and strtoul() functions

Message ID 20200423101918.13566-1-wipawel@amazon.de (mailing list archive)
Headers show
Series Add strncmp(), strtol() and strtoul() functions | expand

Message

Wieczorkiewicz, Pawel April 23, 2020, 10:19 a.m. UTC
Add FreeBSD's implementation of strtol() and strtoul() functions from:
https://github.com/freebsd/freebsd/blob/master/lib/libc/stdlib/strtoul.c

The FreeBSD code being added as a separate file (common/libc/strtol.c)
is under the BSD 3-clause license. Modification to COPYING file might
be needed.

Also add simple implementation of the strncmp() function.

Paul Semel (1):
  string: add freebds libc implementation of strtol()

Pawel Wieczorkiewicz (3):
  libc, strtol: Add isspace(), isdigit(), isxdigit(), isascii()
  libc, strtol: Add FreeBSD libc implementation of strtoul()
  libc: add strncmp() function

 build/files.mk          |   1 +
 common/lib.c            |   8 --
 common/libc/string.c    |  11 +++
 common/libc/strtol.c    | 201 ++++++++++++++++++++++++++++++++++++++++++++++++
 common/libc/vsnprintf.c |   8 --
 include/xtf/libc.h      |  35 +++++++++
 6 files changed, 248 insertions(+), 16 deletions(-)
 create mode 100644 common/libc/strtol.c

Comments

Julien Grall April 23, 2020, 11:06 a.m. UTC | #1
On 23/04/2020 11:19, Pawel Wieczorkiewicz wrote:
> Add FreeBSD's implementation of strtol() and strtoul() functions from:
> https://github.com/freebsd/freebsd/blob/master/lib/libc/stdlib/strtoul.c

I would suggest to specify the baseline used in each commit. This will 
allows us to track any changes that was made afterwards (even if it 
seems unlikely) in the FreeBSD code base.


> 
> The FreeBSD code being added as a separate file (common/libc/strtol.c)
> is under the BSD 3-clause license. Modification to COPYING file might
> be needed.
> 
> Also add simple implementation of the strncmp() function.
> 
> Paul Semel (1):
>    string: add freebds libc implementation of strtol()
> 
> Pawel Wieczorkiewicz (3):
>    libc, strtol: Add isspace(), isdigit(), isxdigit(), isascii()
>    libc, strtol: Add FreeBSD libc implementation of strtoul()
>    libc: add strncmp() function
> 
>   build/files.mk          |   1 +
>   common/lib.c            |   8 --
>   common/libc/string.c    |  11 +++
>   common/libc/strtol.c    | 201 ++++++++++++++++++++++++++++++++++++++++++++++++
>   common/libc/vsnprintf.c |   8 --
>   include/xtf/libc.h      |  35 +++++++++
>   6 files changed, 248 insertions(+), 16 deletions(-)
>   create mode 100644 common/libc/strtol.c
>