Michael Brown
79697c75ee
[libc] Add ffs(), ffsl(), and ffsll()
Signed-off-by: Michael Brown <mcb30@ipxe.org >
il y a 9 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
d36e814b8a
[libc] Add flsll()
Signed-off-by: Michael Brown <mcb30@ipxe.org >
il y a 10 ans
Michael Brown
dce7107fc0
[libc] Add inline assembly implementation of flsl() using BSR instruction
Signed-off-by: Michael Brown <mcb30@ipxe.org >
il y a 10 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
Michael Brown
db124b1255
Add fls() for non-constant values.
il y a 17 ans
Michael Brown
6d15a193aa
Add fls() for non-constant values.
il y a 17 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
eda79ec32b
The prototype for strcasecmp() is apparently in strings.h.
il y a 18 ans
Michael Brown
2f0d412210
Add __constant_flsl(), because it's useful for finding out the next
power-of-two up from a given constant via
( 1 << fls ( constant - 1 ) )
fls(), flsl(), ffs() and ffsl() appear in strings.h according to
POSIX.
il y a 18 ans