libpayload: Provide atol(), malloc.h
Change-Id: I807ca061115146a6851eef481eb881b279fba8e1 Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Reviewed-on: http://review.coreboot.org/86 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
163e220c5d
commit
c3c827cf86
|
@ -0,0 +1 @@
|
||||||
|
#include <stdlib.h>
|
|
@ -120,6 +120,7 @@ void *memalign(size_t align, size_t size);
|
||||||
*/
|
*/
|
||||||
long int strtol(const char *s, char **nptr, int base);
|
long int strtol(const char *s, char **nptr, int base);
|
||||||
unsigned long int strtoul(const char *s, char **nptr, int base);
|
unsigned long int strtoul(const char *s, char **nptr, int base);
|
||||||
|
long atol(const char *nptr);
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
|
@ -473,6 +473,11 @@ long int strtol(const char *ptr, char **endptr, int base)
|
||||||
return ret * negative;
|
return ret * negative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long atol(const char *nptr)
|
||||||
|
{
|
||||||
|
return strtol(nptr, NULL, 10);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert the initial portion of a string into an unsigned int
|
* Convert the initial portion of a string into an unsigned int
|
||||||
* @param ptr A pointer to the string to convert
|
* @param ptr A pointer to the string to convert
|
||||||
|
|
Loading…
Reference in New Issue