Michael Brown
91aa188fbb
[libc] Allow CPU architectures to use unoptimised string functions
Signed-off-by: Michael Brown <mcb30@ipxe.org >
il y a 8 ans
Michael Brown
b6ee89ffb5
[legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Relicense files for which I am the sole author (as identified by
util/relicense.pl).
Signed-off-by: Michael Brown <mcb30@ipxe.org >
il y a 9 ans
Michael Brown
8ee39f7432
[libc] Rewrite string functions
Some of the C library string functions have an unknown provenance.
Reimplement all such functions to avoid potential licensing
uncertainty.
Remove the inline-assembler versions of strlen(), memswap(), and
strncmp(); these save a minimal amount of space (around 40 bytes in
total) and are not performance-critical.
Signed-off-by: Michael Brown <mcb30@ipxe.org >
il y a 9 ans
Michael Brown
b54167b8b6
[libc] Remove unused string functions
Signed-off-by: Michael Brown <mcb30@ipxe.org >
il y a 9 ans
Michael Brown
61c6af3f0b
[libc] Convert memcpy() from a macro to an inline function
Signed-off-by: Michael Brown <mcb30@ipxe.org >
il y a 12 ans
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.
il y a 15 ans
Holger Lubitz
8bb295e3fd
use malloc attribute
il y a 17 ans
Holger Lubitz
7e1db201b9
strdup and strndup call malloc and are not pure
il y a 17 ans
Holger Lubitz
7e8e4f8abd
declare pointers passed to string functions as nonnull
il y a 17 ans
Holger Lubitz
8e3e97fcef
set __pure attribute where possible
il y a 17 ans
Michael Brown
7137c20ed1
Add strcspn() and strndup()
il y a 17 ans
Michael Brown
afe4e011ac
Move tolower() etc to ctype.h as per ISO C
il y a 18 ans
Michael Brown
1a0ca661c2
4.3BSD says that bcopy and bzero are defined in strings.h, not string.h
il y a 18 ans
Michael Brown
e5f0898f38
Move strerror() prototype to string.h, where it belongs
il y a 18 ans
Michael Brown
496563071d
Added strdup()
il y a 18 ans
Michael Brown
82342e0b8f
Marked memcmp/strcmp as "pure" functions, to allow gcc to optimise
away code such as
if ( strcmp ( some_string, "some_value" ) != 0 ) {
DBG ( "Bad value received!" );
}
il y a 18 ans
Michael Brown
1d7cfd5acf
Prototype now clashes with the macro in arch/i386.
il y a 18 ans
Michael Brown
a6057b4cbc
Need stddef.h to get size_t
il y a 19 ans
Michael Brown
3d6123e69a
Initial revision
il y a 19 ans