mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Add kmem_asprintf(), strfree(), strdup(), and minor cleanup.
This patch adds three missing Solaris functions: kmem_asprintf(), strfree(), and strdup(). They are all implemented as a thin layer which just calls their Linux counterparts. As part of this an autoconf check for kvasprintf was added because it does not appear in older kernels. If the kernel does not provide it then spl-generic implements it. Additionally the dead DEBUG_KMEM_UNIMPLEMENTED code was removed to clean things up and make the kmem.h a little more readable.
This commit is contained in:
@@ -14826,6 +14826,47 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking whether symbol kvasprintf is exported" >&5
|
||||
$as_echo_n "checking whether symbol kvasprintf is exported... " >&6; }
|
||||
grep -q -E '[[:space:]]kvasprintf[[:space:]]' \
|
||||
$LINUX_OBJ/Module*.symvers 2>/dev/null
|
||||
rc=$?
|
||||
if test $rc -ne 0; then
|
||||
export=0
|
||||
for file in ; do
|
||||
grep -q -E "EXPORT_SYMBOL.*(kvasprintf)" \
|
||||
"$LINUX_OBJ/$file" 2>/dev/null
|
||||
rc=$?
|
||||
if test $rc -eq 0; then
|
||||
export=1
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if test $export -eq 0; then
|
||||
{ $as_echo "$as_me:$LINENO: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_KVASPRINTF 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_KVASPRINTF 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
;;
|
||||
user) ;;
|
||||
all)
|
||||
@@ -18180,6 +18221,47 @@ fi
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking whether symbol kvasprintf is exported" >&5
|
||||
$as_echo_n "checking whether symbol kvasprintf is exported... " >&6; }
|
||||
grep -q -E '[[:space:]]kvasprintf[[:space:]]' \
|
||||
$LINUX_OBJ/Module*.symvers 2>/dev/null
|
||||
rc=$?
|
||||
if test $rc -ne 0; then
|
||||
export=0
|
||||
for file in ; do
|
||||
grep -q -E "EXPORT_SYMBOL.*(kvasprintf)" \
|
||||
"$LINUX_OBJ/$file" 2>/dev/null
|
||||
rc=$?
|
||||
if test $rc -eq 0; then
|
||||
export=1
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if test $export -eq 0; then
|
||||
{ $as_echo "$as_me:$LINENO: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_KVASPRINTF 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define HAVE_KVASPRINTF 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
||||
;;
|
||||
srpm) ;;
|
||||
*)
|
||||
|
||||
Reference in New Issue
Block a user