source:
branches/fc15-dev/server/common/patches/openafs-0001-Linux-Add-autoconf-macro-for-structure-checks.patch
@
1898
Last change on this file since 1898 was 1835, checked in by achernya, 13 years ago | |
---|---|
File size: 2.0 KB |
-
src/cf/linux-test1.m4
From 71ec6d24f675082d09926f87db2bfad639d6df74 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson <sxw@inf.ed.ac.uk> Date: Tue, 27 Apr 2010 13:02:20 +0100 Subject: [PATCH 1/8] Linux: Add autoconf macro for structure checks Add a new autoconf macro for doing structure element checks. Reviewed-on: http://gerrit.openafs.org/1853 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org> (cherry picked from commit 02f2c7cb3734d44dc90b77d631909373daefacd3) Change-Id: Id7768128e058805baf8d44f2610f3345b25ac973 [andersk@mit.edu: Remove modifications of existing structure checks] Signed-off-by: Anders Kaseorg <andersk@mit.edu> Reviewed-on: http://gerrit.openafs.org/3992 Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com> Reviewed-by: Russ Allbery <rra@stanford.edu> Reviewed-on: http://gerrit.openafs.org/4037 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org> --- src/cf/linux-test1.m4 | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/src/cf/linux-test1.m4 b/src/cf/linux-test1.m4 index 0b40eb7..2da3bb8 100644
a b AC_DEFUN([LINUX_KBUILD_USES_EXTRA_CFLAGS], [ 84 84 ac_linux_kbuild_requires_extra_cflags=yes) 85 85 CPPFLAGS="$save_CPPFLAGS" 86 86 AC_MSG_RESULT($ac_linux_kbuild_requires_extra_cflags)]) 87 88 dnl AC_CHECK_LINUX_STRUCT([structure], [element], [includes]) 89 AC_DEFUN([AC_CHECK_LINUX_STRUCT], 90 [AS_VAR_PUSHDEF([ac_linux_struct], [ac_cv_linux_struct_$1_has_$2])dnl 91 AC_CACHE_CHECK([for $2 in struct $1], [ac_linux_struct], 92 [AC_TRY_KBUILD([#include <linux/$3>], 93 [struct $1 _test; printk("%x\n", &_test.$2); ], 94 AS_VAR_SET([ac_linux_struct], [yes]), 95 AS_VAR_SET([ac_linux_struct], [no])) 96 ]) 97 AS_IF([test AS_VAR_GET([ac_linux_struct]) = yes], 98 [AC_DEFINE(AS_TR_CPP(STRUCT_$1_HAS_$2), 1, 99 [Define if kernel struct $1 has the $2 element])]) 100 ])
Note: See TracBrowser
for help on using the repository browser.