git: b53ec4e44f6f - main - stand: Add isspace to FreeBSD ctypes.h
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 01 May 2023 21:04:25 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=b53ec4e44f6f66f2235a96f7c0508a586b1275f1
commit b53ec4e44f6f66f2235a96f7c0508a586b1275f1
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-05-01 17:50:21 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-05-01 21:02:54 +0000
stand: Add isspace to FreeBSD ctypes.h
And eliminate blake3_impl_hack.c since it's no longer needed.
Sponsored by: Netflix
Reviewed by: delphij
Differential Revision: https://reviews.freebsd.org/D39899
---
stand/libsa/zfs/Makefile.inc | 6 +++---
stand/libsa/zfs/blake3_impl_hack.c | 18 ------------------
sys/contrib/openzfs/include/os/freebsd/spl/sys/ctype.h | 1 +
3 files changed, 4 insertions(+), 21 deletions(-)
diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc
index 6eded5659602..8bf430a8e4bf 100644
--- a/stand/libsa/zfs/Makefile.inc
+++ b/stand/libsa/zfs/Makefile.inc
@@ -11,7 +11,7 @@
.PATH: ${OZFS}/module/icp/algs/blake3
ZFS_SRC= zfs.c nvlist.c skein.c skein_block.c list.c
ZFS_SRC+= zfs_zstd.c
-ZFS_SRC+= blake3.c blake3_generic.c blake3_impl_hack.c
+ZFS_SRC+= blake3.c blake3_generic.c blake3_impl.c
ZSTD_SRC+= entropy_common.c error_private.c
ZSTD_SRC+= fse_decompress.c hist.c
ZSTD_SRC+= huf_decompress.c pool.c xxhash.c
@@ -49,7 +49,7 @@ CFLAGS.$i+= -include ${ZFSOSINC}/spl/sys/ccompile.h -Wformat -Wall -I${OZFS}/inc
CFLAGS_EARLY.blake3.c+= ${ZFS_EARLY} -DOMIT_SIMD
CFLAGS_EARLY.blake3_generic.c+= ${ZFS_EARLY} -DOMIT_SIMD
-CFLAGS_EARLY.blake3_impl_hack.c+= ${ZFS_EARLY} -DOMIT_SIMD
+CFLAGS_EARLY.blake3_impl.c+= ${ZFS_EARLY} -DOMIT_SIMD
CFLAGS_EARLY.list.c+= ${ZFS_EARLY}
CFLAGS_EARLY.zfs_zstd.c+= ${ZFS_EARLY}
CFLAGS_EARLY.nvlist.c+= ${ZFS_EARLY}
@@ -78,7 +78,7 @@ CFLAGS.$i+= -U__BMI__ ${NO_WBITWISE_INSTEAD_OF_LOGICAL}
CFLAGS.zfs_zstd.c+= -DIN_BASE -DIN_LIBSA
-CFLAGS.blake3_impl_hack.c+= -I${OZFS}/module/icp/algs/blake3 -I${OZFS}/module/icp/include
+CFLAGS.blake3_impl.c+= -I${OZFS}/module/icp/algs/blake3 -I${OZFS}/module/icp/include
# Do not unroll skein loops, reduce code size
CFLAGS.skein_block.c+= -DSKEIN_LOOP=111
diff --git a/stand/libsa/zfs/blake3_impl_hack.c b/stand/libsa/zfs/blake3_impl_hack.c
deleted file mode 100644
index 789807714e2c..000000000000
--- a/stand/libsa/zfs/blake3_impl_hack.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright 2022, Netflix, Inc
- *
- * SPDX-License-Identifier: BSD-2-Clause
- */
-
-/*
- * Hack for aarch64... Not sure why isspace isn't defined, but it sure doesn't
- * belong here.
- */
-#ifndef isspace
-static __inline int isspace(int c)
-{
- return c == ' ' || (c >= 0x9 && c <= 0xd);
-}
-#endif
-
-#include "blake3_impl.c"
diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/ctype.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/ctype.h
index 53afd8b8bd42..201fa95550e3 100644
--- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/ctype.h
+++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/ctype.h
@@ -39,5 +39,6 @@
((C) >= 0x3A && (C) <= 0x40) || \
((C) >= 0x5B && (C) <= 0x60) || \
((C) >= 0x7B && (C) <= 0x7E))
+#define isspace(C) ((C) == 0x20 || ((C) >= 0x9 && (C) <= 0xD))
#endif