From eb921f91efa4e180767e5f2c72f0f5f40326ce45 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Sat, 10 Jan 2004 20:58:11 +0000 Subject: [PATCH] This commit was generated by cvs2svn to compensate for changes in r634, which included commits to RCS files with non-trunk default branches. --- configure-libafs.in | 2 +- src/afs/DARWIN/osi_vfsops.c | 42 ++++++++- src/afs/DARWIN/osi_vnodeops.c | 49 +++++++++- src/afs/VNOPS/afs_vnop_attrs.c | 42 ++++++--- src/afs/afs_segments.c | 2 +- src/afsd/Makefile.in | 6 +- src/afsd/afs.rc.darwin | 10 ++ src/butc/Makefile.in | 12 +++ src/butc/lwps.c | 4 +- src/cf/ressearch.m4 | 3 +- src/config/afs_sysnames.h | 3 + src/libadmin/samples/cm_client_config.c | 10 +- src/libadmin/samples/cm_list_cells.c | 10 +- src/libadmin/samples/cm_local_cell.c | 10 +- src/libadmin/samples/cm_server_prefs.c | 10 +- src/libadmin/samples/rxdebug_basic_stats.c | 10 +- src/libadmin/samples/rxdebug_conns.c | 10 +- src/libadmin/samples/rxdebug_peers.c | 10 +- src/libadmin/samples/rxdebug_rx_stats.c | 10 +- .../samples/rxdebug_supported_stats.c | 10 +- src/libadmin/samples/rxdebug_version.c | 10 +- src/libadmin/samples/rxstat_clear_peer.c | 10 +- src/libadmin/samples/rxstat_clear_process.c | 10 +- src/libadmin/samples/rxstat_disable_peer.c | 10 +- src/libadmin/samples/rxstat_disable_process.c | 10 +- src/libadmin/samples/rxstat_enable_peer.c | 10 +- src/libadmin/samples/rxstat_enable_process.c | 10 +- src/libadmin/samples/rxstat_get_peer.c | 11 ++- src/libadmin/samples/rxstat_get_process.c | 11 ++- src/libadmin/samples/rxstat_get_version.c | 10 +- src/libadmin/samples/rxstat_query_peer.c | 10 +- src/libadmin/samples/rxstat_query_process.c | 10 +- src/libadmin/test/afscp.c | 9 +- src/libafs/MakefileProto.DARWIN.in | 5 +- src/libafsrpc/Makefile.in | 6 +- src/packaging/MacOS/OpenAFS.post_install | 30 +++++- src/packaging/MacOS/buildpkg.sh | 94 +++++++++++++------ src/rxgen/rpc_scan.c | 8 +- src/shlibafsrpc/Makefile.in | 6 +- src/tviced/Makefile.in | 9 +- src/ubik/beacon.c | 4 +- src/util/flipbase64.c | 66 ++++++++++--- src/util/softsig.c | 37 ++++++++ src/viced/Makefile.in | 12 +++ src/viced/viced.c | 4 +- src/vol/Makefile.in | 4 +- src/volser/volprocs.c | 5 +- 47 files changed, 576 insertions(+), 110 deletions(-) diff --git a/configure-libafs.in b/configure-libafs.in index d7149a9aa..813cfd5f2 100644 --- a/configure-libafs.in +++ b/configure-libafs.in @@ -1,5 +1,5 @@ AC_INIT(Makefile.common) -AM_INIT_AUTOMAKE(openafs-libafs,1.2.10) +AM_INIT_AUTOMAKE(openafs-libafs,1.2.11) AC_CONFIG_HEADER(config/afsconfig.h) define(OPENAFS_CONFIGURE_LIBAFS) diff --git a/src/afs/DARWIN/osi_vfsops.c b/src/afs/DARWIN/osi_vfsops.c index e42887df8..f62d31f30 100644 --- a/src/afs/DARWIN/osi_vfsops.c +++ b/src/afs/DARWIN/osi_vfsops.c @@ -1,7 +1,10 @@ +/* + * Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + */ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/afs/DARWIN/osi_vfsops.c,v 1.1.1.6 2003/07/30 17:08:05 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/afs/DARWIN/osi_vfsops.c,v 1.1.1.7 2004/01/10 20:52:50 hartmans Exp $"); #include /* Standard vendor system headers */ #include /* Afs-based standard headers */ @@ -10,6 +13,8 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/afs/DARWIN/osi_vfsops.c,v 1.1.1.6 2003/ #include #include #include +#include +#include "../afs/sysctl.h" struct vcache *afs_globalVp = 0; struct mount *afs_globalVFS = 0; @@ -275,8 +280,39 @@ struct prioc *p; return 0; } -int afs_sysctl() { - return EOPNOTSUPP; +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; } diff --git a/src/afs/DARWIN/osi_vnodeops.c b/src/afs/DARWIN/osi_vnodeops.c index f32d0047b..18cca9b80 100644 --- a/src/afs/DARWIN/osi_vnodeops.c +++ b/src/afs/DARWIN/osi_vnodeops.c @@ -1,7 +1,10 @@ +/* + * Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved. + */ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.1.1.9 2003/07/30 17:08:05 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.1.1.10 2004/01/10 20:52:51 hartmans Exp $"); #include /* Standard vendor system headers */ #include /* Afs-based standard headers */ @@ -9,6 +12,9 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.1.1.9 200 #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,7 +41,9 @@ int afs_vop_rmdir(struct vop_rmdir_args *); 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,9 +97,13 @@ struct vnodeopv_entry_desc afs_vnodeop_entries[] = { { &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,17 +289,37 @@ afs_vop_open(ap) } */ *ap; { int error; - struct vcache *vc = VTOAFS(ap->a_vp); + 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) != ap->a_vp) + 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,6 +1313,17 @@ afs_vop_pathconf(ap) 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; } diff --git a/src/afs/VNOPS/afs_vnop_attrs.c b/src/afs/VNOPS/afs_vnop_attrs.c index 65e3349d0..f6c00f2b1 100644 --- a/src/afs/VNOPS/afs_vnop_attrs.c +++ b/src/afs/VNOPS/afs_vnop_attrs.c @@ -5,6 +5,8 @@ * 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,7 +23,7 @@ #include #include "../afs/param.h" -RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_attrs.c,v 1.1.1.12 2003/07/30 17:08:13 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/afs/VNOPS/afs_vnop_attrs.c,v 1.1.1.13 2004/01/10 20:52:57 hartmans Exp $"); #include "../afs/sysincludes.h" /* Standard vendor system headers */ #include "../afs/afsincludes.h" /* Afs-based standard headers */ @@ -68,20 +70,26 @@ afs_CopyOutAttrs(avc, attrs) 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); + { + 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,7 +104,11 @@ afs_CopyOutAttrs(avc, attrs) #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 */ diff --git a/src/afs/afs_segments.c b/src/afs/afs_segments.c index 3c05d4fef..5140df4d3 100644 --- a/src/afs/afs_segments.c +++ b/src/afs/afs_segments.c @@ -13,7 +13,7 @@ #include #include "../afs/param.h" -RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_segments.c,v 1.1.1.7 2002/06/10 11:39:56 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/afs/afs_segments.c,v 1.1.1.8 2004/01/10 20:52:47 hartmans Exp $"); #include "../afs/sysincludes.h" /*Standard vendor system headers*/ #include "../afs/afsincludes.h" /*AFS-based standard headers*/ diff --git a/src/afsd/Makefile.in b/src/afsd/Makefile.in index 1a628cf90..53424ab2f 100644 --- a/src/afsd/Makefile.in +++ b/src/afsd/Makefile.in @@ -5,6 +5,8 @@ # 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,7 +54,7 @@ afsd: afsd.o $(AFSLIBS) ${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* ) \ + *_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,7 +126,7 @@ dest: ${DEST}/root.client/usr/vice/etc/afsd ${DEST}/etc/vsys *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*) \ + *_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*) \ diff --git a/src/afsd/afs.rc.darwin b/src/afsd/afs.rc.darwin index ed95303ab..269734e11 100644 --- a/src/afsd/afs.rc.darwin +++ b/src/afsd/afs.rc.darwin @@ -5,6 +5,8 @@ # 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 @@ -101,6 +103,14 @@ done 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 # diff --git a/src/butc/Makefile.in b/src/butc/Makefile.in index a937b8fb4..b4316e81f 100644 --- a/src/butc/Makefile.in +++ b/src/butc/Makefile.in @@ -4,6 +4,8 @@ # 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,6 +111,11 @@ install: @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 ;; \ @@ -120,6 +127,11 @@ 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 ; \ ${INSTALL} butc ${DEST}/etc/butc ;; \ diff --git a/src/butc/lwps.c b/src/butc/lwps.c index d20a11780..5b204f622 100644 --- a/src/butc/lwps.c +++ b/src/butc/lwps.c @@ -10,7 +10,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/butc/lwps.c,v 1.1.1.5 2001/09/11 14:31:48 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/butc/lwps.c,v 1.1.1.6 2004/01/10 20:56:07 hartmans Exp $"); #include #ifdef AFS_NT40_ENV @@ -743,7 +743,7 @@ afs_int32 PromptForTape(flag, name, dbDumpId, taskId, tapecount) if ( time(0) > start+BELLTIME ) { start = time(0); - FFlushInput(stdin); + FFlushInput(); putchar(BELLCHAR); fflush(stdout); } diff --git a/src/cf/ressearch.m4 b/src/cf/ressearch.m4 index 2094a4f21..53e237dd1 100644 --- a/src/cf/ressearch.m4 +++ b/src/cf/ressearch.m4 @@ -15,7 +15,6 @@ res_init(); */ r = res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans)); return 0; -res_close(); ], ac_cv_func_res_search=yes) -]) \ No newline at end of file +]) diff --git a/src/config/afs_sysnames.h b/src/config/afs_sysnames.h index 330204aa0..97d00a6ec 100644 --- a/src/config/afs_sysnames.h +++ b/src/config/afs_sysnames.h @@ -5,6 +5,8 @@ * 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,6 +60,7 @@ #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 diff --git a/src/libadmin/samples/cm_client_config.c b/src/libadmin/samples/cm_client_config.c index 5427a4712..0424aa03f 100644 --- a/src/libadmin/samples/cm_client_config.c +++ b/src/libadmin/samples/cm_client_config.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/cm_client_config.c,v 1.1.1.4 2001/07/14 22:22:34 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/cm_client_config.c,v 1.1.1.5 2004/01/10 20:56:45 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/cm_client_config.c,v 1 #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() { fprintf(stderr, diff --git a/src/libadmin/samples/cm_list_cells.c b/src/libadmin/samples/cm_list_cells.c index 30eaf6aa8..27fb1e655 100644 --- a/src/libadmin/samples/cm_list_cells.c +++ b/src/libadmin/samples/cm_list_cells.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/cm_list_cells.c,v 1.1.1.4 2001/07/14 22:22:33 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/cm_list_cells.c,v 1.1.1.5 2004/01/10 20:56:45 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/cm_list_cells.c,v 1.1. #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() { fprintf(stderr, diff --git a/src/libadmin/samples/cm_local_cell.c b/src/libadmin/samples/cm_local_cell.c index f2ce12221..f19fec9dd 100644 --- a/src/libadmin/samples/cm_local_cell.c +++ b/src/libadmin/samples/cm_local_cell.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/cm_local_cell.c,v 1.1.1.4 2001/07/14 22:22:35 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/cm_local_cell.c,v 1.1.1.5 2004/01/10 20:56:46 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/cm_local_cell.c,v 1.1. #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() { fprintf(stderr, diff --git a/src/libadmin/samples/cm_server_prefs.c b/src/libadmin/samples/cm_server_prefs.c index 7ec53a596..77264cd45 100644 --- a/src/libadmin/samples/cm_server_prefs.c +++ b/src/libadmin/samples/cm_server_prefs.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/cm_server_prefs.c,v 1.1.1.4 2001/07/14 22:22:35 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/cm_server_prefs.c,v 1.1.1.5 2004/01/10 20:56:46 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/cm_server_prefs.c,v 1. #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() { fprintf(stderr, diff --git a/src/libadmin/samples/rxdebug_basic_stats.c b/src/libadmin/samples/rxdebug_basic_stats.c index ad2d55338..60834746b 100644 --- a/src/libadmin/samples/rxdebug_basic_stats.c +++ b/src/libadmin/samples/rxdebug_basic_stats.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_basic_stats.c,v 1.1.1.4 2001/07/14 22:22:35 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_basic_stats.c,v 1.1.1.5 2004/01/10 20:56:46 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_basic_stats.c, #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() { fprintf(stderr, diff --git a/src/libadmin/samples/rxdebug_conns.c b/src/libadmin/samples/rxdebug_conns.c index c54058b89..7b63923f0 100644 --- a/src/libadmin/samples/rxdebug_conns.c +++ b/src/libadmin/samples/rxdebug_conns.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_conns.c,v 1.1.1.4 2001/07/14 22:22:35 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_conns.c,v 1.1.1.5 2004/01/10 20:56:46 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_conns.c,v 1.1. #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() { fprintf(stderr, diff --git a/src/libadmin/samples/rxdebug_peers.c b/src/libadmin/samples/rxdebug_peers.c index 14d4f0efc..7a6f09d82 100644 --- a/src/libadmin/samples/rxdebug_peers.c +++ b/src/libadmin/samples/rxdebug_peers.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_peers.c,v 1.1.1.4 2001/07/14 22:22:35 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_peers.c,v 1.1.1.5 2004/01/10 20:56:46 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_peers.c,v 1.1. #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() { fprintf(stderr, diff --git a/src/libadmin/samples/rxdebug_rx_stats.c b/src/libadmin/samples/rxdebug_rx_stats.c index 5b270511d..f3a2f378a 100644 --- a/src/libadmin/samples/rxdebug_rx_stats.c +++ b/src/libadmin/samples/rxdebug_rx_stats.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_rx_stats.c,v 1.1.1.4 2001/07/14 22:22:36 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_rx_stats.c,v 1.1.1.5 2004/01/10 20:56:46 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_rx_stats.c,v 1 #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() { fprintf(stderr, diff --git a/src/libadmin/samples/rxdebug_supported_stats.c b/src/libadmin/samples/rxdebug_supported_stats.c index d7356d2ff..9795aca61 100644 --- a/src/libadmin/samples/rxdebug_supported_stats.c +++ b/src/libadmin/samples/rxdebug_supported_stats.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_supported_stats.c,v 1.1.1.4 2001/07/14 22:22:36 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_supported_stats.c,v 1.1.1.5 2004/01/10 20:56:46 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_supported_stat #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() { fprintf(stderr, diff --git a/src/libadmin/samples/rxdebug_version.c b/src/libadmin/samples/rxdebug_version.c index 08a4d9b60..4cae3ce44 100644 --- a/src/libadmin/samples/rxdebug_version.c +++ b/src/libadmin/samples/rxdebug_version.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_version.c,v 1.1.1.4 2001/07/14 22:22:36 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_version.c,v 1.1.1.5 2004/01/10 20:56:46 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxdebug_version.c,v 1. #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() { fprintf(stderr, diff --git a/src/libadmin/samples/rxstat_clear_peer.c b/src/libadmin/samples/rxstat_clear_peer.c index 4e3465b17..733b3a217 100644 --- a/src/libadmin/samples/rxstat_clear_peer.c +++ b/src/libadmin/samples/rxstat_clear_peer.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_clear_peer.c,v 1.1.1.4 2001/07/14 22:22:36 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_clear_peer.c,v 1.1.1.5 2004/01/10 20:56:46 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_clear_peer.c,v #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(); void Usage() diff --git a/src/libadmin/samples/rxstat_clear_process.c b/src/libadmin/samples/rxstat_clear_process.c index 667561bca..ac58af3b2 100644 --- a/src/libadmin/samples/rxstat_clear_process.c +++ b/src/libadmin/samples/rxstat_clear_process.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_clear_process.c,v 1.1.1.4 2001/07/14 22:22:36 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_clear_process.c,v 1.1.1.5 2004/01/10 20:56:46 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_clear_process.c #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(); void Usage() diff --git a/src/libadmin/samples/rxstat_disable_peer.c b/src/libadmin/samples/rxstat_disable_peer.c index 1a23b7020..a63903435 100644 --- a/src/libadmin/samples/rxstat_disable_peer.c +++ b/src/libadmin/samples/rxstat_disable_peer.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_disable_peer.c,v 1.1.1.4 2001/07/14 22:22:37 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_disable_peer.c,v 1.1.1.5 2004/01/10 20:56:46 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_disable_peer.c, #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(); void Usage() diff --git a/src/libadmin/samples/rxstat_disable_process.c b/src/libadmin/samples/rxstat_disable_process.c index caf7c8aad..2e42a329e 100644 --- a/src/libadmin/samples/rxstat_disable_process.c +++ b/src/libadmin/samples/rxstat_disable_process.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_disable_process.c,v 1.1.1.4 2001/07/14 22:22:37 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_disable_process.c,v 1.1.1.5 2004/01/10 20:56:47 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_disable_process #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(); void Usage() diff --git a/src/libadmin/samples/rxstat_enable_peer.c b/src/libadmin/samples/rxstat_enable_peer.c index 7d7f72d04..2b42ec55a 100644 --- a/src/libadmin/samples/rxstat_enable_peer.c +++ b/src/libadmin/samples/rxstat_enable_peer.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_enable_peer.c,v 1.1.1.4 2001/07/14 22:22:37 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_enable_peer.c,v 1.1.1.5 2004/01/10 20:56:47 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_enable_peer.c,v #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(); void Usage() diff --git a/src/libadmin/samples/rxstat_enable_process.c b/src/libadmin/samples/rxstat_enable_process.c index 9dec42971..fbdcd5322 100644 --- a/src/libadmin/samples/rxstat_enable_process.c +++ b/src/libadmin/samples/rxstat_enable_process.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_enable_process.c,v 1.1.1.4 2001/07/14 22:22:37 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_enable_process.c,v 1.1.1.5 2004/01/10 20:56:47 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_enable_process. #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(); void Usage() diff --git a/src/libadmin/samples/rxstat_get_peer.c b/src/libadmin/samples/rxstat_get_peer.c index 867e2b101..a9165fac7 100644 --- a/src/libadmin/samples/rxstat_get_peer.c +++ b/src/libadmin/samples/rxstat_get_peer.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_get_peer.c,v 1.1.1.4 2001/07/14 22:22:38 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_get_peer.c,v 1.1.1.5 2004/01/10 20:56:47 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,13 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_get_peer.c,v 1. #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 diff --git a/src/libadmin/samples/rxstat_get_process.c b/src/libadmin/samples/rxstat_get_process.c index 72e9f4f43..d32215273 100644 --- a/src/libadmin/samples/rxstat_get_process.c +++ b/src/libadmin/samples/rxstat_get_process.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_get_process.c,v 1.1.1.4 2001/07/14 22:22:38 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_get_process.c,v 1.1.1.5 2004/01/10 20:56:47 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,13 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_get_process.c,v #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 diff --git a/src/libadmin/samples/rxstat_get_version.c b/src/libadmin/samples/rxstat_get_version.c index 65419999f..f2231a74a 100644 --- a/src/libadmin/samples/rxstat_get_version.c +++ b/src/libadmin/samples/rxstat_get_version.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_get_version.c,v 1.1.1.5 2001/07/14 22:22:38 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_get_version.c,v 1.1.1.6 2004/01/10 20:56:47 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_get_version.c,v #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() { fprintf(stderr, diff --git a/src/libadmin/samples/rxstat_query_peer.c b/src/libadmin/samples/rxstat_query_peer.c index 2683a4113..f561b3be6 100644 --- a/src/libadmin/samples/rxstat_query_peer.c +++ b/src/libadmin/samples/rxstat_query_peer.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_query_peer.c,v 1.1.1.4 2001/07/14 22:22:38 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_query_peer.c,v 1.1.1.5 2004/01/10 20:56:47 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_query_peer.c,v #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(); void Usage() diff --git a/src/libadmin/samples/rxstat_query_process.c b/src/libadmin/samples/rxstat_query_process.c index 01ba2e8b4..b874cfdc7 100644 --- a/src/libadmin/samples/rxstat_query_process.c +++ b/src/libadmin/samples/rxstat_query_process.c @@ -5,6 +5,8 @@ * 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,7 +16,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_query_process.c,v 1.1.1.4 2001/07/14 22:22:39 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_query_process.c,v 1.1.1.5 2004/01/10 20:56:47 hartmans Exp $"); #ifdef AFS_NT40_ENV #include @@ -24,6 +26,12 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/samples/rxstat_query_process.c #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(); void Usage() diff --git a/src/libadmin/test/afscp.c b/src/libadmin/test/afscp.c index dde769d52..f47308029 100644 --- a/src/libadmin/test/afscp.c +++ b/src/libadmin/test/afscp.c @@ -5,6 +5,8 @@ * 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,7 +14,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/test/afscp.c,v 1.1.1.4 2001/07/14 22:22:39 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/test/afscp.c,v 1.1.1.5 2004/01/10 20:56:48 hartmans Exp $"); #include @@ -44,6 +46,11 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/libadmin/test/afscp.c,v 1.1.1.4 2001/07 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 diff --git a/src/libafs/MakefileProto.DARWIN.in b/src/libafs/MakefileProto.DARWIN.in index fabee072b..6359a00aa 100644 --- a/src/libafs/MakefileProto.DARWIN.in +++ b/src/libafs/MakefileProto.DARWIN.in @@ -1,5 +1,6 @@ #/* Copyright (C) 1995, 1989 Transarc Corporation - All rights reserved */ -# $Header: /tmp/cvstemp/openafs/src/libafs/MakefileProto.DARWIN.in,v 1.1.1.6 2002/09/26 19:06:44 hartmans Exp $ +#/* Portions Copyright (c) 2003 Apple Computer, Inc. */ +# $Header: /tmp/cvstemp/openafs/src/libafs/MakefileProto.DARWIN.in,v 1.1.1.7 2004/01/10 20:56:51 hartmans Exp $ # # MakefileProto for Digital Unix systems # @@ -46,6 +47,8 @@ AFS_OS_NONFSOBJS = osi_vfsops.o 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 diff --git a/src/libafsrpc/Makefile.in b/src/libafsrpc/Makefile.in index c46f29754..5a9eb093b 100644 --- a/src/libafsrpc/Makefile.in +++ b/src/libafsrpc/Makefile.in @@ -4,6 +4,8 @@ # 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,7 +270,7 @@ xdr_afsuuid.o: ${RX}/xdr_afsuuid.c # # $ what /opt/langtools/bin/pxdb32 # /opt/langtools/bin/pxdb32: -# HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.1.1.4 $ +# HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.1.1.5 $ # # 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,7 +349,7 @@ syscall.o: ${SYS}/syscall.s /usr/ccs/lib/cpp ${SFLAGS} ${SYS}/syscall.s syscall.ss; \ as -o syscall.o syscall.ss; \ $(RM) syscall.ss;; \ - sgi_* | ppc_darwin* ) \ + sgi_* | *_darwin_* ) \ ${CC} ${CFLAGS} -c ${SYS}/syscall.s;; \ alpha_dux?? ) \ ${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \ diff --git a/src/packaging/MacOS/OpenAFS.post_install b/src/packaging/MacOS/OpenAFS.post_install index 82f2534b7..8987bb8dc 100644 --- a/src/packaging/MacOS/OpenAFS.post_install +++ b/src/packaging/MacOS/OpenAFS.post_install @@ -1,10 +1,24 @@ #!/bin/sh +# Portions Copyright (c) 2003 Apple Computer, Inc. All rights reserved. if [ -d /afs -a ! -h /afs ]; then rmdir /afs fi -mkdir -p /Network/afs -if [ ! -h /afs ]; then - ln -s /Network/afs /afs +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 @@ -49,3 +63,13 @@ if [ -z "$done" ]; then 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 diff --git a/src/packaging/MacOS/buildpkg.sh b/src/packaging/MacOS/buildpkg.sh index 183a7e576..efe482b9a 100644 --- a/src/packaging/MacOS/buildpkg.sh +++ b/src/packaging/MacOS/buildpkg.sh @@ -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,15 +7,28 @@ if [ -z "$1" ]; then 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 +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,22 +68,21 @@ rm -rf pkgroot pkgres mkdir -p $PKGROOT $PKGRES mkdir $PKGROOT/Library -chown -R root.admin $PKGROOT +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 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 +chown -R root${SEP}admin $PKGROOT/Library chmod -R o-w $PKGROOT/Library chmod -R g+w $PKGROOT/Library -chown -R root.wheel $PKGROOT/Library/OpenAFS/Tools +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,14 +90,22 @@ mkdir $PKGROOT/private/var/db/openafs $PKGROOT/private/var/db/openafs/cache 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 +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.wheel $PKGROOT/private +chown -R root${SEP}wheel $PKGROOT/private chmod -R og-w $PKGROOT/private chmod og-rx $PKGROOT/private/var/db/openafs/cache @@ -102,26 +123,41 @@ done ln -s ../../Library/OpenAFS/Tools/root.client/usr/vice/etc/afsd $PKGROOT/usr/sbin/afsd -chown -R root.wheel $PKGROOT/usr +chown -R root${SEP}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 +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.wheel $PKGRES +chown -R root${SEP}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 +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 diff --git a/src/rxgen/rpc_scan.c b/src/rxgen/rpc_scan.c index 1ccbd8be4..c99edd3aa 100644 --- a/src/rxgen/rpc_scan.c +++ b/src/rxgen/rpc_scan.c @@ -32,10 +32,12 @@ * 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: /tmp/cvstemp/openafs/src/rxgen/rpc_scan.c,v 1.1.1.5 2001/09/11 14:34:40 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/rxgen/rpc_scan.c,v 1.1.1.6 2004/01/10 20:57:25 hartmans Exp $"); #include #include @@ -208,6 +210,10 @@ get_token(tokp) 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)) { diff --git a/src/shlibafsrpc/Makefile.in b/src/shlibafsrpc/Makefile.in index 8de760e9c..4eb44a2cc 100644 --- a/src/shlibafsrpc/Makefile.in +++ b/src/shlibafsrpc/Makefile.in @@ -9,6 +9,8 @@ LIBAFSRPCMINOR=0 # 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,7 +278,7 @@ xdr_afsuuid.o: ${RX}/xdr_afsuuid.c # # $ what /opt/langtools/bin/pxdb32 # /opt/langtools/bin/pxdb32: -# HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.1.1.3 $ +# HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.1.1.4 $ # # 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,7 +357,7 @@ syscall.o: ${SYS}/syscall.s /usr/ccs/lib/cpp ${SFLAGS} ${SYS}/syscall.s syscall.ss; \ as -o syscall.o syscall.ss; \ $(RM) syscall.ss;; \ - sgi_* | ppc_darwin* ) \ + sgi_* | *_darwin_* ) \ ${CC} ${CFLAGS} -c ${SYS}/syscall.s;; \ alpha_dux?? ) \ ${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \ diff --git a/src/tviced/Makefile.in b/src/tviced/Makefile.in index 3b624ad50..cd37dcd66 100644 --- a/src/tviced/Makefile.in +++ b/src/tviced/Makefile.in @@ -4,6 +4,8 @@ # 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,7 +57,8 @@ UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o 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 + 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 @@ -167,6 +170,10 @@ nuke.o: ${VOL}/nuke.c devname.o: ${VOL}/devname.c ${COMPILE} +# only for darwin +fstab.o: ${VOL}/fstab.c + ${COMPILE} + common.o: ${VOL}/common.c ${COMPILE} diff --git a/src/ubik/beacon.c b/src/ubik/beacon.c index 277b25e66..9b949ebcd 100644 --- a/src/ubik/beacon.c +++ b/src/ubik/beacon.c @@ -10,7 +10,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/beacon.c,v 1.1.1.12 2003/07/30 17:13:20 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/ubik/beacon.c,v 1.1.1.13 2004/01/10 20:57:50 hartmans Exp $"); #include #ifdef AFS_NT40_ENV @@ -367,7 +367,7 @@ ubeacon_Interact() { /* now analyze return codes, counting up our votes */ yesVotes = 0; /* count how many to ensure we have quorum */ - oldestYesVote = 0x3fffffff; /* time quorum expires */ + oldestYesVote = 0x7fffffff; /* time quorum expires */ syncsite= ubeacon_AmSyncSite(); startTime = FT_ApproxTime(); /* diff --git a/src/util/flipbase64.c b/src/util/flipbase64.c index ec6ae60c1..bc7a1a87c 100644 --- a/src/util/flipbase64.c +++ b/src/util/flipbase64.c @@ -5,12 +5,14 @@ * 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: /tmp/cvstemp/openafs/src/util/flipbase64.c,v 1.1.1.6 2001/07/14 22:24:21 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/util/flipbase64.c,v 1.1.1.7 2004/01/10 20:57:55 hartmans Exp $"); #if defined(AFS_NAMEI_ENV) @@ -22,9 +24,53 @@ RCSID("$Header: /tmp/cvstemp/openafs/src/util/flipbase64.c,v 1.1.1.6 2001/07/14 */ /* 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,7 +103,6 @@ char *int64_to_flipbase64(lb64_string_t s, u_int64_t a) } -/* 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 @@ -73,20 +118,13 @@ int64_t flipbase64_to_int64(char *s) #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'); - } + 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; } diff --git a/src/util/softsig.c b/src/util/softsig.c index 6d8a9f9b2..9f41e3dc5 100644 --- a/src/util/softsig.c +++ b/src/util/softsig.c @@ -5,8 +5,13 @@ * 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,11 +21,19 @@ #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,12 +48,17 @@ softsig_thread (void *arg) 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,6 +69,10 @@ softsig_thread (void *arg) 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,17 +82,29 @@ softsig_thread (void *arg) } } 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,6 +114,9 @@ softsig_init () 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 diff --git a/src/viced/Makefile.in b/src/viced/Makefile.in index b14a84256..5503c6bfd 100644 --- a/src/viced/Makefile.in +++ b/src/viced/Makefile.in @@ -4,6 +4,8 @@ # 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,6 +111,11 @@ ${DEST}/root.server/usr/afs/bin/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 $? $@ ; \ ${INSTALL} -ns $? $@ ;; \ @@ -127,6 +134,11 @@ ${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 $? $@ ; \ ${INSTALL} -ns $? $@ ;; \ diff --git a/src/viced/viced.c b/src/viced/viced.c index 6bf9680be..6fc7fa94a 100644 --- a/src/viced/viced.c +++ b/src/viced/viced.c @@ -19,7 +19,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/viced/viced.c,v 1.1.1.11 2003/07/30 17:13:36 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/viced/viced.c,v 1.1.1.12 2004/01/10 20:58:04 hartmans Exp $"); #include #include @@ -209,7 +209,7 @@ static CheckDescriptors() #ifdef AFS_PTHREAD_ENV void CheckSignal_Signal(x) {CheckSignal(0);} void ShutDown_Signal(x) {ShutDown(0);} -void CheckDescriptors_Signal(x) {CheckDescriptors(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);} diff --git a/src/vol/Makefile.in b/src/vol/Makefile.in index e36f8564d..e02c96f23 100644 --- a/src/vol/Makefile.in +++ b/src/vol/Makefile.in @@ -4,6 +4,8 @@ # 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,7 +44,7 @@ PUBLICHEADERS=nfs.h vnode.h viceinode.h volume.h voldefs.h partition.h\ 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 + namei_ops.o ${EXTRA_VLIBOBJS} OBJECTS=${VLIBOBJS} physio.o vol-salvage.o vol-info.o diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c index 600474fbe..913e90030 100644 --- a/src/volser/volprocs.c +++ b/src/volser/volprocs.c @@ -10,7 +10,7 @@ #include #include -RCSID("$Header: /tmp/cvstemp/openafs/src/volser/volprocs.c,v 1.1.1.9 2003/07/30 17:13:44 hartmans Exp $"); +RCSID("$Header: /tmp/cvstemp/openafs/src/volser/volprocs.c,v 1.1.1.10 2004/01/10 20:58:11 hartmans Exp $"); #include #include @@ -1317,6 +1317,9 @@ struct restoreCookie *cookie; } strcpy(tt->lastProcName,"Restore"); tt->rxCallPtr = acid; + + DFlushVolume(V_parentId(tt->volume)); /* Ensure dir buffers get dropped */ + code = RestoreVolume(acid, tt->volume, (aflags & 1),cookie); /* last is incrementalp */ FSYNC_askfs(tt->volid, (char *) 0, FSYNC_RESTOREVOLUME, 0l);/*break call backs on the restored volume */ -- 2.39.5