File: kernel-zlib.m4

package info (click to toggle)
zfs-linux 2.1.11-1%2Bdeb12u1
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm
  • size: 77,344 kB
  • sloc: ansic: 376,447; sh: 59,625; python: 7,872; asm: 6,476; makefile: 5,812; perl: 770; sed: 41; awk: 5
file content (26 lines) | stat: -rw-r--r-- 931 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
dnl #
dnl # 2.6.39 API compat,
dnl
dnl # The function zlib_deflate_workspacesize() now take 2 arguments.
dnl # This was done to avoid always having to allocate the maximum size
dnl # workspace (268K).  The caller can now specific the windowBits and
dnl # memLevel compression parameters to get a smaller workspace.
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE], [
	ZFS_LINUX_TEST_SRC([2args_zlib_deflate_workspacesize], [
		#include <linux/zlib.h>
	],[
		return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL);
	])
])

AC_DEFUN([ZFS_AC_KERNEL_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE], [
	AC_MSG_CHECKING([whether zlib_deflate_workspacesize() wants 2 args])
	ZFS_LINUX_TEST_RESULT([2args_zlib_deflate_workspacesize], [
		AC_MSG_RESULT(yes)
		AC_DEFINE(HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE, 1,
		    [zlib_deflate_workspacesize() wants 2 args])
	],[
		ZFS_LINUX_TEST_ERROR([zlib_deflate_workspacesize()])
	])
])