From: Chaskiel M Grundman Date: Thu, 22 Aug 2002 01:15:09 +0000 (+0000) Subject: darwin-head-build-fixes-20020821 X-Git-Tag: BP-openafs-rxkad-krb5~7 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ab09e39174ba271534398960a7ef494e3af52acb;p=packages%2Fo%2Fopenafs.git darwin-head-build-fixes-20020821 make the head build on darwin --- diff --git a/acinclude.m4 b/acinclude.m4 index a5f77988d..2b5543687 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -383,10 +383,19 @@ 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) ;; -esac - + *) 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( @@ -396,10 +405,13 @@ AC_CACHE_VAL(ac_cv_have_struct_buf, [ 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) fi +;; +esac AC_CACHE_VAL(ac_cv_sockaddr_len, diff --git a/src/afs/DARWIN/osi_vnodeops.c b/src/afs/DARWIN/osi_vnodeops.c index c44ddb98f..47334d2d5 100644 --- a/src/afs/DARWIN/osi_vnodeops.c +++ b/src/afs/DARWIN/osi_vnodeops.c @@ -283,7 +283,7 @@ afs_vop_open(ap) panic("AFS open changed vnode!"); #endif afs_BozonLock(&vc->pvnLock, vc); - osi_FlushPages(vc); + osi_FlushPages(vc, ap->a_cred); afs_BozonUnlock(&vc->pvnLock, vc); AFS_GUNLOCK(); return error; @@ -306,7 +306,7 @@ afs_vop_close(ap) else code=afs_close(avc, ap->a_fflag, &afs_osi_cred, ap->a_p); afs_BozonLock(&avc->pvnLock, avc); - osi_FlushPages(avc); /* hold bozon lock, but not basic vnode lock */ + osi_FlushPages(avc, ap->a_cred); /* hold bozon lock, but not basic vnode lock */ afs_BozonUnlock(&avc->pvnLock, avc); AFS_GUNLOCK(); #ifdef AFS_DARWIN14_ENV @@ -381,7 +381,7 @@ afs_vop_read(ap) struct vcache *avc=VTOAFS(ap->a_vp); AFS_GLOCK(); afs_BozonLock(&avc->pvnLock, avc); - osi_FlushPages(avc); /* hold bozon lock, but not basic vnode lock */ + osi_FlushPages(avc, ap->a_cred); /* hold bozon lock, but not basic vnode lock */ code=afs_read(avc, ap->a_uio, ap->a_cred, 0, 0, 0); afs_BozonUnlock(&avc->pvnLock, avc); AFS_GUNLOCK(); @@ -458,7 +458,7 @@ afs_vop_pagein(ap) aiov.iov_base = (caddr_t)ioaddr; AFS_GLOCK(); afs_BozonLock(&tvc->pvnLock, tvc); - osi_FlushPages(tvc); /* hold bozon lock, but not basic vnode lock */ + osi_FlushPages(tvc, ap->a_cred); /* hold bozon lock, but not basic vnode lock */ code=afs_read(tvc, uio, cred, 0, 0, 0); if (code == 0) { ObtainWriteLock(&tvc->lock, 2); @@ -494,7 +494,7 @@ afs_vop_write(ap) void *object; AFS_GLOCK(); afs_BozonLock(&avc->pvnLock, avc); - osi_FlushPages(avc); /* hold bozon lock, but not basic vnode lock */ + osi_FlushPages(avc, ap->a_cred); /* hold bozon lock, but not basic vnode lock */ if (UBCINFOEXISTS(ap->a_vp)) ubc_clean(ap->a_vp, 1); if (UBCINFOEXISTS(ap->a_vp)) @@ -622,7 +622,7 @@ afs_vop_pageout(ap) AFS_GLOCK(); afs_BozonLock(&tvc->pvnLock, tvc); - osi_FlushPages(tvc); /* hold bozon lock, but not basic vnode lock */ + osi_FlushPages(tvc, ap->a_cred); /* hold bozon lock, but not basic vnode lock */ ObtainWriteLock(&tvc->lock, 1); afs_FakeOpen(tvc); ReleaseWriteLock(&tvc->lock); diff --git a/src/afs/UKERNEL/sysincludes.h b/src/afs/UKERNEL/sysincludes.h index df9bfbc5e..e0057fda6 100644 --- a/src/afs/UKERNEL/sysincludes.h +++ b/src/afs/UKERNEL/sysincludes.h @@ -1333,7 +1333,7 @@ struct min_direct { struct usr_ucred { unsigned long cr_ref; long cr_uid; -#if !defined(AFS_USR_FBSD_ENV) +#if !defined(AFS_USR_FBSD_ENV) && !defined(AFS_USR_DARWIN60_ENV) long cr_gid; #endif long cr_ruid; diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h index 5eab8c8f9..267f45ed2 100644 --- a/src/afs/afs_prototypes.h +++ b/src/afs/afs_prototypes.h @@ -484,7 +484,7 @@ extern void osi_VM_FlushPages(struct vcache *avc, struct AFS_UCRED *credp); extern void osi_VM_Truncate(struct vcache *avc, int alen, struct AFS_UCRED *acred); extern void osi_VM_TryReclaim(struct vcache *avc, int *slept); extern void osi_VM_NukePages(struct vnode *vp, off_t offset, off_t size); -extern int osi_VM_Setup(struct vcache *avc); +extern int osi_VM_Setup(struct vcache *avc, int force); #ifdef AFS_SUN5_ENV extern int osi_VM_GetDownD(struct vcache *avc, struct dcache *adc); diff --git a/src/afs/sysincludes.h b/src/afs/sysincludes.h index 5e2743218..92e6626bb 100644 --- a/src/afs/sysincludes.h +++ b/src/afs/sysincludes.h @@ -75,9 +75,11 @@ struct xfs_inode_info {}; #else /* AFS_LINUX22_ENV */ #if defined(AFS_DARWIN_ENV) +#ifndef _MACH_ETAP_H_ #define _MACH_ETAP_H_ typedef unsigned short etap_event_t; #endif +#endif #if !defined(AFS_OSF_ENV) #include "../h/errno.h" #include "../h/types.h" diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index 9aa9d08f1..0de667460 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -227,6 +227,14 @@ case $AFS_SYSNAME in XCFLAGS="-no-cpp-precomp" ;; + ppc_darwin_60) + LEX="lex -l" + LWP_OPTMZ="-O2" + REGEX_OBJ="regex.o" + XCFLAGS="-no-cpp-precomp" + TXLIBS="-lncurses" + ;; + ppc_linux22) INSTALL="install" LEX="flex -l" diff --git a/src/libuafs/MakefileProto.DARWIN.in b/src/libuafs/MakefileProto.DARWIN.in index 075695ce6..bca384630 100644 --- a/src/libuafs/MakefileProto.DARWIN.in +++ b/src/libuafs/MakefileProto.DARWIN.in @@ -88,6 +88,10 @@ $(LIBUAFS): $(UAFSOBJ) -$(RM) -f $(LIBUAFS) $(AR) $(ARFLAGS) $(LIBUAFS) $(UAFSOBJ) +$(LIBJUAFS): $(JUAFSOBJ) + -$(RM) -f $(LIBJUAFS) + $(AR) $(ARFLAGS) $(LIBJUAFS) $(JUAFSOBJ) + $(LIBAFSWEB): $(AFSWEBOBJ) ${DES}/libdes.a -$(RM) -f $(LIBAFSWEB) ld -b $(LIBAFSWEB) $(AFSWEBOBJ) ${DES}/libdes.a $(WEBLIBS) diff --git a/src/rx/rx_kcommon.c b/src/rx/rx_kcommon.c index b19dac754..18e8ee32a 100644 --- a/src/rx/rx_kcommon.c +++ b/src/rx/rx_kcommon.c @@ -24,7 +24,11 @@ RCSID("$Header$"); #endif #include "../afsint/afsint.h" +#ifdef AFS_DARWIN60_ENV +struct ifnet *rxi_FindIfnet(afs_uint32 addr, struct ifaddr **pifad); +#else struct ifnet *rxi_FindIfnet(afs_uint32 addr, struct in_ifaddr **pifad); +#endif #ifndef RXK_LISTENER_ENV int (*rxk_PacketArrivalProc)(register struct rx_packet *ahandle,