From 16a824222ba1ecdee4734659d76680bf4f61695a Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Thu, 24 Dec 2009 18:19:01 +0000 Subject: [PATCH] Remove HAVE_STRUCT_BUF test Ever since b1edf891d717ee8e08c0d93738a204cff09cf68f was committed, we've not needed to test to see if the OS provides struct buf - we can just declare it as a structure without providing a definition in all circumstances. Change-Id: I81ebad0dcda91229883f44b657e8113ec832668d Reviewed-on: http://gerrit.openafs.org/1032 Tested-by: Andrew Deason Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- acinclude.m4 | 43 +++++++------------------------------------ src/afs/afs.h | 2 -- 2 files changed, 7 insertions(+), 38 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 54019b1..1064410 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -74,7 +74,6 @@ AH_VERBATIM([OPENAFS_HEADER], #undef STRUCT_TASK_STRUCT_HAS_SIGHAND #undef STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK #undef ssize_t -#undef HAVE_STRUCT_BUF #undef HAVE_ARPA_NAMESER_COMPAT_H /* glue for RedHat kernel bug */ #undef ENABLE_REDHAT_BUILDSYS @@ -808,6 +807,13 @@ else AC_MSG_RESULT($AFS_SYSNAME) fi +case $AFS_SYSNAME in + *_darwin*) + DARWIN_PLIST=src/libafs/afs.${AFS_SYSNAME}.plist + DARWIN_INFOFILE=afs.${AFS_SYSNAME}.plist + ;; +esac + dnl Some hosts have a separate common param file they should include. Figure dnl out if we're on one of them now that we know the sysname. case $AFS_SYSNAME in @@ -1242,41 +1248,6 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*) fi esac -case $AFS_SYSNAME in - *_darwin*) - DARWIN_PLIST=src/libafs/afs.${AFS_SYSNAME}.plist - DARWIN_INFOFILE=afs.${AFS_SYSNAME}.plist - dnl the test below fails on darwin, even if the CPPFLAGS below - dnl are added. the headers from Kernel.framework must be used - dnl when KERNEL is defined. - - dnl really, such a thing isn't guaranteed to work on any - dnl platform until the kernel cflags from MakefileProto are - dnl known to configure - AC_DEFINE(HAVE_STRUCT_BUF, 1, [define if you have a struct buf]) - ;; - *) -AC_MSG_CHECKING(for definition of struct buf) -dnl save_CPPFLAGS="$CPPFLAGS" -dnl CPPFLAGS="$CPPFLAGS -DKERNEL -D_KERNEL -D__KERNEL -D__KERNEL__" -AC_CACHE_VAL(ac_cv_have_struct_buf, [ - ac_cv_have_struct_buf=no - AC_TRY_COMPILE( - [#include ], - [struct buf x; - printf("%d\n", sizeof(x));], - ac_cv_have_struct_buf=yes,) - ] -) -dnl CPPFLAGS="$save_CPPFLAGS" -AC_MSG_RESULT($ac_cv_have_struct_buf) -if test "$ac_cv_have_struct_buf" = yes; then - AC_DEFINE(HAVE_STRUCT_BUF, 1, [define if you have a struct buf]) -fi -;; -esac - - AC_CACHE_VAL(ac_cv_sockaddr_len, [ AC_MSG_CHECKING([if struct sockaddr has sa_len field]) diff --git a/src/afs/afs.h b/src/afs/afs.h index 7bd2e4e..0c8bd58 100644 --- a/src/afs/afs.h +++ b/src/afs/afs.h @@ -1347,13 +1347,11 @@ extern struct brequest afs_brs[NBRS]; /* request structures */ #endif #endif -#if !defined(UKERNEL) && !defined(HAVE_STRUCT_BUF) /* declare something so that prototypes don't flip out */ /* appears struct buf stuff is only actually passed around as a pointer, except with libuafs, in which case it is actually defined */ struct buf; -#endif struct rxfs_storeVariables { struct rx_call *call; -- 1.9.4