Michael Brown
26f782bb41
[libc] Add abs()
Signed-off-by: Michael Brown <mcb30@ipxe.org >
11 years ago
Michael Brown
076f58c4bf
[base16] Generalise base16_decode() to hex_decode()
Provide a generic hex_decode() routine which can be shared between the
Base16 code and the "hex" and "hexhyp" settings parsers.
Signed-off-by: Michael Brown <mcb30@ipxe.org >
11 years ago
Michael Brown
1d33649516
[libc] Allow strtoul() to interpret negative numbers
Signed-off-by: Michael Brown <mcb30@ipxe.org >
12 years ago
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 years ago
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 years ago
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 years ago
Michael Brown
19a0452205
[libc] Add function declaration for main() in stdlib.h
16 years ago
Holger Lubitz
6f61e254dc
use malloc attribute
17 years ago
Michael Brown
058b200529
Renamed _calloc() to zalloc(), ready to be used as a standalone function.
17 years ago
Michael Brown
4256b3338a
Split random number generation out into core/random.c, and create the
correct prototypes for srandom(), rand() and srand().
18 years ago
Michael Brown
b02a564297
Add missing prerequisite include
18 years ago
Michael Brown
35776f481c
Don't always zero memory in malloc(). This saves around 2us on a
full-length PKB allocation.
18 years ago
Michael Brown
73e3e02367
Fix prototype of random() and move to stdlib.h
18 years ago
Michael Brown
f3d817d512
Added execv() and system().
18 years ago
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 years ago
Michael Brown
8df7e74990
Fix up prototype of strtoul() to match POSIX.
18 years ago
Michael Brown
70567c51a2
Moved strtoul prototype into stdlib.h for consistency
19 years ago