git: kernel - make bcmp linux-compatible, add memcmp world - make bcmp linux-compatible
Matthew Dillon
dillon at crater.dragonflybsd.org
Wed Mar 27 23:50:51 PDT 2019
commit 83d15e579c5b3b6ab775b345f1d680697cca01ac
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Wed Mar 27 23:45:38 2019 -0700
kernel - make bcmp linux-compatible, add memcmp
world - make bcmp linux-compatible
* Make bcmp and memcmp the same. Our bcmp() was returning
0 or 1 (not subtracting the last byte), which is compatible
with the manual page but it isn't what linux does.
* It also looks like memcmp is sometimes turned into bcmp by
the compiler (?), at least when compiling the kernel, so
we don't want to break that either.
* Add memcmp to the kernel build, synchronize both memcmp and bcmp
from libc.
* This makes our bcmp compatible with linux.
Summary of changes:
lib/libc/x86_64/string/bcmp.S | 24 ++--------------------
lib/libc/x86_64/string/memcmp.S | 8 ++++++++
sys/platform/pc64/conf/files | 2 ++
.../Copyright => sys/platform/pc64/x86_64/bcmp.s | 6 +++++-
.../memcmp.S => sys/platform/pc64/x86_64/memcmp.s | 18 +++++++++++++---
sys/platform/pc64/x86_64/support.s | 21 -------------------
6 files changed, 32 insertions(+), 47 deletions(-)
copy contrib/tcsh-6/Copyright => sys/platform/pc64/x86_64/bcmp.s (89%)
copy lib/libc/x86_64/string/memcmp.S => sys/platform/pc64/x86_64/memcmp.s (84%)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/83d15e579c5b3b6ab775b345f1d680697cca01ac
--
DragonFly BSD source repository
More information about the Commits
mailing list