summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-06-11 14:48:18 -0700
committerBrian Behlendorf <[email protected]>2010-06-11 15:57:25 -0700
commitb868e22f05fd85be16afee800207f72b8e310d32 (patch)
treeda050e86b8d79b4de1eac65640aa1506b06d51ea /config
parentbb1bb2c4c49659b47d65beb8ac24dc2c86989553 (diff)
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.
Diffstat (limited to 'config')
-rw-r--r--config/spl-build.m414
1 files changed, 14 insertions, 0 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4
index a0fdb3e82..6f312e25a 100644
--- a/config/spl-build.m4
+++ b/config/spl-build.m4
@@ -75,6 +75,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
SPL_AC_GROUPS_SEARCH
SPL_AC_PUT_TASK_STRUCT
SPL_AC_5ARGS_PROC_HANDLER
+ SPL_AC_KVASPRINTF
])
AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
@@ -1399,3 +1400,16 @@ AC_DEFUN([SPL_AC_5ARGS_PROC_HANDLER], [
AC_MSG_RESULT(no)
])
])
+
+dnl #
+dnl # 2.6.x API change,
+dnl # kvasprintf() function added.
+dnl #
+AC_DEFUN([SPL_AC_KVASPRINTF], [
+ SPL_CHECK_SYMBOL_EXPORT(
+ [kvasprintf],
+ [],
+ [AC_DEFINE(HAVE_KVASPRINTF, 1,
+ [kvasprintf() is available])],
+ [])
+])