Index: openafs/src/afs/Makefile.in diff -c openafs/src/afs/Makefile.in:1.4.2.7 openafs/src/afs/Makefile.in:1.4.2.8 *** openafs/src/afs/Makefile.in:1.4.2.7 Mon Jul 7 16:16:24 2003 --- openafs/src/afs/Makefile.in Fri Oct 24 01:24:37 2003 *************** *** 4,9 **** --- 4,11 ---- # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html + # + # Portions Copyright (c) 2003 Apple Computer, Inc. DEST=@DEST@ TOP_INCDIR=@TOP_INCDIR@ *************** *** 30,36 **** include ../config/Makefile.${SYS_NAME} ! all: kinstall ukinstall ${TOP_INCDIR}/afs/afs.h ${TOP_INCDIR}/afs/osi_inode.h ${TOP_INCDIR}/afs/afs_stats.h ${TOP_INCDIR}/afs/exporter.h ${TOP_INCDIR}/afs/nfsclient.h case ${SYS_NAME} in \ pmax_ul43 | pmax_ul43a) \ ${INSTALL} longc_procs.h ${TOP_INCDIR}/afs ;; \ --- 32,38 ---- include ../config/Makefile.${SYS_NAME} ! all: kinstall ukinstall ${TOP_INCDIR}/afs/afs.h ${TOP_INCDIR}/afs/osi_inode.h ${TOP_INCDIR}/afs/afs_stats.h ${TOP_INCDIR}/afs/exporter.h ${TOP_INCDIR}/afs/nfsclient.h ${TOP_INCDIR}/afs/sysctl.h case ${SYS_NAME} in \ pmax_ul43 | pmax_ul43a) \ ${INSTALL} longc_procs.h ${TOP_INCDIR}/afs ;; \ *************** *** 56,62 **** /usr/etc/gencat afszcm.cat afs_trace.msf ;; \ *_linux* | *_umlinux* ) \ gencat --new afszcm.cat afs_trace.msf ;; \ ! ppc_darwin* | i386_fbsd*) \ echo No gencat for ${SYS_NAME} ;; \ * ) \ gencat afszcm.cat afs_trace.msf ;; \ --- 58,64 ---- /usr/etc/gencat afszcm.cat afs_trace.msf ;; \ *_linux* | *_umlinux* ) \ gencat --new afszcm.cat afs_trace.msf ;; \ ! *_darwin_* | i386_fbsd*) \ echo No gencat for ${SYS_NAME} ;; \ * ) \ gencat afszcm.cat afs_trace.msf ;; \ *************** *** 74,80 **** ${UKERNELDIR}/afs: mkdir -p $@ ! install: ${DESTDIR}${includedir}/afs/afs.h ${DESTDIR}${includedir}/afs/osi_inode.h ${DESTDIR}${includedir}/afs/afs_stats.h ${DESTDIR}${includedir}/afs/exporter.h ${DESTDIR}${includedir}/afs/nfsclient.h case ${SYS_NAME} in \ pmax_ul43 | pmax_ul43a) \ ${INSTALL} longc_procs.h ${DESTDIR}${includedir}/afs ;; \ --- 76,82 ---- ${UKERNELDIR}/afs: mkdir -p $@ ! install: ${DESTDIR}${includedir}/afs/afs.h ${DESTDIR}${includedir}/afs/osi_inode.h ${DESTDIR}${includedir}/afs/afs_stats.h ${DESTDIR}${includedir}/afs/exporter.h ${DESTDIR}${includedir}/afs/nfsclient.h ${DESTDIR}${includedir}/afs/sysctl.h case ${SYS_NAME} in \ pmax_ul43 | pmax_ul43a) \ ${INSTALL} longc_procs.h ${DESTDIR}${includedir}/afs ;; \ *************** *** 117,127 **** ${DESTDIR}${includedir}/afs/afs_stats.h: afs_stats.h ${INSTALL} $? $@ - ${TOP_INCDIR}/afs/afs_stats.h: afs_stats.h ${INSTALL} $? $@ ${DEST}/include/afs/exporter.h: exporter.h ${INSTALL} $? $@ --- 119,138 ---- ${DESTDIR}${includedir}/afs/afs_stats.h: afs_stats.h ${INSTALL} $? $@ ${TOP_INCDIR}/afs/afs_stats.h: afs_stats.h ${INSTALL} $? $@ + ${DEST}/include/afs/sysctl.h: sysctl.h + ${INSTALL} $? $@ + + ${DESTDIR}${includedir}/afs/sysctl.h: sysctl.h + ${INSTALL} $? $@ + + ${TOP_INCDIR}/afs/sysctl.h: sysctl.h + ${INSTALL} $? $@ + + ${DEST}/include/afs/exporter.h: exporter.h ${INSTALL} $? $@ *************** *** 144,156 **** ${INSTALL} $? $@ ! dest: ${DEST}/include/afs/afs.h ${DEST}/include/afs/osi_inode.h ${DEST}/include/afs/afs_stats.h ${DEST}/include/afs/exporter.h ${DEST}/include/afs/nfsclient.h case ${SYS_NAME} in \ pmax_ul43 | pmax_ul43a) \ ${INSTALL} longc_procs.h ${DEST}/include/afs ;; \ esac case ${SYS_NAME} in \ ! next_mach30 | vax_ul43 | ppc_darwin* | i386_fbsd* ) \ echo skipping afszcm.cat install for ${SYS_NAME} ;; \ * ) \ ${INSTALL} afszcm.cat ${DEST}/root.client/usr/vice/etc/C ;; \ --- 155,167 ---- ${INSTALL} $? $@ ! dest: ${DEST}/include/afs/afs.h ${DEST}/include/afs/osi_inode.h ${DEST}/include/afs/afs_stats.h ${DEST}/include/afs/exporter.h ${DEST}/include/afs/nfsclient.h ${DEST}/include/afs/sysctl.h case ${SYS_NAME} in \ pmax_ul43 | pmax_ul43a) \ ${INSTALL} longc_procs.h ${DEST}/include/afs ;; \ esac case ${SYS_NAME} in \ ! next_mach30 | vax_ul43 | *_darwin_* | i386_fbsd* ) \ echo skipping afszcm.cat install for ${SYS_NAME} ;; \ * ) \ ${INSTALL} afszcm.cat ${DEST}/root.client/usr/vice/etc/C ;; \ Index: openafs/src/afs/sysctl.h diff -c /dev/null openafs/src/afs/sysctl.h:1.1.2.1 *** /dev/null Fri Oct 24 02:39:26 2003 --- openafs/src/afs/sysctl.h Fri Oct 24 02:24:00 2003 *************** *** 0 **** --- 1,60 ---- + /* + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + #ifndef AFS_SYSCTL_H + #define AFS_SYSCTL_H + + /* top level AFS names */ + #define AFS_SC_ALL 0 + #define AFS_SC_DARWIN 1 + + /* AFS_SC_ALL: platform-independent sysctls */ + /* nothing defined */ + + /* AFS_SC_DARWIN: darwin-specific sysctls */ + #define AFS_SC_DARWIN_ALL 0 + #define AFS_SC_DARWIN_12 1 + #define AFS_SC_DARWIN_13 2 + #define AFS_SC_DARWIN_14 3 + #define AFS_SC_DARWIN_60 4 + #define AFS_SC_DARWIN_70 5 + + /* AFS_SC_DARWIN_ALL: darwin version-independent sysctls */ + #define AFS_SC_DARWIN_ALL_REALMODES 1 + + /* AFS_SC_DARWIN_12: darwin 1.2 sysctls */ + /* nothing defined */ + + /* AFS_SC_DARWIN_13: darwin 1.3 sysctls */ + /* nothing defined */ + + /* AFS_SC_DARWIN_14: darwin 1.4 sysctls */ + /* nothing defined */ + + /* AFS_SC_DARWIN_60: darwin 6.x sysctls */ + /* nothing defined */ + + /* AFS_SC_DARWIN_70: darwin 7.x sysctls */ + /* nothing defined */ + + #endif /* AFS_SYSCTL_H */ Index: openafs/src/afs/DARWIN/osi_vfsops.c diff -c openafs/src/afs/DARWIN/osi_vfsops.c:1.4.2.2 openafs/src/afs/DARWIN/osi_vfsops.c:1.4.2.3 *** openafs/src/afs/DARWIN/osi_vfsops.c:1.4.2.2 Thu May 15 11:09:35 2003 --- openafs/src/afs/DARWIN/osi_vfsops.c Fri Oct 24 01:24:39 2003 *************** *** 1,7 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/afs/DARWIN/osi_vfsops.c,v 1.4.2.2 2003/05/15 15:09:35 shadow Exp $"); #include /* Standard vendor system headers */ #include /* Afs-based standard headers */ --- 1,10 ---- + /* + * Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + */ #include #include ! RCSID("$Header: /data/cvs/openafs/src/afs/DARWIN/osi_vfsops.c,v 1.4.2.3 2003/10/24 05:24:39 shadow Exp $"); #include /* Standard vendor system headers */ #include /* Afs-based standard headers */ *************** *** 10,15 **** --- 13,20 ---- #include #include #include + #include + #include "../afs/sysctl.h" struct vcache *afs_globalVp = 0; struct mount *afs_globalVFS = 0; *************** *** 275,282 **** return 0; } ! int afs_sysctl() { ! return EOPNOTSUPP; } --- 280,318 ---- return 0; } ! u_int32_t afs_darwin_realmodes = 0; ! ! int afs_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) ! int *name; ! u_int namelen; ! void *oldp; ! size_t *oldlenp; ! void *newp; ! size_t newlen; ! struct proc *p; ! { ! int error; ! ! switch (name[0]) { ! case AFS_SC_ALL: ! /* nothing defined */ ! break; ! case AFS_SC_DARWIN: ! if (namelen < 3) ! return ENOENT; ! switch (name[1]) { ! case AFS_SC_DARWIN_ALL: ! switch (name[2]) { ! case AFS_SC_DARWIN_ALL_REALMODES: ! return sysctl_int(oldp, oldlenp, newp, newlen, ! &afs_darwin_realmodes); ! } ! break; ! /* darwin version specific sysctl's goes here */ ! } ! break; ! } ! return EOPNOTSUPP; } Index: openafs/src/afs/DARWIN/osi_vnodeops.c diff -c openafs/src/afs/DARWIN/osi_vnodeops.c:1.4.2.7 openafs/src/afs/DARWIN/osi_vnodeops.c:1.4.2.8 *** openafs/src/afs/DARWIN/osi_vnodeops.c:1.4.2.7 Thu May 15 11:09:35 2003 --- openafs/src/afs/DARWIN/osi_vnodeops.c Fri Oct 24 01:24:39 2003 *************** *** 1,7 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.4.2.7 2003/05/15 15:09:35 shadow Exp $"); #include /* Standard vendor system headers */ #include /* Afs-based standard headers */ --- 1,10 ---- + /* + * Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + */ #include #include ! RCSID("$Header: /data/cvs/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.4.2.8 2003/10/24 05:24:39 shadow Exp $"); #include /* Standard vendor system headers */ #include /* Afs-based standard headers */ *************** *** 9,14 **** --- 12,20 ---- #include #include #include + #if defined(AFS_DARWIN70_ENV) + #include + #endif /* defined(AFS_DARWIN70_ENV) */ int afs_vop_lookup(struct vop_lookup_args *); int afs_vop_create(struct vop_create_args *); *************** *** 35,41 **** --- 41,49 ---- int afs_vop_symlink(struct vop_symlink_args *); int afs_vop_readdir(struct vop_readdir_args *); int afs_vop_readlink(struct vop_readlink_args *); + #if !defined(AFS_DARWIN70_ENV) extern int ufs_abortop(struct vop_abortop_args *); + #endif /* !defined(AFS_DARWIN70_ENV) */ int afs_vop_inactive(struct vop_inactive_args *); int afs_vop_reclaim(struct vop_reclaim_args *); int afs_vop_lock(struct vop_lock_args *); *************** *** 89,97 **** --- 97,109 ---- { &vop_symlink_desc, afs_vop_symlink }, /* symlink */ { &vop_readdir_desc, afs_vop_readdir }, /* readdir */ { &vop_readlink_desc, afs_vop_readlink }, /* readlink */ + #if defined(AFS_DARWIN70_ENV) + { &vop_abortop_desc, nop_abortop }, /* abortop */ + #else /* ! defined(AFS_DARWIN70_ENV) */ /* Yes, we use the ufs_abortop call. It just releases the namei buffer stuff */ { &vop_abortop_desc, ufs_abortop }, /* abortop */ + #endif /* defined(AFS_DARWIN70_ENV) */ { &vop_inactive_desc, afs_vop_inactive }, /* inactive */ { &vop_reclaim_desc, afs_vop_reclaim }, /* reclaim */ { &vop_lock_desc, afs_vop_lock }, /* lock */ *************** *** 277,293 **** } */ *ap; { int error; ! struct vcache *vc = VTOAFS(ap->a_vp); AFS_GLOCK(); error = afs_open(&vc, ap->a_mode, ap->a_cred); #ifdef DIAGNOSTIC ! if (AFSTOV(vc) != ap->a_vp) panic("AFS open changed vnode!"); #endif afs_BozonLock(&vc->pvnLock, vc); osi_FlushPages(vc, ap->a_cred); afs_BozonUnlock(&vc->pvnLock, vc); AFS_GUNLOCK(); return error; } --- 289,325 ---- } */ *ap; { int error; ! struct vnode *vp = ap->a_vp; ! struct vcache *vc = VTOAFS(vp); ! #ifdef AFS_DARWIN14_ENV ! int didhold = 0; ! /*---------------------------------------------------------------- ! * osi_VM_TryReclaim() removes the ubcinfo of a vnode, but that vnode ! * can later be passed to vn_open(), which will skip the call to ! * ubc_hold(), and when the ubcinfo is later added, the ui_refcount ! * will be off. So we compensate by calling ubc_hold() ourselves ! * when ui_refcount is less than 2. If an error occurs in afs_open() ! * we must call ubc_rele(), which is what vn_open() would do if it ! * was able to call ubc_hold() in the first place. ! *----------------------------------------------------------------*/ ! if (vp->v_type == VREG && !(vp->v_flag & VSYSTEM) ! && vp->v_ubcinfo->ui_refcount < 2) ! didhold = ubc_hold(vp); ! #endif /* AFS_DARWIN14_ENV */ AFS_GLOCK(); error = afs_open(&vc, ap->a_mode, ap->a_cred); #ifdef DIAGNOSTIC ! if (AFSTOV(vc) != vp) panic("AFS open changed vnode!"); #endif afs_BozonLock(&vc->pvnLock, vc); osi_FlushPages(vc, ap->a_cred); afs_BozonUnlock(&vc->pvnLock, vc); AFS_GUNLOCK(); + #ifdef AFS_DARWIN14_ENV + if (error && didhold) + ubc_rele(vp); + #endif /* AFS_DARWIN14_ENV */ return error; } *************** *** 1281,1286 **** --- 1313,1329 ---- case _PC_PIPE_BUF: return EINVAL; break; + #if defined(AFS_DARWIN70_ENV) + case _PC_NAME_CHARS_MAX: + *ap->a_retval = NAME_MAX; + break; + case _PC_CASE_SENSITIVE: + *ap->a_retval = 1; + break; + case _PC_CASE_PRESERVING: + *ap->a_retval = 1; + break; + #endif /* defined(AFS_DARWIN70_ENV) */ default: return EINVAL; } Index: openafs/src/afs/VNOPS/afs_vnop_attrs.c diff -c openafs/src/afs/VNOPS/afs_vnop_attrs.c:1.8.4.7 openafs/src/afs/VNOPS/afs_vnop_attrs.c:1.8.4.8 *** openafs/src/afs/VNOPS/afs_vnop_attrs.c:1.8.4.7 Fri May 23 02:52:19 2003 --- openafs/src/afs/VNOPS/afs_vnop_attrs.c Fri Oct 24 01:24:40 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 21,27 **** #include #include "../afs/param.h" ! RCSID("$Header: /data/cvs/openafs/src/afs/VNOPS/afs_vnop_attrs.c,v 1.8.4.7 2003/05/23 06:52:19 shadow Exp $"); #include "../afs/sysincludes.h" /* Standard vendor system headers */ #include "../afs/afsincludes.h" /* Afs-based standard headers */ --- 23,29 ---- #include #include "../afs/param.h" ! RCSID("$Header: /data/cvs/openafs/src/afs/VNOPS/afs_vnop_attrs.c,v 1.8.4.8 2003/10/24 05:24:40 shadow Exp $"); #include "../afs/sysincludes.h" /* Standard vendor system headers */ #include "../afs/afsincludes.h" /* Afs-based standard headers */ *************** *** 68,87 **** attrs->va_mode &= ~(VSUID|VSGID); } #if defined(AFS_DARWIN_ENV) ! /* Mac OS X uses the mode bits to determine whether a file or directory ! * is accessible, and believes them, even though under AFS they're almost ! * assuredly wrong, especially if the local uid does not match the AFS ! * ID. So we set the mode bits conservatively. ! */ ! if (S_ISDIR(attrs->va_mode)) { ! /* all access bits need to be set for directories, since even ! * a mode 0 directory can still be used normally. ! */ ! attrs->va_mode |= ACCESSPERMS; ! } else { ! /* for other files, replicate the user bits to group and other */ ! mode_t ubits = (attrs->va_mode & S_IRWXU) >> 6; ! attrs->va_mode |= ubits | (ubits << 3); } #endif /* AFS_DARWIN_ENV */ attrs->va_uid = fakedir ? 0 : avc->m.Owner; --- 70,95 ---- attrs->va_mode &= ~(VSUID|VSGID); } #if defined(AFS_DARWIN_ENV) ! { ! extern u_int32_t afs_darwin_realmodes; ! if (!afs_darwin_realmodes) { ! /* Mac OS X uses the mode bits to determine whether a file or ! * directory is accessible, and believes them, even though under ! * AFS they're almost assuredly wrong, especially if the local uid ! * does not match the AFS ID. So we set the mode bits ! * conservatively. ! */ ! if (S_ISDIR(attrs->va_mode)) { ! /* all access bits need to be set for directories, since even ! * a mode 0 directory can still be used normally. ! */ ! attrs->va_mode |= ACCESSPERMS; ! } else { ! /* for other files, replicate the user bits to group and other */ ! mode_t ubits = (attrs->va_mode & S_IRWXU) >> 6; ! attrs->va_mode |= ubits | (ubits << 3); ! } ! } } #endif /* AFS_DARWIN_ENV */ attrs->va_uid = fakedir ? 0 : avc->m.Owner; *************** *** 96,102 **** --- 104,114 ---- #ifdef AFS_OSF_ENV attrs->va_fsid = avc->v.v_mount->m_stat.f_fsid.val[0]; #else + #ifdef AFS_DARWIN70_ENV + attrs->va_fsid = avc->v.v_mount->mnt_stat.f_fsid.val[0]; + #else /* ! AFS_DARWIN70_ENV */ attrs->va_fsid = 1; + #endif /* AFS_DARWIN70_ENV */ #endif #endif #endif /* AFS_SUN56_ENV */ Index: openafs/src/afsd/Makefile.in diff -c openafs/src/afsd/Makefile.in:1.6.2.6 openafs/src/afsd/Makefile.in:1.6.2.7 *** openafs/src/afsd/Makefile.in:1.6.2.6 Tue Jul 1 15:03:50 2003 --- openafs/src/afsd/Makefile.in Fri Oct 24 01:24:41 2003 *************** *** 5,10 **** --- 5,12 ---- # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html + # + # Portions Copyright (c) 2003 Apple Computer, Inc. # afsd makefile DEST=@DEST@ *************** *** 52,58 **** ${CC} ${CFLAGS} -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} /usr/lib/libdwarf.a /usr/lib/libelf.a ;; \ sgi_64 | sgi_65 ) \ ${CC} ${CFLAGS} -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} /usr/lib32/libdwarf.a /usr/lib32/libelf.a ;; \ ! ppc_darwin* ) \ ${CC} ${CFLAGS} -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} -F/System/Library/PrivateFrameworks -framework DiskArbitration ;; \ * ) \ ${CC} ${CFLAGS} -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} ;; \ --- 54,60 ---- ${CC} ${CFLAGS} -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} /usr/lib/libdwarf.a /usr/lib/libelf.a ;; \ sgi_64 | sgi_65 ) \ ${CC} ${CFLAGS} -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} /usr/lib32/libdwarf.a /usr/lib32/libelf.a ;; \ ! *_darwin_* ) \ ${CC} ${CFLAGS} -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} -F/System/Library/PrivateFrameworks -framework DiskArbitration ;; \ * ) \ ${CC} ${CFLAGS} -o afsd afsd.o $(NON_SHARED) $(LDFLAGS) $(AFSLIBS) ${XLIBS} ;; \ *************** *** 124,130 **** *linux* ) \ ${INSTALLex} -f afs.rc.linux ${DEST}/root.client/usr/vice/etc/afs.rc; \ ${INSTALL} -f afs.conf.linux ${DEST}/root.client/usr/vice/etc/afs.conf ;; \ ! ppc_darwin*) \ ${INSTALLex} -f afs.rc.darwin ${DEST}/root.client/usr/vice/etc/afs.rc ; \ ${INSTALL} -f afs.rc.darwin.plist ${DEST}/root.client/usr/vice/etc/StartupParameters.plist ;; \ *fbsd*) \ --- 126,132 ---- *linux* ) \ ${INSTALLex} -f afs.rc.linux ${DEST}/root.client/usr/vice/etc/afs.rc; \ ${INSTALL} -f afs.conf.linux ${DEST}/root.client/usr/vice/etc/afs.conf ;; \ ! *_darwin_*) \ ${INSTALLex} -f afs.rc.darwin ${DEST}/root.client/usr/vice/etc/afs.rc ; \ ${INSTALL} -f afs.rc.darwin.plist ${DEST}/root.client/usr/vice/etc/StartupParameters.plist ;; \ *fbsd*) \ Index: openafs/src/afsd/afs.rc.darwin diff -c openafs/src/afsd/afs.rc.darwin:1.2.2.2 openafs/src/afsd/afs.rc.darwin:1.2.2.3 *** openafs/src/afsd/afs.rc.darwin:1.2.2.2 Thu May 15 11:18:38 2003 --- openafs/src/afsd/afs.rc.darwin Fri Oct 24 01:24:42 2003 *************** *** 5,10 **** --- 5,12 ---- # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html + # + # Portions Copyright (c) 2003 Apple Computer, Inc. . /etc/rc.common *************** *** 100,105 **** --- 102,115 ---- echo "Starting afsd" $AFSD $OPTIONS + + # + # Call afssettings (if it exists) to set customizable parameters + # + if [ -x $VICEETC/config/afssettings ]; then + sleep 2 + $VICEETC/config/afssettings + fi # # Run package to update the disk Index: openafs/src/afsd/afs.rc.darwin.plist diff -c openafs/src/afsd/afs.rc.darwin.plist:1.3.2.1 openafs/src/afsd/afs.rc.darwin.plist:1.3.2.2 *** openafs/src/afsd/afs.rc.darwin.plist:1.3.2.1 Wed Sep 12 01:03:53 2001 --- openafs/src/afsd/afs.rc.darwin.plist Fri Oct 24 01:24:42 2003 *************** *** 1,7 **** { Description = "OpenAFS network file system"; Provides = ("AFS"); ! Requires = ("Resolver"); OrderPreference = "None"; Messages = { --- 1,7 ---- { Description = "OpenAFS network file system"; Provides = ("AFS"); ! Requires = ("Resolver", "Disks"); OrderPreference = "None"; Messages = { Index: openafs/src/afsmonitor/afsmonitor.c diff -c openafs/src/afsmonitor/afsmonitor.c:1.9.2.2 openafs/src/afsmonitor/afsmonitor.c:1.9.2.3 *** openafs/src/afsmonitor/afsmonitor.c:1.9.2.2 Sat Jan 11 02:42:31 2003 --- openafs/src/afsmonitor/afsmonitor.c Fri Oct 24 01:24:43 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 16,22 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/afsmonitor/afsmonitor.c,v 1.9.2.2 2003/01/11 07:42:31 shadow Exp $"); #include #include --- 18,24 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/afsmonitor/afsmonitor.c,v 1.9.2.3 2003/10/24 05:24:43 shadow Exp $"); #include #include *************** *** 274,280 **** ! #ifndef AFS_FBSD_ENV /* strcasestr(): Return first occurence of pattern s2 in s1, case insensitive. --- 276,282 ---- ! #if !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN70_ENV) /* strcasestr(): Return first occurence of pattern s2 in s1, case insensitive. Index: openafs/src/butc/Makefile.in diff -c openafs/src/butc/Makefile.in:1.4.2.3 openafs/src/butc/Makefile.in:1.4.2.4 *** openafs/src/butc/Makefile.in:1.4.2.3 Tue Jul 1 15:03:56 2003 --- openafs/src/butc/Makefile.in Fri Oct 24 01:24:45 2003 *************** *** 4,9 **** --- 4,11 ---- # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html + # + # Portions Copyright (c) 2003 Apple Computer, Inc. DEST=@DEST@ TOP_INCDIR=@TOP_INCDIR@ *************** *** 109,114 **** --- 111,121 ---- @case ${SYS_NAME} in \ alpha_dux*|sgi_*|sun*|rs_aix4*|*linux*|hp_ux*) \ echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \ + *_darwin_[1-6][0-9]) \ + echo ${INSTALL} butc ${DESTDIR}${sbindir}/butc ; \ + ${INSTALL} butc ${DESTDIR}${sbindir}/butc ;; \ + *_darwin_*) \ + echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \ *) \ echo ${INSTALL} butc ${DESTDIR}${sbindir}/butc ; \ ${INSTALL} butc ${DESTDIR}${sbindir}/butc ;; \ *************** *** 119,124 **** --- 126,136 ---- dest: @case ${SYS_NAME} in \ alpha_dux*|sgi_*|sun*|rs_aix4*|*linux*|hp_ux*) \ + echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \ + *_darwin_[1-6][0-9]) \ + echo ${INSTALL} butc ${DEST}/etc/butc ; \ + ${INSTALL} butc ${DEST}/etc/butc ;; \ + *_darwin_*) \ echo "Don't install butc for ${SYS_NAME} (will install from tbutc)" ;; \ *) \ echo ${INSTALL} butc ${DEST}/etc/butc ; \ Index: openafs/src/butc/lwps.c diff -c openafs/src/butc/lwps.c:1.5 openafs/src/butc/lwps.c:1.5.2.1 *** openafs/src/butc/lwps.c:1.5 Tue Aug 7 20:03:40 2001 --- openafs/src/butc/lwps.c Tue Aug 5 22:58:40 2003 *************** *** 10,16 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/butc/lwps.c,v 1.5 2001/08/08 00:03:40 shadow Exp $"); #include #ifdef AFS_NT40_ENV --- 10,16 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/butc/lwps.c,v 1.5.2.1 2003/08/06 02:58:40 zacheiss Exp $"); #include #ifdef AFS_NT40_ENV *************** *** 743,749 **** if ( time(0) > start+BELLTIME ) { start = time(0); ! FFlushInput(stdin); putchar(BELLCHAR); fflush(stdout); } --- 743,749 ---- if ( time(0) > start+BELLTIME ) { start = time(0); ! FFlushInput(); putchar(BELLCHAR); fflush(stdout); } Index: openafs/src/config/Makefile.ppc_darwin_70.in diff -c /dev/null openafs/src/config/Makefile.ppc_darwin_70.in:1.1.2.1 *** /dev/null Fri Oct 24 02:39:35 2003 --- openafs/src/config/Makefile.ppc_darwin_70.in Fri Oct 24 01:24:46 2003 *************** *** 0 **** --- 1,47 ---- + # Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + # + # Keep macros within each section in sorted order for clean diff displays. + # + # AFS_OSTYPE used to indicate suffixes and os specific subdirectories. + AFS_OSTYPE = DARWIN + # + # + # compilation and link editor flags + XCFLAGS= + MT_CFLAGS=-D_REENTRANT -DAFS_PTHREAD_ENV ${XCFLAGS} + MT_CC=cc + KROOT= + KINCLUDES=-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers + LWP_OPTMZ=-O2 + OPTMZ=-O2 + DBG=-g + REGEX_OBJ=regex.o + + + # + # libraries + XLIBS=@LIB_AFSDB@ + TXLIBS=-lncurses + #MTLIBS= + #XLIBELFA= + #XLIBKVM= + # + SHLIB_SUFFIX= + SHLIB_CFLAGS= + # + # programs + AR=ar + AS=as + CC=cc + CP=cp + INSTALL=${TOP_SRCDIR}/pinstall/pinstall + LEX=lex -l + LD= ld + LORDER = lorder + MV=mv + RANLIB=ranlib + RM=rm + STRIP= strip + + # override getfsent + EXTRA_VLIBOBJS=fstab.o Index: openafs/src/config/afs_sysnames.h diff -c openafs/src/config/afs_sysnames.h:1.14.2.10 openafs/src/config/afs_sysnames.h:1.14.2.11 *** openafs/src/config/afs_sysnames.h:1.14.2.10 Wed May 28 19:49:22 2003 --- openafs/src/config/afs_sysnames.h Fri Oct 24 01:24:46 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ #define SYS_NAME_ID_i386_umlinux2 2700 *************** *** 58,63 **** --- 60,66 ---- #define SYS_NAME_ID_ppc_darwin_13 504 #define SYS_NAME_ID_ppc_darwin_14 505 #define SYS_NAME_ID_ppc_darwin_60 506 + #define SYS_NAME_ID_ppc_darwin_70 507 #define SYS_NAME_ID_next_mach20 601 #define SYS_NAME_ID_next_mach30 602 Index: openafs/src/config/param.ppc_darwin_70.h diff -c /dev/null openafs/src/config/param.ppc_darwin_70.h:1.1.2.1 *** /dev/null Fri Oct 24 02:39:35 2003 --- openafs/src/config/param.ppc_darwin_70.h Fri Oct 24 01:24:46 2003 *************** *** 0 **** --- 1,74 ---- + /* + * Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + */ + #ifndef AFS_PARAM_H + #define AFS_PARAM_H + + #define AFS_ENV 1 + #define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ + #define AFS_64BIT_IOPS_ENV 1 + #define AFS_PPC_ENV 1 + #define AFS_VFSINCL_ENV 1 + + #include + + #define AFS_DARWIN_ENV + #define AFS_DARWIN13_ENV + #define AFS_DARWIN14_ENV + #define AFS_DARWIN60_ENV + #define AFS_DARWIN70_ENV + #define AFS_NONFSTRANS + #define AFS_SYSCALL 230 + #define AFS_NAMEI_ENV 1 + + /* File system entry (used if mount.h doesn't define MOUNT_AFS */ + #define AFS_MOUNT_AFS "afs" + + /* Machine / Operating system information */ + #define sys_ppc_darwin_12 1 + #define sys_ppc_darwin_13 1 + #define sys_ppc_darwin_14 1 + #define sys_ppc_darwin_60 1 + #define sys_ppc_darwin_70 1 + #define SYS_NAME "ppc_darwin_70" + #define SYS_NAME_ID SYS_NAME_ID_ppc_darwin_70 + #define AFSBIG_ENDIAN 1 + #define AFS_HAVE_FFS 1 /* Use system's ffs. */ + + #define AFS_GCPAGS 1 /* if nonzero, garbage collect PAGs */ + #define RXK_LISTENER_ENV 1 + + #ifdef KERNEL + #undef MACRO_BEGIN + #undef MACRO_END + #include + #define AFS_GLOBAL_SUNLOCK 1 + #define AFS_VFS34 1 /* What is VFS34??? */ + #define afsio_iov uio_iov + #define afsio_iovcnt uio_iovcnt + #define afsio_offset uio_offset + #define afsio_seg uio_segflg + #define afsio_resid uio_resid + #define AFS_UIOSYS UIO_SYSSPACE + #define AFS_UIOUSER UIO_USERSPACE + #define AFS_CLBYTES CLBYTES + #define osi_GetTime(x) microtime(x) + #define AFS_KALLOC(x) kalloc(x) + #define AFS_KFREE(x,y) kfree(x,y) + #define v_count v_usecount + #define v_vfsp v_mount + #define vfs_bsize mnt_stat.f_bsize + #define vfs_fsid mnt_stat.f_fsid + #define va_nodeid va_fileid + #define vfs_vnodecovered mnt_vnodecovered + #define direct dirent + #define vnode_t struct vnode + + #define VN_RELE(vp) vrele(((struct vnode *)(vp))) + #define VN_HOLD(vp) VREF(((struct vnode *)(vp))) + + #endif + + #define BIND_8_COMPAT + + #endif /* AFS_PARAM_H */ Index: openafs/src/config/param.ppc_darwin_70_usr.h diff -c /dev/null openafs/src/config/param.ppc_darwin_70_usr.h:1.1.2.1 *** /dev/null Fri Oct 24 02:39:35 2003 --- openafs/src/config/param.ppc_darwin_70_usr.h Fri Oct 24 01:24:46 2003 *************** *** 0 **** --- 1,59 ---- + /* + * Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + */ + #ifndef AFS_PARAM_H + #define AFS_PARAM_H + + #define AFS_VFSINCL_ENV 1 /* NOBODY uses this.... */ + #define AFS_ENV 1 + #define AFS_64BIT_ENV 1 /* Defines afs_int32 as int, not long. */ + #define AFS_PPC_ENV 1 + + #include + #define AFS_USERSPACE_ENV + #define AFS_USR_DARWIN_ENV + #define AFS_USR_DARWIN13_ENV + #define AFS_USR_DARWIN14_ENV + #define AFS_USR_DARWIN60_ENV + #define AFS_USR_DARWIN70_ENV + #define AFS_NONFSTRANS + #define AFS_SYSCALL 230 + + /* File system entry (used if mount.h doesn't define MOUNT_AFS */ + #define AFS_MOUNT_AFS "afs" + + /* Machine / Operating system information */ + #define sys_ppc_darwin_12 1 + #define sys_ppc_darwin_13 1 + #define sys_ppc_darwin_14 1 + #define sys_ppc_darwin_60 1 + #define sys_ppc_darwin_70 1 + #define SYS_NAME "ppc_darwin_70" + #define SYS_NAME_ID SYS_NAME_ID_ppc_darwin_70 + #define AFSBIG_ENDIAN 1 + #define AFS_HAVE_FFS 1 /* Use system's ffs. */ + + #define AFS_UIOSYS UIO_SYSSPACE + #define AFS_UIOUSER UIO_USERSPACE + + #define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ + #define RXK_LISTENER_ENV 1 + + #define AFS_VFS34 1 /* What is VFS34??? */ + #define afsio_iov uio_iov + #define afsio_iovcnt uio_iovcnt + #define afsio_offset uio_offset + #define afsio_seg uio_segflg + #define afsio_resid uio_resid + #define AFS_UIOSYS UIO_SYSSPACE + #define AFS_UIOUSER UIO_USERSPACE + #define VATTR_NULL usr_vattr_null + + #define AFS_DIRENT + #ifndef CMSERVERPREF + #define CMSERVERPREF + #endif + + #define BIND_8_COMPAT + + #endif /* AFS_PARAM_H */ Index: openafs/src/libadmin/samples/cm_client_config.c diff -c openafs/src/libadmin/samples/cm_client_config.c:1.4 openafs/src/libadmin/samples/cm_client_config.c:1.4.4.1 *** openafs/src/libadmin/samples/cm_client_config.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/cm_client_config.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/cm_client_config.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/cm_client_config.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ void Usage() { Index: openafs/src/libadmin/samples/cm_list_cells.c diff -c openafs/src/libadmin/samples/cm_list_cells.c:1.4 openafs/src/libadmin/samples/cm_list_cells.c:1.4.4.1 *** openafs/src/libadmin/samples/cm_list_cells.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/cm_list_cells.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/cm_list_cells.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/cm_list_cells.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ void Usage() { Index: openafs/src/libadmin/samples/cm_local_cell.c diff -c openafs/src/libadmin/samples/cm_local_cell.c:1.4 openafs/src/libadmin/samples/cm_local_cell.c:1.4.4.1 *** openafs/src/libadmin/samples/cm_local_cell.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/cm_local_cell.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/cm_local_cell.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/cm_local_cell.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ void Usage() { Index: openafs/src/libadmin/samples/cm_server_prefs.c diff -c openafs/src/libadmin/samples/cm_server_prefs.c:1.4 openafs/src/libadmin/samples/cm_server_prefs.c:1.4.4.1 *** openafs/src/libadmin/samples/cm_server_prefs.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/cm_server_prefs.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/cm_server_prefs.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/cm_server_prefs.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ void Usage() { Index: openafs/src/libadmin/samples/rxdebug_basic_stats.c diff -c openafs/src/libadmin/samples/rxdebug_basic_stats.c:1.4 openafs/src/libadmin/samples/rxdebug_basic_stats.c:1.4.4.1 *** openafs/src/libadmin/samples/rxdebug_basic_stats.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxdebug_basic_stats.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxdebug_basic_stats.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxdebug_basic_stats.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ void Usage() { Index: openafs/src/libadmin/samples/rxdebug_conns.c diff -c openafs/src/libadmin/samples/rxdebug_conns.c:1.4 openafs/src/libadmin/samples/rxdebug_conns.c:1.4.4.1 *** openafs/src/libadmin/samples/rxdebug_conns.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxdebug_conns.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxdebug_conns.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxdebug_conns.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ void Usage() { Index: openafs/src/libadmin/samples/rxdebug_peers.c diff -c openafs/src/libadmin/samples/rxdebug_peers.c:1.4 openafs/src/libadmin/samples/rxdebug_peers.c:1.4.4.1 *** openafs/src/libadmin/samples/rxdebug_peers.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxdebug_peers.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxdebug_peers.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxdebug_peers.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ void Usage() { Index: openafs/src/libadmin/samples/rxdebug_rx_stats.c diff -c openafs/src/libadmin/samples/rxdebug_rx_stats.c:1.4 openafs/src/libadmin/samples/rxdebug_rx_stats.c:1.4.4.1 *** openafs/src/libadmin/samples/rxdebug_rx_stats.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxdebug_rx_stats.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxdebug_rx_stats.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxdebug_rx_stats.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ void Usage() { Index: openafs/src/libadmin/samples/rxdebug_supported_stats.c diff -c openafs/src/libadmin/samples/rxdebug_supported_stats.c:1.4 openafs/src/libadmin/samples/rxdebug_supported_stats.c:1.4.4.1 *** openafs/src/libadmin/samples/rxdebug_supported_stats.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxdebug_supported_stats.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxdebug_supported_stats.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxdebug_supported_stats.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ void Usage() { Index: openafs/src/libadmin/samples/rxdebug_version.c diff -c openafs/src/libadmin/samples/rxdebug_version.c:1.4 openafs/src/libadmin/samples/rxdebug_version.c:1.4.4.1 *** openafs/src/libadmin/samples/rxdebug_version.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxdebug_version.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxdebug_version.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxdebug_version.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ void Usage() { Index: openafs/src/libadmin/samples/rxstat_clear_peer.c diff -c openafs/src/libadmin/samples/rxstat_clear_peer.c:1.4 openafs/src/libadmin/samples/rxstat_clear_peer.c:1.4.4.1 *** openafs/src/libadmin/samples/rxstat_clear_peer.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxstat_clear_peer.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_clear_peer.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_clear_peer.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ extern int RXSTATS_ClearPeerRPCStats(); Index: openafs/src/libadmin/samples/rxstat_clear_process.c diff -c openafs/src/libadmin/samples/rxstat_clear_process.c:1.4 openafs/src/libadmin/samples/rxstat_clear_process.c:1.4.4.1 *** openafs/src/libadmin/samples/rxstat_clear_process.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxstat_clear_process.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_clear_process.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_clear_process.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ extern int RXSTATS_ClearProcessRPCStats(); Index: openafs/src/libadmin/samples/rxstat_disable_peer.c diff -c openafs/src/libadmin/samples/rxstat_disable_peer.c:1.4 openafs/src/libadmin/samples/rxstat_disable_peer.c:1.4.4.1 *** openafs/src/libadmin/samples/rxstat_disable_peer.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxstat_disable_peer.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_disable_peer.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_disable_peer.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ extern int RXSTATS_DisablePeerRPCStats(); Index: openafs/src/libadmin/samples/rxstat_disable_process.c diff -c openafs/src/libadmin/samples/rxstat_disable_process.c:1.4 openafs/src/libadmin/samples/rxstat_disable_process.c:1.4.4.1 *** openafs/src/libadmin/samples/rxstat_disable_process.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxstat_disable_process.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_disable_process.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_disable_process.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ extern int RXSTATS_DisableProcessRPCStats(); Index: openafs/src/libadmin/samples/rxstat_enable_peer.c diff -c openafs/src/libadmin/samples/rxstat_enable_peer.c:1.4 openafs/src/libadmin/samples/rxstat_enable_peer.c:1.4.4.1 *** openafs/src/libadmin/samples/rxstat_enable_peer.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxstat_enable_peer.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_enable_peer.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_enable_peer.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ extern int RXSTATS_EnablePeerRPCStats(); Index: openafs/src/libadmin/samples/rxstat_enable_process.c diff -c openafs/src/libadmin/samples/rxstat_enable_process.c:1.4 openafs/src/libadmin/samples/rxstat_enable_process.c:1.4.4.1 *** openafs/src/libadmin/samples/rxstat_enable_process.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxstat_enable_process.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_enable_process.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_enable_process.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ extern int RXSTATS_EnableProcessRPCStats(); Index: openafs/src/libadmin/samples/rxstat_get_peer.c diff -c openafs/src/libadmin/samples/rxstat_get_peer.c:1.4 openafs/src/libadmin/samples/rxstat_get_peer.c:1.4.4.1 *** openafs/src/libadmin/samples/rxstat_get_peer.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxstat_get_peer.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_get_peer.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_get_peer.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 24,29 **** --- 26,38 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ + #include #include #define FSINT_COMMON_XG Index: openafs/src/libadmin/samples/rxstat_get_process.c diff -c openafs/src/libadmin/samples/rxstat_get_process.c:1.4 openafs/src/libadmin/samples/rxstat_get_process.c:1.4.4.1 *** openafs/src/libadmin/samples/rxstat_get_process.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxstat_get_process.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_get_process.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_get_process.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 24,29 **** --- 26,38 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ + #include #include #define FSINT_COMMON_XG Index: openafs/src/libadmin/samples/rxstat_get_version.c diff -c openafs/src/libadmin/samples/rxstat_get_version.c:1.5 openafs/src/libadmin/samples/rxstat_get_version.c:1.5.4.1 *** openafs/src/libadmin/samples/rxstat_get_version.c:1.5 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxstat_get_version.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_get_version.c,v 1.5 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_get_version.c,v 1.5.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ void Usage() { Index: openafs/src/libadmin/samples/rxstat_query_peer.c diff -c openafs/src/libadmin/samples/rxstat_query_peer.c:1.4 openafs/src/libadmin/samples/rxstat_query_peer.c:1.4.4.1 *** openafs/src/libadmin/samples/rxstat_query_peer.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxstat_query_peer.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_query_peer.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_query_peer.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ extern int RXSTATS_QueryPeerRPCStats(); Index: openafs/src/libadmin/samples/rxstat_query_process.c diff -c openafs/src/libadmin/samples/rxstat_query_process.c:1.4 openafs/src/libadmin/samples/rxstat_query_process.c:1.4.4.1 *** openafs/src/libadmin/samples/rxstat_query_process.c:1.4 Thu Jul 12 15:58:45 2001 --- openafs/src/libadmin/samples/rxstat_query_process.c Fri Oct 24 01:24:51 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 14,20 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_query_process.c,v 1.4 2001/07/12 19:58:45 shadow Exp $"); #ifdef AFS_NT40_ENV #include --- 16,22 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/samples/rxstat_query_process.c,v 1.4.4.1 2003/10/24 05:24:51 shadow Exp $"); #ifdef AFS_NT40_ENV #include *************** *** 23,28 **** --- 25,36 ---- #include #include #include + + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ extern int RXSTATS_QueryProcessRPCStats(); Index: openafs/src/libadmin/test/afscp.c diff -c openafs/src/libadmin/test/afscp.c:1.4 openafs/src/libadmin/test/afscp.c:1.4.4.1 *** openafs/src/libadmin/test/afscp.c:1.4 Thu Jul 12 15:58:46 2001 --- openafs/src/libadmin/test/afscp.c Fri Oct 24 01:24:53 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* Test driver for admin functions. */ *************** *** 12,18 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/test/afscp.c,v 1.4 2001/07/12 19:58:46 shadow Exp $"); #include --- 14,20 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/libadmin/test/afscp.c,v 1.4.4.1 2003/10/24 05:24:53 shadow Exp $"); #include *************** *** 44,49 **** --- 46,56 ---- void *cellHandle; void *tokenHandle; + #ifdef AFS_DARWIN_ENV + pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER; + pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER; + #endif /* AFS_DARWIN_ENV */ /* * Before processing any command, process the common arguments and Index: openafs/src/libafs/MakefileProto.DARWIN.in diff -c openafs/src/libafs/MakefileProto.DARWIN.in:1.8.2.5 openafs/src/libafs/MakefileProto.DARWIN.in:1.8.2.6 *** openafs/src/libafs/MakefileProto.DARWIN.in:1.8.2.5 Wed Aug 21 16:53:26 2002 --- openafs/src/libafs/MakefileProto.DARWIN.in Fri Oct 24 01:24:55 2003 *************** *** 1,5 **** #/* Copyright (C) 1995, 1989 Transarc Corporation - All rights reserved */ ! # $Header: /data/cvs/openafs/src/libafs/MakefileProto.DARWIN.in,v 1.8.2.5 2002/08/21 20:53:26 shadow Exp $ # # MakefileProto for Digital Unix systems # --- 1,6 ---- #/* Copyright (C) 1995, 1989 Transarc Corporation - All rights reserved */ ! #/* Portions Copyright (c) 2003 Apple Computer, Inc. */ ! # $Header: /data/cvs/openafs/src/libafs/MakefileProto.DARWIN.in,v 1.8.2.6 2003/10/24 05:24:55 shadow Exp $ # # MakefileProto for Digital Unix systems # *************** *** 46,51 **** --- 47,54 ---- KDEFS= DBUG = DEFINES= -D_KERNEL -DKERNEL -DKERNEL_PRIVATE -DDIAGNOSTIC -DUSE_SELECT -DMACH_USER_API -DMACH_KERNEL + + KOPTS=-static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch KOPTS=-no-cpp-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch Index: openafs/src/libafs/afs.ppc_darwin_70.plist.in diff -c /dev/null openafs/src/libafs/afs.ppc_darwin_70.plist.in:1.1.2.1 *** /dev/null Fri Oct 24 02:39:42 2003 --- openafs/src/libafs/afs.ppc_darwin_70.plist.in Fri Oct 24 01:24:55 2003 *************** *** 0 **** --- 1,31 ---- + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + afs + CFBundleIdentifier + org.openafs.filesystems.afs + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + afs + CFBundlePackageType + KEXT + CFBundleShortVersionString + 1.2.10 + CFBundleSignature + ???? + CFBundleVersion + 1.2.10 + OSBundleLibraries + + com.apple.kernel.bsd + 6.9.9 + com.apple.kernel.mach + 6.9.9 + + + Index: openafs/src/libafsrpc/Makefile.in diff -c openafs/src/libafsrpc/Makefile.in:1.5.2.7 openafs/src/libafsrpc/Makefile.in:1.5.2.8 *** openafs/src/libafsrpc/Makefile.in:1.5.2.7 Sun Nov 17 23:35:52 2002 --- openafs/src/libafsrpc/Makefile.in Fri Oct 24 01:24:57 2003 *************** *** 4,9 **** --- 4,11 ---- # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html + # + # Portions Copyright (c) 2003 Apple Computer, Inc. # This is a pthread safe library containing rx, rxkad and des. *************** *** 268,274 **** # # $ what /opt/langtools/bin/pxdb32 # /opt/langtools/bin/pxdb32: ! # HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.5.2.7 $ # # The problem occurs when -g and -O are both used when compiling des.c. # The simplest way to work around the problem is to leave out either -g or -O. --- 270,276 ---- # # $ what /opt/langtools/bin/pxdb32 # /opt/langtools/bin/pxdb32: ! # HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.5.2.8 $ # # The problem occurs when -g and -O are both used when compiling des.c. # The simplest way to work around the problem is to leave out either -g or -O. *************** *** 347,353 **** /usr/ccs/lib/cpp ${SFLAGS} ${SYS}/syscall.s syscall.ss; \ as -o syscall.o syscall.ss; \ $(RM) syscall.ss;; \ ! sgi_* | ppc_darwin* ) \ ${CC} ${CFLAGS} -c ${SYS}/syscall.s;; \ alpha_dux?? ) \ ${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \ --- 349,355 ---- /usr/ccs/lib/cpp ${SFLAGS} ${SYS}/syscall.s syscall.ss; \ as -o syscall.o syscall.ss; \ $(RM) syscall.ss;; \ ! sgi_* | *_darwin_* ) \ ${CC} ${CFLAGS} -c ${SYS}/syscall.s;; \ alpha_dux?? ) \ ${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \ Index: openafs/src/lwp/Makefile.in diff -c openafs/src/lwp/Makefile.in:1.4.2.4 openafs/src/lwp/Makefile.in:1.4.2.5 *** openafs/src/lwp/Makefile.in:1.4.2.4 Wed May 28 19:49:25 2003 --- openafs/src/lwp/Makefile.in Fri Oct 24 01:24:59 2003 *************** *** 4,9 **** --- 4,11 ---- # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html + # + # Portions Copyright (c) 2003 Apple Computer, Inc. DEST=@DEST@ TOP_INCDIR=@TOP_INCDIR@ *************** *** 67,73 **** /lib/cpp -P -I${TOP_INCDIR} process.s >process.ss; \ ${AS} -ahlns process.ss -o process.o >process.lst; \ $(RM) process.ss ;; \ ! ppc_darwin* ) \ $(CC) -c ${XCFLAGS} -I${TOP_INCDIR} process.s;; \ i386_fbsd* ) \ /usr/bin/cpp -P process.fbsd.s > process.ss; \ --- 69,75 ---- /lib/cpp -P -I${TOP_INCDIR} process.s >process.ss; \ ${AS} -ahlns process.ss -o process.o >process.lst; \ $(RM) process.ss ;; \ ! *_darwin_* ) \ $(CC) -c ${XCFLAGS} -I${TOP_INCDIR} process.s;; \ i386_fbsd* ) \ /usr/bin/cpp -P process.fbsd.s > process.ss; \ Index: openafs/src/packaging/MacOS/Makefile diff -c /dev/null openafs/src/packaging/MacOS/Makefile:1.1.2.1 *** /dev/null Fri Oct 24 02:39:45 2003 --- openafs/src/packaging/MacOS/Makefile Fri Oct 24 01:25:01 2003 *************** *** 0 **** --- 1,33 ---- + # Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + # + # @APPLE_LICENSE_HEADER_START@ + # + # This file contains Original Code and/or Modifications of Original Code + # as defined in and that are subject to the Apple Public Source License + # Version 2.0 (the 'License'). You may not use this file except in + # compliance with the License. Please obtain a copy of the License at + # http://www.opensource.apple.com/apsl/ and read it before using this + # file. + # + # The Original Code and all software distributed under the License are + # distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + # EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + # FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + # Please see the License for the specific language governing rights and + # limitations under the License. + # + # @APPLE_LICENSE_HEADER_END@ + + AFSINCLUDE = /Library/OpenAFS/Tools/include + CFLAGS = -O -I$(AFSINCLUDE) + LIBS = -framework Foundation + ALL = afssettings + + all: $(ALL) + + afssettings : afssettings.m + cc $(CFLAGS) -o $@ $^ $(LIBS) + + clean: + @rm -f *.o $(ALL) Index: openafs/src/packaging/MacOS/OpenAFS.Description.plist diff -c /dev/null openafs/src/packaging/MacOS/OpenAFS.Description.plist:1.1.2.1 *** /dev/null Fri Oct 24 02:39:46 2003 --- openafs/src/packaging/MacOS/OpenAFS.Description.plist Fri Oct 24 01:25:01 2003 *************** *** 0 **** --- 1,14 ---- + + + + + IFPkgDescriptionDeleteWarning + + IFPkgDescriptionDescription + Mac OS X version of OpenAFS client and server. + IFPkgDescriptionTitle + OpenAFS + IFPkgDescriptionVersion + 1.2.10 + + Index: openafs/src/packaging/MacOS/OpenAFS.Info.plist diff -c /dev/null openafs/src/packaging/MacOS/OpenAFS.Info.plist:1.1.2.1 *** /dev/null Fri Oct 24 02:39:46 2003 --- openafs/src/packaging/MacOS/OpenAFS.Info.plist Fri Oct 24 01:25:01 2003 *************** *** 0 **** --- 1,40 ---- + + + + + CFBundleGetInfoString + OpenAFS 1.2.10 + CFBundleIdentifier + org.openafs.OpenAFS.pkg + CFBundleName + OpenAFS + CFBundleShortVersionString + 1.2.10 + IFMajorVersion + 1 + IFMinorVersion + 2 + IFPkgFlagAllowBackRev + + IFPkgFlagAuthorizationAction + RootAuthorization + IFPkgFlagDefaultLocation + / + IFPkgFlagInstallFat + + IFPkgFlagIsRequired + + IFPkgFlagRelocatable + + IFPkgFlagRestartAction + RecommendedRestart + IFPkgFlagRootVolumeOnly + + IFPkgFlagUpdateInstalledLanguages + + IFPkgFlagUseUserMask + + IFPkgFormatVersion + 0.10000000149011612 + + Index: openafs/src/packaging/MacOS/OpenAFS.post_install diff -c openafs/src/packaging/MacOS/OpenAFS.post_install:1.1.2.1 openafs/src/packaging/MacOS/OpenAFS.post_install:1.1.2.2 *** openafs/src/packaging/MacOS/OpenAFS.post_install:1.1.2.1 Wed Jul 9 14:24:12 2003 --- openafs/src/packaging/MacOS/OpenAFS.post_install Fri Oct 24 01:25:01 2003 *************** *** 1,10 **** #!/bin/sh if [ -d /afs -a ! -h /afs ]; then rmdir /afs fi ! mkdir -p /Network/afs ! if [ ! -h /afs ]; then ! ln -s /Network/afs /afs fi cd /var/db/openafs/etc --- 1,24 ---- #!/bin/sh + # Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved. if [ -d /afs -a ! -h /afs ]; then rmdir /afs fi ! majorvers=`uname -r | sed 's/\..*//'` ! if [ $majorvers -ge 7 ]; then ! # /Network is now readonly, so put AFS in /afs; make sure /afs is a directory ! if [ -e /afs ]; then ! if [ -h /afs -o ! -d /afs ]; then ! rm -f /afs ! mkdir /afs ! fi ! else ! mkdir /afs ! fi ! else ! mkdir -p /Network/afs ! if [ ! -h /afs ]; then ! ln -s /Network/afs /afs ! fi fi cd /var/db/openafs/etc *************** *** 48,51 **** --- 62,75 ---- cp CellServDB.master CellServDB.master.last cp CellServDB.master CellServDB fi + fi + + if [ $majorvers -ge 7 ]; then + # make config/settings.plist if it doesn't exist + if [ ! -e config/settings.plist -a -e config/settings.plist.orig ]; then + cp config/settings.plist.orig config/settings.plist + fi + elif [ -e config/afssettings ]; then + # turn off execution of afssettings + chmod a-x config/afssettings fi Index: openafs/src/packaging/MacOS/afssettings.m diff -c /dev/null openafs/src/packaging/MacOS/afssettings.m:1.1.2.1 *** /dev/null Fri Oct 24 02:39:46 2003 --- openafs/src/packaging/MacOS/afssettings.m Fri Oct 24 01:25:01 2003 *************** *** 0 **** --- 1,171 ---- + /* + * Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + #import + #import + #import + #import + #import + #import + #import + + enum Type { + TypeNode = 0, + TypeNum, + TypeStr + }; + + typedef struct _setting { + NSString *key; + int selector; + enum Type type; + struct _setting *children; + } Setting; + + Setting s_darwin_all[] = { + {@"RealModes", AFS_SC_DARWIN_ALL_REALMODES, TypeNum, NULL}, + {NULL, 0, 0, NULL} + }; + Setting s_darwin[] = { + {@"All", AFS_SC_DARWIN_ALL, TypeNode, s_darwin_all}, + {@"Darwin12", AFS_SC_DARWIN_12, TypeNode, NULL}, + {@"Darwin13", AFS_SC_DARWIN_13, TypeNode, NULL}, + {@"Darwin14", AFS_SC_DARWIN_14, TypeNode, NULL}, + {@"Darwin60", AFS_SC_DARWIN_60, TypeNode, NULL}, + {@"Darwin70", AFS_SC_DARWIN_70, TypeNode, NULL}, + {NULL, 0, 0, NULL} + }; + Setting s_first[] = { + {@"All", AFS_SC_ALL, TypeNode, NULL}, + {@"Darwin", AFS_SC_DARWIN, TypeNode, s_darwin}, + {NULL, 0, 0, NULL} + }; + Setting s_top = {NULL, -1, TypeNode, s_first}; + + int oid[CTL_MAXNAME] = {CTL_VFS}; + NSString *path = @"/var/db/openafs/etc/config/settings.plist"; + + char *oidString(int *oid, int len); + void init(void); + void walk(id obj, Setting *s, int level); + + void + init(void) + { + int oidmax[] = {CTL_VFS, VFS_GENERIC, VFS_MAXTYPENUM}; + int oidvfs[] = {CTL_VFS, VFS_GENERIC, VFS_CONF, 0}; + int max; + struct vfsconf conf; + size_t len; + int i; + + len = sizeof(max); + if(sysctl(oidmax, 3, &max, &len, NULL, NULL) < 0) + err(1, "sysctl VFS_MAXTYPENUM"); + for(i = max; --i >= 0; ) { + oidvfs[3] = i; + len = sizeof(conf); + if(sysctl(oidvfs, 4, &conf, &len, NULL, NULL) < 0) + continue; + if(strcmp("afs", conf.vfc_name) == 0) { + s_top.selector = conf.vfc_typenum; + break; + } + } + if(s_top.selector < 0) + errx(1, "AFS is not loaded"); + } + + char * + oidString(int *oid, int len) + { + static char buf[256]; + char *cp = buf; + + for(;;) { + sprintf(cp, "%d", *oid++); + if(--len <= 0) + break; + cp += strlen(cp); + *cp++ = '.'; + } + return buf; + } + + void + walk(id obj, Setting *s, int level) + { + Setting *child; + id newobj; + int intval; + const char *cp; + int level1 = level + 1; + + oid[level] = s->selector; + switch(s->type) { + case TypeNode: + for(child = s->children; child->key; child++) { + if(child->type == TypeNode && !child->children) + continue; + newobj = [obj objectForKey: child->key]; + if(newobj) + walk(newobj, child, level1); + } + break; + case TypeNum: + intval = [obj intValue]; + if(sysctl(oid, level1, NULL, NULL, &intval, sizeof(intval)) < 0) + err(1, "sysctl %s => %d", oidString(oid, level1), intval); + break; + case TypeStr: + cp = [obj UTF8String]; + if(sysctl(oid, level1, NULL, NULL, (void *)cp, strlen(cp)) < 0) + err(1, "sysctl %s => %s", oidString(oid, level1), cp); + break; + } + } + + main() + { + NSData *plistData; + id plist; + NSString *error; + NSPropertyListFormat format; + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + + init(); + plistData = [NSData dataWithContentsOfFile: path]; + if(plistData) { + plist = [NSPropertyListSerialization propertyListFromData: plistData + mutabilityOption: NSPropertyListImmutable + format: &format + errorDescription: &error + ]; + if(plist) + walk(plist, &s_top, 1); + else + errx(1, "%s: %s", [path UTF8String], [error UTF8String]); + } + + [pool release]; + return 0; + } Index: openafs/src/packaging/MacOS/buildpkg.sh diff -c openafs/src/packaging/MacOS/buildpkg.sh:1.1.2.2 openafs/src/packaging/MacOS/buildpkg.sh:1.1.2.3 *** openafs/src/packaging/MacOS/buildpkg.sh:1.1.2.2 Wed Jul 9 14:54:51 2003 --- openafs/src/packaging/MacOS/buildpkg.sh Fri Oct 24 01:25:01 2003 *************** *** 1,4 **** --- 1,5 ---- #!/bin/sh + # Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved. if [ -z "$1" ]; then echo Usage: buildpkg binary-dir *************** *** 6,20 **** fi BINDEST=$1 RESSRC=`pwd` ! if [ ! -f /usr/bin/package ]; then ! echo "/usr/bin/package does not exist. Please run this script on a MacOS X system" ! echo "with the BSD subsystem installed" ! exit 1 ! fi ! if grep -q 'set resDir = ""' /usr/bin/package ; then ! echo /usr/bin/package is buggy. ! echo remove the line \''set resDir = ""'\' from /usr/bin/package and try again ! exit 1 fi if [ -x /usr/bin/curl ]; then --- 7,34 ---- fi BINDEST=$1 RESSRC=`pwd` ! majorvers=`uname -r | sed 's/\..*//'` ! if [ $majorvers -ge 7 ]; then ! SEP=: ! package=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker ! if [ ! -x $package ]; then ! echo "PackageMaker does not exist. Please run this script on a MacOS X system" ! echo "with the DeveloperTools package installed" ! exit 1 ! fi ! else ! SEP=. ! package=/usr/bin/package ! if [ ! -f $package ]; then ! echo "$package does not exist. Please run this script on a MacOS X system" ! echo "with the BSD subsystem installed" ! exit 1 ! fi ! if grep -q 'set resDir = ""' $package ; then ! echo $package is buggy. ! echo remove the line \''set resDir = ""'\' from $package and try again ! exit 1 ! fi fi if [ -x /usr/bin/curl ]; then *************** *** 54,75 **** mkdir -p $PKGROOT $PKGRES mkdir $PKGROOT/Library ! chown -R root.admin $PKGROOT chmod -R 775 $PKGROOT mkdir $PKGROOT/Library/OpenAFS $PKGROOT/Library/OpenAFS/Tools cd $BINDEST pax -rw * $PKGROOT/Library/OpenAFS/Tools cd $RESSRC - mkdir $PKGROOT/Library mkdir $PKGROOT/Library/StartupItems mkdir $PKGROOT/Library/StartupItems/OpenAFS cp $BINDEST/root.client/usr/vice/etc/afs.rc $PKGROOT/Library/StartupItems/OpenAFS/OpenAFS chmod a+x $PKGROOT/Library/StartupItems/OpenAFS/OpenAFS cp $BINDEST/root.client/usr/vice/etc/StartupParameters.plist $PKGROOT/Library/StartupItems/OpenAFS/StartupParameters.plist ! chown -R root.admin $PKGROOT/Library chmod -R o-w $PKGROOT/Library chmod -R g+w $PKGROOT/Library ! chown -R root.wheel $PKGROOT/Library/OpenAFS/Tools chmod -R og-w $PKGROOT/Library/OpenAFS/Tools mkdir $PKGROOT/private $PKGROOT/private/var $PKGROOT/private/var/db --- 68,88 ---- mkdir -p $PKGROOT $PKGRES mkdir $PKGROOT/Library ! chown -R root${SEP}admin $PKGROOT chmod -R 775 $PKGROOT mkdir $PKGROOT/Library/OpenAFS $PKGROOT/Library/OpenAFS/Tools cd $BINDEST pax -rw * $PKGROOT/Library/OpenAFS/Tools cd $RESSRC mkdir $PKGROOT/Library/StartupItems mkdir $PKGROOT/Library/StartupItems/OpenAFS cp $BINDEST/root.client/usr/vice/etc/afs.rc $PKGROOT/Library/StartupItems/OpenAFS/OpenAFS chmod a+x $PKGROOT/Library/StartupItems/OpenAFS/OpenAFS cp $BINDEST/root.client/usr/vice/etc/StartupParameters.plist $PKGROOT/Library/StartupItems/OpenAFS/StartupParameters.plist ! chown -R root${SEP}admin $PKGROOT/Library chmod -R o-w $PKGROOT/Library chmod -R g+w $PKGROOT/Library ! chown -R root${SEP}wheel $PKGROOT/Library/OpenAFS/Tools chmod -R og-w $PKGROOT/Library/OpenAFS/Tools mkdir $PKGROOT/private $PKGROOT/private/var $PKGROOT/private/var/db *************** *** 77,90 **** mkdir $PKGROOT/private/var/db/openafs/etc $PKGROOT/private/var/db/openafs/etc/config cp $RESSRC/CellServDB $PKGROOT/private/var/db/openafs/etc/CellServDB.master echo andrew.cmu.edu > $PKGROOT/private/var/db/openafs/etc/ThisCell.sample ! echo /Network/afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample #echo '-stat 2000 -dcache 800 -daemons 3 -volumes 70 -rootvol root.afs.local' > $PKGROOT/private/var/db/openafs/etc/config/afsd.options.sample strip -X -S $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs cp -RP $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.kext $PKGROOT/private/var/db/openafs/etc ! chown -R root.wheel $PKGROOT/private chmod -R og-w $PKGROOT/private chmod og-rx $PKGROOT/private/var/db/openafs/cache --- 90,111 ---- mkdir $PKGROOT/private/var/db/openafs/etc $PKGROOT/private/var/db/openafs/etc/config cp $RESSRC/CellServDB $PKGROOT/private/var/db/openafs/etc/CellServDB.master echo andrew.cmu.edu > $PKGROOT/private/var/db/openafs/etc/ThisCell.sample ! if [ $majorvers -ge 7 ]; then ! echo /afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample ! make AFSINCLUDE=$BINDEST/include ! cp afssettings $PKGROOT/private/var/db/openafs/etc/config ! cp settings.plist $PKGROOT/private/var/db/openafs/etc/config/settings.plist.orig ! make clean ! else ! echo /Network/afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample ! fi #echo '-stat 2000 -dcache 800 -daemons 3 -volumes 70 -rootvol root.afs.local' > $PKGROOT/private/var/db/openafs/etc/config/afsd.options.sample strip -X -S $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs cp -RP $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.kext $PKGROOT/private/var/db/openafs/etc ! chown -R root${SEP}wheel $PKGROOT/private chmod -R og-w $PKGROOT/private chmod og-rx $PKGROOT/private/var/db/openafs/cache *************** *** 102,127 **** ln -s ../../Library/OpenAFS/Tools/root.client/usr/vice/etc/afsd $PKGROOT/usr/sbin/afsd ! chown -R root.wheel $PKGROOT/usr chmod -R og-w $PKGROOT/usr ! cp License.rtf ReadMe.rtf OpenAFS.post_install OpenAFS.pre_upgrade $PKGRES ! cp OpenAFS.post_install $PKGRES/OpenAFS.post_upgrade ! chmod a+x $PKGRES/OpenAFS.post_install $PKGRES/OpenAFS.post_upgrade $PKGRES/OpenAFS.pre_upgrade cp csrvdbmerge.pl $PKGRES chmod a+x $PKGRES/csrvdbmerge.pl cp CellServDB.list $PKGRES ! chown -R root.wheel $PKGRES rm -rf OpenAFS.pkg ! echo /usr/bin/package $PKGROOT OpenAFS.info -r $PKGRES ! /usr/bin/package $PKGROOT OpenAFS.info -r $PKGRES ! #old versions of package didn't handle this properly ! if [ ! -r OpenAFS.pkg/Contents ]; then ! mkdir OpenAFS.pkg/Contents OpenAFS.pkg/Contents/Resources ! mv OpenAFS.pkg/OpenAFS.* OpenAFS.pkg/Contents/Resources ! mv OpenAFS.pkg/*.rtf OpenAFS.pkg/Contents/Resources ! mv OpenAFS.pkg/csrvdbmerge.pl OpenAFS.pkg/Contents/Resources ! mv OpenAFS.pkg/CellServDB* OpenAFS.pkg/Contents/Resources fi rm -rf pkgroot pkgres --- 123,163 ---- ln -s ../../Library/OpenAFS/Tools/root.client/usr/vice/etc/afsd $PKGROOT/usr/sbin/afsd ! chown -R root${SEP}wheel $PKGROOT/usr chmod -R og-w $PKGROOT/usr ! if [ $majorvers -ge 7 ]; then ! cp OpenAFS.post_install $PKGRES/postinstall ! cp OpenAFS.pre_upgrade $PKGRES/preupgrade ! cp OpenAFS.post_install $PKGRES/postupgrade ! chmod a+x $PKGRES/postinstall $PKGRES/postupgrade $PKGRES/preupgrade ! else ! cp OpenAFS.post_install OpenAFS.pre_upgrade $PKGRES ! cp OpenAFS.post_install $PKGRES/OpenAFS.post_upgrade ! chmod a+x $PKGRES/OpenAFS.post_install $PKGRES/OpenAFS.post_upgrade $PKGRES/OpenAFS.pre_upgrade ! fi ! cp License.rtf ReadMe.rtf $PKGRES cp csrvdbmerge.pl $PKGRES chmod a+x $PKGRES/csrvdbmerge.pl cp CellServDB.list $PKGRES ! chown -R root${SEP}wheel $PKGRES rm -rf OpenAFS.pkg ! if [ $majorvers -ge 7 ]; then ! echo $package -build -p $RESSRC/OpenAFS.pkg -f $PKGROOT -r $PKGRES \ ! -i OpenAFS.Info.plist -d OpenAFS.Description.plist ! $package -build -p $RESSRC/OpenAFS.pkg -f $PKGROOT -r $PKGRES \ ! -i OpenAFS.Info.plist -d OpenAFS.Description.plist ! else ! echo $package $PKGROOT OpenAFS.info -r $PKGRES ! $package $PKGROOT OpenAFS.info -r $PKGRES ! #old versions of package didn't handle this properly ! if [ ! -r OpenAFS.pkg/Contents ]; then ! mkdir OpenAFS.pkg/Contents OpenAFS.pkg/Contents/Resources ! mv OpenAFS.pkg/OpenAFS.* OpenAFS.pkg/Contents/Resources ! mv OpenAFS.pkg/*.rtf OpenAFS.pkg/Contents/Resources ! mv OpenAFS.pkg/csrvdbmerge.pl OpenAFS.pkg/Contents/Resources ! mv OpenAFS.pkg/CellServDB* OpenAFS.pkg/Contents/Resources ! fi fi rm -rf pkgroot pkgres Index: openafs/src/packaging/MacOS/settings.plist diff -c /dev/null openafs/src/packaging/MacOS/settings.plist:1.1.2.1 *** /dev/null Fri Oct 24 02:39:46 2003 --- openafs/src/packaging/MacOS/settings.plist Fri Oct 24 01:25:01 2003 *************** *** 0 **** --- 1,14 ---- + + + + + Darwin + + All + + RealModes + + + + + Index: openafs/src/ptserver/Makefile.in diff -c openafs/src/ptserver/Makefile.in:1.4.2.2 openafs/src/ptserver/Makefile.in:1.4.2.3 *** openafs/src/ptserver/Makefile.in:1.4.2.2 Mon Jul 7 16:16:36 2003 --- openafs/src/ptserver/Makefile.in Fri Oct 24 01:25:03 2003 *************** *** 4,9 **** --- 4,11 ---- # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html + # + # Portions Copyright (c) 2003 Apple Computer, Inc. DEST=@DEST@ TOP_INCDIR=@TOP_INCDIR@ TOP_LIBDIR=@TOP_LIBDIR@ *************** *** 132,138 **** testpt: testpt.o libprot.a ${TOP_LIBDIR}/libcmd.a $(LIBS) case "$(SYS_NAME)" in \ ! ppc_darwin_12 ) \ $(CC) ${CFLAGS} -o testpt testpt.o ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ;; \ * ) \ $(CC) ${CFLAGS} -o testpt testpt.o -lm ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ${XLIBS} ;; \ --- 134,140 ---- testpt: testpt.o libprot.a ${TOP_LIBDIR}/libcmd.a $(LIBS) case "$(SYS_NAME)" in \ ! *_darwin_12 ) \ $(CC) ${CFLAGS} -o testpt testpt.o ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ;; \ * ) \ $(CC) ${CFLAGS} -o testpt testpt.o -lm ${TOP_LIBDIR}/libcmd.a libprot.a $(LIBS) ${XLIBS} ;; \ Index: openafs/src/rxgen/rpc_scan.c diff -c openafs/src/rxgen/rpc_scan.c:1.6 openafs/src/rxgen/rpc_scan.c:1.6.2.1 *** openafs/src/rxgen/rpc_scan.c:1.6 Mon Aug 6 19:50:12 2001 --- openafs/src/rxgen/rpc_scan.c Fri Oct 24 01:25:04 2003 *************** *** 32,41 **** * rpc_scan.c, Scanner for the RPC protocol compiler * Copyright (C) 1987, Sun Microsystems, Inc. */ #include #include ! RCSID("$Header: /data/cvs/openafs/src/rxgen/rpc_scan.c,v 1.6 2001/08/06 23:50:12 shadow Exp $"); #include #include --- 32,43 ---- * rpc_scan.c, Scanner for the RPC protocol compiler * Copyright (C) 1987, Sun Microsystems, Inc. */ + + /* Portions Copyright (c) 2003 Apple Computer, Inc. */ #include #include ! RCSID("$Header: /data/cvs/openafs/src/rxgen/rpc_scan.c,v 1.6.2.1 2003/10/24 05:25:04 shadow Exp $"); #include #include *************** *** 208,213 **** --- 210,219 ---- if (commenting) { break; } else if (cppline(curline)) { + #if defined(AFS_DARWIN_ENV) + if (strncmp(curline, "#pragma", 7) == 0) + continue; + #endif /* defined(AFS_DARWIN_ENV) */ docppline(curline, &linenum, &infilename); } else if (directive(curline)) { Index: openafs/src/rxkad/Makefile.in diff -c openafs/src/rxkad/Makefile.in:1.4.2.6 openafs/src/rxkad/Makefile.in:1.4.2.7 *** openafs/src/rxkad/Makefile.in:1.4.2.6 Mon Jul 7 16:16:42 2003 --- openafs/src/rxkad/Makefile.in Fri Oct 24 01:25:06 2003 *************** *** 4,9 **** --- 4,11 ---- # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html + # + # Portions Copyright (c) 2003 Apple Computer, Inc. # */ *************** *** 37,43 **** INCLS=${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \ rxkad.h v5gen.h ! OBJS=rxkad_client.o rxkad_server.o rxkad_common.o ticket.o rxkad_errs.o \ fcrypt.o crypt_conn.o ticket.o ticket5.o crc.o fc_test_OBJS=fc_test.o --- 39,45 ---- INCLS=${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \ rxkad.h v5gen.h ! OBJS=rxkad_client.o rxkad_server.o rxkad_common.o rxkad_errs.o \ fcrypt.o crypt_conn.o ticket.o ticket5.o crc.o fc_test_OBJS=fc_test.o Index: openafs/src/shlibafsrpc/Makefile.in diff -c openafs/src/shlibafsrpc/Makefile.in:1.7.2.9 openafs/src/shlibafsrpc/Makefile.in:1.7.2.10 *** openafs/src/shlibafsrpc/Makefile.in:1.7.2.9 Mon Jan 13 18:47:22 2003 --- openafs/src/shlibafsrpc/Makefile.in Fri Oct 24 01:25:08 2003 *************** *** 9,14 **** --- 9,16 ---- # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html + # + # Portions Copyright (c) 2003 Apple Computer, Inc. # This is a pthread safe library containing rx, rxkad and des. *************** *** 276,282 **** # # $ what /opt/langtools/bin/pxdb32 # /opt/langtools/bin/pxdb32: ! # HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.7.2.9 $ # # The problem occurs when -g and -O are both used when compiling des.c. # The simplest way to work around the problem is to leave out either -g or -O. --- 278,284 ---- # # $ what /opt/langtools/bin/pxdb32 # /opt/langtools/bin/pxdb32: ! # HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.7.2.10 $ # # The problem occurs when -g and -O are both used when compiling des.c. # The simplest way to work around the problem is to leave out either -g or -O. *************** *** 355,361 **** /usr/ccs/lib/cpp ${SFLAGS} ${SYS}/syscall.s syscall.ss; \ as -o syscall.o syscall.ss; \ $(RM) syscall.ss;; \ ! sgi_* | ppc_darwin* ) \ ${CC} ${CFLAGS} -c ${SYS}/syscall.s;; \ alpha_dux?? ) \ ${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \ --- 357,363 ---- /usr/ccs/lib/cpp ${SFLAGS} ${SYS}/syscall.s syscall.ss; \ as -o syscall.o syscall.ss; \ $(RM) syscall.ss;; \ ! sgi_* | *_darwin_* ) \ ${CC} ${CFLAGS} -c ${SYS}/syscall.s;; \ alpha_dux?? ) \ ${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \ Index: openafs/src/sys/Makefile.in diff -c openafs/src/sys/Makefile.in:1.5.2.3 openafs/src/sys/Makefile.in:1.5.2.4 *** openafs/src/sys/Makefile.in:1.5.2.3 Mon Jul 7 16:16:46 2003 --- openafs/src/sys/Makefile.in Fri Oct 24 01:25:12 2003 *************** *** 4,9 **** --- 4,11 ---- # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html + # + # Portions Copyright (c) 2003 Apple Computer, Inc. # System calls. *************** *** 102,108 **** /usr/ccs/lib/cpp ${SFLAGS} syscall.s syscall.ss; \ as -o syscall.o syscall.ss; \ $(RM) syscall.ss;; \ ! sgi_* |ppc_darwin* ) \ ${CC} ${CFLAGS} -c syscall.s;; \ alpha_osf1 | alpha_osf20 | alpha_osf30 | alpha_osf32 | alpha_osf32c | alpha_dux?? ) \ ${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER syscall.s; \ --- 104,110 ---- /usr/ccs/lib/cpp ${SFLAGS} syscall.s syscall.ss; \ as -o syscall.o syscall.ss; \ $(RM) syscall.ss;; \ ! sgi_* |*_darwin_* ) \ ${CC} ${CFLAGS} -c syscall.s;; \ alpha_osf1 | alpha_osf20 | alpha_osf30 | alpha_osf32 | alpha_osf32c | alpha_dux?? ) \ ${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER syscall.s; \ Index: openafs/src/tviced/Makefile.in diff -c openafs/src/tviced/Makefile.in:1.4.2.1 openafs/src/tviced/Makefile.in:1.4.2.2 *** openafs/src/tviced/Makefile.in:1.4.2.1 Fri Jan 31 16:09:09 2003 --- openafs/src/tviced/Makefile.in Fri Oct 24 01:25:14 2003 *************** *** 4,9 **** --- 4,11 ---- # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html + # + # Portions Copyright (c) 2003 Apple Computer, Inc. DEST=@DEST@ TOP_INCDIR=@TOP_INCDIR@ *************** *** 55,61 **** DIROBJS=buffer.o dir.o salvage.o VOLOBJS= vnode.o volume.o vutil.o partition.o fssync.o purge.o \ ! clone.o devname.o common.o ihandle.o listinodes.o namei_ops.o FSINTOBJS= afsaux.o afscbint.cs.o afsint.ss.o afsint.xdr.o --- 57,64 ---- DIROBJS=buffer.o dir.o salvage.o VOLOBJS= vnode.o volume.o vutil.o partition.o fssync.o purge.o \ ! clone.o devname.o common.o ihandle.o listinodes.o namei_ops.o \ ! ${EXTRA_VLIBOBJS} FSINTOBJS= afsaux.o afscbint.cs.o afsint.ss.o afsint.xdr.o *************** *** 165,170 **** --- 168,177 ---- ${COMPILE} devname.o: ${VOL}/devname.c + ${COMPILE} + + # only for darwin + fstab.o: ${VOL}/fstab.c ${COMPILE} common.o: ${VOL}/common.c Index: openafs/src/util/flipbase64.c diff -c openafs/src/util/flipbase64.c:1.8 openafs/src/util/flipbase64.c:1.8.4.1 *** openafs/src/util/flipbase64.c:1.8 Thu Jul 12 15:59:23 2001 --- openafs/src/util/flipbase64.c Fri Oct 24 01:25:16 2003 *************** *** 5,16 **** * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html */ #include #include ! RCSID("$Header: /data/cvs/openafs/src/util/flipbase64.c,v 1.8 2001/07/12 19:59:23 shadow Exp $"); #if defined(AFS_NAMEI_ENV) --- 5,18 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ #include #include ! RCSID("$Header: /data/cvs/openafs/src/util/flipbase64.c,v 1.8.4.1 2003/10/24 05:25:16 shadow Exp $"); #if defined(AFS_NAMEI_ENV) *************** *** 22,30 **** --- 24,76 ---- */ /* This table needs to be in lexical order to efficiently map back from * characters to the numerical value. + * + * In c_reverse, we use 99 to represent an illegal value, rather than -1 + * which would assume "char" is signed. */ + #ifdef AFS_DARWIN_ENV + static char c_xlate[80] = + "!\"#$%&()*+,-0123456789:;<=>?@[]^_`abcdefghijklmnopqrstuvwxyz{|}~"; + static char c_reverse[] = { + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 0, 1, 2, 3, 4, 5, 99, 6, 7, 8, 9, 10, 11, 99, 99, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 29, 99, 30, 31, 32, + 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99 + }; + #else /* AFS_DARWIN_ENV */ static char c_xlate[80] = "+=0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + static char c_reverse[] = { + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 0, 99, 99, 99, 99, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 99, 99, 99, 1, 99, 99, + 99, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 99, 99, 99, 99, 99, + 99, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99 + }; + #endif /* AFS_DARWIN_ENV */ /* int_to_base64 * Create a base 64 string representation of a number. *************** *** 57,63 **** } - /* Mapping: +=0, ==1, 0-9 = 2-11, A-Z = 12-37, a-z = 38-63 */ #ifdef AFS_64BIT_ENV afs_int64 flipbase64_to_int64(char *s) #else --- 103,108 ---- *************** *** 73,92 **** #endif int shift; ! for (shift = 0; *s; s++, shift += 6) { ! if (*s == '+') n = 0; ! else if (*s == '=') n = 1; ! else if (*s <= '9') { ! n = 2 + (int)(*s - '0'); ! } ! else if (*s <= 'Z') { ! n = 12 + (int)(*s - 'A'); ! } ! else if (*s <= 'z') { ! n = 38 + (int)(*s - 'a'); ! } n <<= shift; result |= n ; } return result; } --- 118,130 ---- #endif int shift; ! for (shift = 0; *s; s++) { ! n = c_reverse[*(unsigned char *)s]; ! if (n >= 64) /* should never happen */ ! continue; n <<= shift; result |= n ; + shift += 6; } return result; } Index: openafs/src/util/softsig.c diff -c openafs/src/util/softsig.c:1.1.2.2 openafs/src/util/softsig.c:1.1.2.3 *** openafs/src/util/softsig.c:1.1.2.2 Mon Jun 2 18:49:01 2003 --- openafs/src/util/softsig.c Fri Oct 24 01:25:16 2003 *************** *** 5,12 **** --- 5,17 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ + #include + #include + #define _POSIX_PTHREAD_SEMANTICS #include #include *************** *** 16,26 **** --- 21,39 ---- #include "pthread_nosigs.h" + /*------------------------------------------------------------------------ + * Under Darwin 6.x (including 7.0), sigwait() is broken, so we use + * sigsuspend() instead. We also don't block signals we don't know + * about, so they should kill us, rather than us returning zero status. + *------------------------------------------------------------------------*/ + static pthread_t softsig_tid; static struct { void (*handler) (int); int pending; + #if !defined(AFS_DARWIN60_ENV) int fatal; + #endif /* !defined(AFS_DARWIN60_ENV) */ int inited; } softsig_sigs[NSIG]; *************** *** 35,46 **** --- 48,64 ---- pthread_sigmask (SIG_BLOCK, &ss, &os); pthread_sigmask (SIG_SETMASK, &os, NULL); sigaddset (&ss, SIGUSR1); + #if defined(AFS_DARWIN60_ENV) + pthread_sigmask (SIG_BLOCK, &ss, NULL); + sigdelset (&os, SIGUSR1); + #else /* !defined(AFS_DARWIN60_ENV) */ for (i = 0; i < NSIG; i++) { if (!sigismember(&os, i) && i != SIGSTOP && i != SIGKILL) { sigaddset(&ss, i); softsig_sigs[i].fatal = 1; } } + #endif /* defined(AFS_DARWIN60_ENV) */ while (1) { void (*h) (int) = NULL; *************** *** 51,56 **** --- 69,78 ---- for (i = 0; i < NSIG; i++) { if (softsig_sigs[i].handler && !softsig_sigs[i].inited) { sigaddset(&ss, i); + #if defined(AFS_DARWIN60_ENV) + pthread_sigmask (SIG_BLOCK, &ss, NULL); + sigdelset (&os, i); + #endif /* defined(AFS_DARWIN60_ENV) */ softsig_sigs[i].inited = 1; } if (softsig_sigs[i].pending) { *************** *** 60,76 **** --- 82,110 ---- } } if (i == NSIG) { + #if defined(AFS_DARWIN60_ENV) + sigsuspend (&os); + #else /* !defined(AFS_DARWIN60_ENV) */ sigwait (&ss, &sigw); if (sigw != SIGUSR1) { if (softsig_sigs[sigw].fatal) exit(0); softsig_sigs[sigw].pending=1; } + #endif /* defined(AFS_DARWIN60_ENV) */ } else if (h) h (i); } } + #if defined(AFS_DARWIN60_ENV) + static void + softsig_usr1 (int signo) + { + signal (SIGUSR1, softsig_usr1); + } + #endif /* defined(AFS_DARWIN60_ENV) */ + void softsig_init () { *************** *** 80,85 **** --- 114,122 ---- rc = pthread_create (&softsig_tid, NULL, &softsig_thread, NULL); assert(0 == rc); AFS_SIGSET_RESTORE(); + #if defined(AFS_DARWIN60_ENV) + signal (SIGUSR1, softsig_usr1); + #endif /* defined(AFS_DARWIN60_ENV) */ } static void Index: openafs/src/viced/Makefile.in diff -c openafs/src/viced/Makefile.in:1.4.2.1 openafs/src/viced/Makefile.in:1.4.2.2 *** openafs/src/viced/Makefile.in:1.4.2.1 Mon Jan 13 18:47:24 2003 --- openafs/src/viced/Makefile.in Fri Oct 24 01:25:18 2003 *************** *** 4,9 **** --- 4,11 ---- # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html + # + # Portions Copyright (c) 2003 Apple Computer, Inc. DEST=@DEST@ TOP_INCDIR=@TOP_INCDIR@ *************** *** 109,114 **** --- 111,121 ---- @case ${SYS_NAME} in \ alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun*) \ echo "Don't install fileserver for ${SYS_NAME}" ;; \ + *_darwin_[1-6][0-9]) \ + echo ${INSTALL} -ns $? $@ ; \ + ${INSTALL} -ns $? $@ ;; \ + *_darwin_*) \ + echo "Don't install fileserver for ${SYS_NAME}" ;; \ *) \ echo ${INSTALL} -ns $? $@ ; \ ${INSTALL} -ns $? $@ ;; \ *************** *** 126,131 **** --- 133,143 ---- ${DESTDIR}${afssrvlibexecdir}/fileserver: fileserver @case ${SYS_NAME} in \ alpha_dux4*|*linux*|rs_aix*|sgi_6*|sun*) \ + echo "Don't install fileserver for ${SYS_NAME}" ;; \ + *_darwin_[1-6][0-9]) \ + echo ${INSTALL} -ns $? $@ ; \ + ${INSTALL} -ns $? $@ ;; \ + *_darwin_*) \ echo "Don't install fileserver for ${SYS_NAME}" ;; \ *) \ echo ${INSTALL} -ns $? $@ ; \ Index: openafs/src/viced/viced.c diff -c openafs/src/viced/viced.c:1.11.2.10 openafs/src/viced/viced.c:1.11.2.11 *** openafs/src/viced/viced.c:1.11.2.10 Fri May 23 02:52:36 2003 --- openafs/src/viced/viced.c Tue Aug 5 22:58:43 2003 *************** *** 19,25 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/viced/viced.c,v 1.11.2.10 2003/05/23 06:52:36 shadow Exp $"); #include #include --- 19,25 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/viced/viced.c,v 1.11.2.11 2003/08/06 02:58:43 zacheiss Exp $"); #include #include *************** *** 209,215 **** #ifdef AFS_PTHREAD_ENV void CheckSignal_Signal(x) {CheckSignal(0);} void ShutDown_Signal(x) {ShutDown(0);} ! void CheckDescriptors_Signal(x) {CheckDescriptors(0);} #else /* AFS_PTHREAD_ENV */ void CheckSignal_Signal(x) {IOMGR_SoftSig(CheckSignal, 0);} void ShutDown_Signal(x) {IOMGR_SoftSig(ShutDown, 0);} --- 209,215 ---- #ifdef AFS_PTHREAD_ENV void CheckSignal_Signal(x) {CheckSignal(0);} void ShutDown_Signal(x) {ShutDown(0);} ! void CheckDescriptors_Signal(x) {CheckDescriptors();} #else /* AFS_PTHREAD_ENV */ void CheckSignal_Signal(x) {IOMGR_SoftSig(CheckSignal, 0);} void ShutDown_Signal(x) {IOMGR_SoftSig(ShutDown, 0);} Index: openafs/src/vol/Makefile.in diff -c openafs/src/vol/Makefile.in:1.5.2.2 openafs/src/vol/Makefile.in:1.5.2.3 *** openafs/src/vol/Makefile.in:1.5.2.2 Sun Jan 20 03:27:59 2002 --- openafs/src/vol/Makefile.in Fri Oct 24 01:25:21 2003 *************** *** 4,9 **** --- 4,11 ---- # This software has been released under the terms of the IBM Public # License. For details, see the LICENSE file in the top-level source # directory or online at http://www.openafs.org/dl/license10.html + # + # Portions Copyright (c) 2003 Apple Computer, Inc. DEST=@DEST@ TOP_INCDIR=@TOP_INCDIR@ *************** *** 42,48 **** VLIBOBJS=vnode.o volume.o vutil.o partition.o fssync.o purge.o \ clone.o nuke.o devname.o listinodes.o common.o ihandle.o \ ! namei_ops.o OBJECTS=${VLIBOBJS} physio.o vol-salvage.o vol-info.o --- 44,50 ---- VLIBOBJS=vnode.o volume.o vutil.o partition.o fssync.o purge.o \ clone.o nuke.o devname.o listinodes.o common.o ihandle.o \ ! namei_ops.o ${EXTRA_VLIBOBJS} OBJECTS=${VLIBOBJS} physio.o vol-salvage.o vol-info.o Index: openafs/src/vol/fstab.c diff -c /dev/null openafs/src/vol/fstab.c:1.1.2.1 *** /dev/null Fri Oct 24 02:39:55 2003 --- openafs/src/vol/fstab.c Fri Oct 24 02:24:02 2003 *************** *** 0 **** --- 1,179 ---- + /* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + /* + * Copyright (c) 1980, 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + #if defined(AFS_DARWIN_ENV) + /*----------------------------------------------------------------------- + * This version of fstab.c is intended to be used on Darwin systems to + * replace getfsent() and family. It has been modified so that rather + * than read /etc/fstab, it calls getfsstat() to get the real list of + * mounted volumes. + *-----------------------------------------------------------------------*/ + + #include + #include + #include + #include + #include + #include + #include + #include + + #define STDERR_FILENO 2 + + static struct fstab _fs_fstab; + static struct statfs *_fs_buf; + static struct statfs *_fs_ptr; + static int _fs_count; + + static error __P((int)); + static fstabscan __P((void)); + + static + fstabscan() + { + if(_fs_count <= 0) + return(0); + _fs_fstab.fs_spec = _fs_ptr->f_mntfromname; + _fs_fstab.fs_file = _fs_ptr->f_mntonname; + _fs_fstab.fs_vfstype = _fs_ptr->f_fstypename; + _fs_fstab.fs_mntops = _fs_ptr->f_fstypename; // no mount options given + _fs_fstab.fs_type = (_fs_ptr->f_flags & MNT_RDONLY) ? FSTAB_RO : FSTAB_RW; + _fs_fstab.fs_freq = 0; + _fs_fstab.fs_passno = 0; + + _fs_ptr++; + _fs_count--; + return(1); + } + + struct fstab * + getfsent() + { + if (!_fs_buf && !setfsent() || !fstabscan()) + return((struct fstab *)NULL); + return(&_fs_fstab); + } + + struct fstab * + getfsspec(name) + register const char *name; + { + if (setfsent()) + while (fstabscan()) + if (!strcmp(_fs_fstab.fs_spec, name)) + return(&_fs_fstab); + return((struct fstab *)NULL); + } + + struct fstab * + getfsfile(name) + register const char *name; + { + if (setfsent()) + while (fstabscan()) + if (!strcmp(_fs_fstab.fs_file, name)) + return(&_fs_fstab); + return((struct fstab *)NULL); + } + + setfsent() + { + long bufsize; + + if (_fs_buf) { + free(_fs_buf); + _fs_buf = NULL; + } + if((_fs_count = getfsstat(NULL, 0, MNT_WAIT)) < 0) { + error(errno); + return(0); + } + bufsize = (long)_fs_count * sizeof(struct statfs); + if((_fs_buf = malloc(bufsize)) == NULL) { + error(errno); + return(0); + } + if(getfsstat(_fs_buf, bufsize, MNT_WAIT) < 0) { + error(errno); + return(0); + } + _fs_ptr = _fs_buf; + return(1); + } + + void + endfsent() + { + if (_fs_buf) { + free(_fs_buf); + _fs_buf = NULL; + } + _fs_count = 0; + } + + static + error(err) + int err; + { + char *p; + + (void)write(STDERR_FILENO, "fstab: ", 7); + (void)write(STDERR_FILENO, _PATH_FSTAB, sizeof(_PATH_FSTAB) - 1); + (void)write(STDERR_FILENO, ": ", 1); + p = strerror(err); + (void)write(STDERR_FILENO, p, strlen(p)); + (void)write(STDERR_FILENO, "\n", 1); + } + #endif /* defined(AFS_DARWIN_ENV) */ Index: openafs/src/vol/partition.c diff -c openafs/src/vol/partition.c:1.11.4.8 openafs/src/vol/partition.c:1.11.4.9 *** openafs/src/vol/partition.c:1.11.4.8 Sat Jan 11 02:42:39 2003 --- openafs/src/vol/partition.c Fri Oct 24 01:25:21 2003 *************** *** 5,10 **** --- 5,12 ---- * This software has been released under the terms of the IBM Public * License. For details, see the LICENSE file in the top-level source * directory or online at http://www.openafs.org/dl/license10.html + * + * Portions Copyright (c) 2003 Apple Computer, Inc. */ /* *************** *** 18,24 **** #include #include ! RCSID("$Header: /data/cvs/openafs/src/vol/partition.c,v 1.11.4.8 2003/01/11 07:42:39 shadow Exp $"); #include #ifdef AFS_NT40_ENV --- 20,26 ---- #include #include ! RCSID("$Header: /data/cvs/openafs/src/vol/partition.c,v 1.11.4.9 2003/10/24 05:25:21 shadow Exp $"); #include #ifdef AFS_NT40_ENV *************** *** 1033,1038 **** --- 1035,1043 ---- unsigned int *globalMask; int globalMaskIndex; #endif /* defined(AFS_HPUX_ENV) */ + #if defined(AFS_DARWIN_ENV) + char lockfile[MAXPATHLEN]; + #endif /* defined(AFS_DARWIN_ENV) */ if (!dp) return; /* no partition, will fail later */ if (dp->lock_fd != -1) return; *************** *** 1040,1052 **** --- 1045,1065 ---- #if defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) partitionName = dp->devName; code = O_RDWR; + #elif defined(AFS_DARWIN_ENV) + strlcpy((partitionName = lockfile), dp->name, sizeof(lockfile)); + strlcat(lockfile, "/.lock.afs", sizeof(lockfile)); + code = O_RDONLY | O_CREAT; #else partitionName = dp->name; code = O_RDONLY; #endif for (retries=25; retries; retries--) { + #if defined(AFS_DARWIN_ENV) + dp->lock_fd = open(partitionName, code, 0600); + #else /* ! defined(AFS_DARWIN_ENV) */ dp->lock_fd = open(partitionName, code); + #endif /* defined(AFS_DARWIN_ENV) */ if (dp->lock_fd != -1) break; pausing.tv_sec = 0; pausing.tv_usec = 500000;