Michael Brown
79697c75ee
[libc] Add ffs(), ffsl(), and ffsll()
Signed-off-by: Michael Brown <mcb30@ipxe.org >
9 år sedan
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 >
9 år sedan
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 >
9 år sedan
Michael Brown
d36e814b8a
[libc] Add flsll()
Signed-off-by: Michael Brown <mcb30@ipxe.org >
10 år sedan
Michael Brown
dce7107fc0
[libc] Add inline assembly implementation of flsl() using BSR instruction
Signed-off-by: Michael Brown <mcb30@ipxe.org >
10 år sedan
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 år sedan
Michael Brown
db124b1255
Add fls() for non-constant values.
17 år sedan
Michael Brown
6d15a193aa
Add fls() for non-constant values.
17 år sedan
Michael Brown
1a0ca661c2
4.3BSD says that bcopy and bzero are defined in strings.h, not string.h
18 år sedan
Michael Brown
eda79ec32b
The prototype for strcasecmp() is apparently in strings.h.
18 år sedan
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.
18 år sedan