Michael Brown
1d33649516
[libc] Allow strtoul() to interpret negative numbers
Signed-off-by: Michael Brown <mcb30@ipxe.org >
12 lat temu
Piotr Jaroszyński
1822b1deb9
[libc] Add strtoull()
Don't implement strtoul() on top of strtoull() as strtoull() is much
bigger and only used on linux currently. Instead refactor most of the
logic out of strtoul() into static inlines and reuse that. Also put it
in a separate object so it won't get linked in.
Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com >
Signed-off-by: Michael Brown <mcb30@ipxe.org >
14 lat temu
Michael Brown
c44a193d0d
[legal] Add a selection of FILE_LICENCE declarations
Add FILE_LICENCE declarations to almost all files that make up the
various standard builds of gPXE.
15 lat temu
Michael Brown
dc60c24146
[i386] Rename __cdecl to __asmcall
__cdecl is a misleading name, since it currently encapsulates both
cdecl and regparm(0) attributes. Rename to __asmcall.
16 lat temu
Michael Brown
19a0452205
[libc] Add function declaration for main() in stdlib.h
16 lat temu
Holger Lubitz
6f61e254dc
use malloc attribute
17 lat temu
Michael Brown
058b200529
Renamed _calloc() to zalloc(), ready to be used as a standalone function.
17 lat temu
Michael Brown
4256b3338a
Split random number generation out into core/random.c, and create the
correct prototypes for srandom(), rand() and srand().
18 lat temu
Michael Brown
b02a564297
Add missing prerequisite include
18 lat temu
Michael Brown
35776f481c
Don't always zero memory in malloc(). This saves around 2us on a
full-length PKB allocation.
18 lat temu
Michael Brown
73e3e02367
Fix prototype of random() and move to stdlib.h
18 lat temu
Michael Brown
f3d817d512
Added execv() and system().
18 lat temu
Michael Brown
3e0286dee3
Move ANSI C standard prototypes to stdlib.h; leave the gPXE-specific
function prototypes (e.g. malloc_dma()) in malloc.h.
18 lat temu
Michael Brown
8df7e74990
Fix up prototype of strtoul() to match POSIX.
18 lat temu
Michael Brown
70567c51a2
Moved strtoul prototype into stdlib.h for consistency
19 lat temu