Index: openafs/src/WINNT/afsd/cm_ioctl.c
diff -c openafs/src/WINNT/afsd/cm_ioctl.c:1.33.2.25 openafs/src/WINNT/afsd/cm_ioctl.c:1.33.2.26
*** openafs/src/WINNT/afsd/cm_ioctl.c:1.33.2.25	Wed Feb  1 13:03:18 2006
--- openafs/src/WINNT/afsd/cm_ioctl.c	Mon Mar  6 16:24:08 2006
***************
*** 447,453 ****
                          userp, ioctlp->tidPathp, reqp, &substRootp);
          if (code) return code;
  
!         code = cm_NameI(substRootp, tbuffer, CM_FLAG_FOLLOW,
                          userp, NULL, reqp, scpp);
          if (code) return code;
      }
--- 447,453 ----
                          userp, ioctlp->tidPathp, reqp, &substRootp);
          if (code) return code;
  
!         code = cm_NameI(substRootp, tbuffer, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                          userp, NULL, reqp, scpp);
          if (code) return code;
      }
Index: openafs/src/WINNT/afsd/smb.c
diff -c openafs/src/WINNT/afsd/smb.c:1.55.2.48 openafs/src/WINNT/afsd/smb.c:1.55.2.49
*** openafs/src/WINNT/afsd/smb.c:1.55.2.48	Sun Feb 12 01:24:27 2006
--- openafs/src/WINNT/afsd/smb.c	Mon Mar  6 00:01:52 2006
***************
*** 9094,9100 ****
  
          *cp = 0;
  
!         osi_Log0( smb_logp, osi_LogSaveString(smb_logp, buf));
      }
  
      osi_Log0(smb_logp, "*** End SMB packet dump ***");
--- 9094,9100 ----
  
          *cp = 0;
  
!         osi_Log1( smb_logp, "%s", osi_LogSaveString(smb_logp, buf));
      }
  
      osi_Log0(smb_logp, "*** End SMB packet dump ***");
Index: openafs/src/WINNT/afsd/smb_ioctl.c
diff -c openafs/src/WINNT/afsd/smb_ioctl.c:1.14.2.7 openafs/src/WINNT/afsd/smb_ioctl.c:1.14.2.8
*** openafs/src/WINNT/afsd/smb_ioctl.c:1.14.2.7	Thu Jan 26 01:09:49 2006
--- openafs/src/WINNT/afsd/smb_ioctl.c	Sun Mar  5 15:55:14 2006
***************
*** 40,47 ****
--- 40,53 ----
      smb_ioctlProcsp[VIOCSETAL] = cm_IoctlSetACL;
      smb_ioctlProcsp[VIOC_FLUSHVOLUME] = cm_IoctlFlushVolume;
      smb_ioctlProcsp[VIOCFLUSH] = cm_IoctlFlushFile;
+ #ifdef COMMENT
+     /* This functions do not return the data expected by the 
+      * Windows CIFS client.  Calling them only increases the 
+      * number of roundtrips to the file server with no benefit.
+      */
      smb_ioctlProcsp[VIOCSETVOLSTAT] = cm_IoctlSetVolumeStatus;
      smb_ioctlProcsp[VIOCGETVOLSTAT] = cm_IoctlGetVolumeStatus;
+ #endif
      smb_ioctlProcsp[VIOCWHEREIS] = cm_IoctlWhereIs;
      smb_ioctlProcsp[VIOC_AFS_STAT_MT_PT] = cm_IoctlStatMountPoint;
      smb_ioctlProcsp[VIOC_AFS_DELETE_MT_PT] = cm_IoctlDeleteMountPoint;
Index: openafs/src/afs/NTMakefile
diff -c openafs/src/afs/NTMakefile:1.3 openafs/src/afs/NTMakefile:1.3.2.1
*** openafs/src/afs/NTMakefile:1.3	Fri Nov 21 03:00:16 2003
--- openafs/src/afs/NTMakefile	Sun Mar  5 22:16:40 2006
***************
*** 12,21 ****
  ################################################
  # compile_et to get unified_afs.h
  
! $(DESTDIR)\include\afs\unified_afs.c $(DESTDIR)\include\afs\unified_afs.h:   unified_afs.et  unified_afs.p.h
     $(DEL) unified_afs.c unified_afs.h
     $(COMPILE_ET) unified_afs -h unified_afs
     $(COPY) unified_afs.h $(DESTDIR)\include\afs
  
! install: $(DESTDIR)\include\afs\unified_afs.c 
  
--- 12,23 ----
  ################################################
  # compile_et to get unified_afs.h
  
! INCDIR=$(DESTDIR)\include\
! 
! $(INCDIR)\afs\unified_afs.c $(INCDIR)\afs\unified_afs.h:   unified_afs.et  unified_afs.p.h
     $(DEL) unified_afs.c unified_afs.h
     $(COMPILE_ET) unified_afs -h unified_afs
     $(COPY) unified_afs.h $(DESTDIR)\include\afs
  
! install: $(INCDIR)\afs\unified_afs.c $(INCDIR)\afs\afs_stats.h
  
Index: openafs/src/afs/afs_util.c
diff -c openafs/src/afs/afs_util.c:1.17.2.2 openafs/src/afs/afs_util.c:1.17.2.3
*** openafs/src/afs/afs_util.c:1.17.2.2	Wed Oct  5 01:58:27 2005
--- openafs/src/afs/afs_util.c	Thu Mar  9 01:41:33 2006
***************
*** 16,22 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_util.c,v 1.17.2.2 2005/10/05 05:58:27 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
--- 16,22 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_util.c,v 1.17.2.3 2006/03/09 06:41:33 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
***************
*** 262,269 ****
      register int i;
  
      afs_warn("Looking for locked data structures.\n");
!     afs_warn("conn %x, volume %x, user %x, cell %x, server %x\n", afs_xconn,
! 	     afs_xvolume, afs_xuser, afs_xcell, afs_xserver);
      {
  	register struct vcache *tvc;
  	AFS_STATCNT(afs_CheckLocks);
--- 262,269 ----
      register int i;
  
      afs_warn("Looking for locked data structures.\n");
!     afs_warn("conn %lx, volume %lx, user %lx, cell %lx, server %lx\n", &afs_xconn,
! 	     &afs_xvolume, &afs_xuser, &afs_xcell, &afs_xserver);
      {
  	register struct vcache *tvc;
  	AFS_STATCNT(afs_CheckLocks);
Index: openafs/src/afs/sysctl.h
diff -c openafs/src/afs/sysctl.h:1.2 openafs/src/afs/sysctl.h:1.2.2.1
*** openafs/src/afs/sysctl.h:1.2	Fri Oct 24 02:26:00 2003
--- openafs/src/afs/sysctl.h	Thu Mar  9 01:41:33 2006
***************
*** 38,43 ****
--- 38,45 ----
  #define AFS_SC_DARWIN_14			3
  #define AFS_SC_DARWIN_60			4
  #define AFS_SC_DARWIN_70			5
+ #define AFS_SC_DARWIN_80			6
+ #define AFS_SC_DARWIN_90			7
  
  /* AFS_SC_DARWIN_ALL: darwin version-independent sysctls */
  #define AFS_SC_DARWIN_ALL_REALMODES		1
***************
*** 57,60 ****
--- 59,68 ----
  /* AFS_SC_DARWIN_70: darwin 7.x sysctls */
  	/* nothing defined */
  
+ /* AFS_SC_DARWIN_80: darwin 8.x sysctls */
+ 	/* nothing defined */
+ 
+ /* AFS_SC_DARWIN_90: darwin 9.x sysctls */
+ 	/* nothing defined */
+ 
  #endif /* AFS_SYSCTL_H */
Index: openafs/src/afs/sysincludes.h
diff -c openafs/src/afs/sysincludes.h:1.28.2.9 openafs/src/afs/sysincludes.h:1.28.2.10
*** openafs/src/afs/sysincludes.h:1.28.2.9	Thu Oct 13 13:55:33 2005
--- openafs/src/afs/sysincludes.h	Thu Mar  9 16:41:53 2006
***************
*** 97,102 ****
--- 97,105 ----
  #include <linux/slab.h>
  #include <linux/string.h>
  #include <asm/semaphore.h>
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ #include <linux/mutex.h>
+ #endif
  #include <linux/errno.h>
  #ifdef COMPLETION_H_EXISTS
  #include <linux/completion.h>
Index: openafs/src/afs/LINUX/osi_machdep.h
diff -c openafs/src/afs/LINUX/osi_machdep.h:1.22.2.11 openafs/src/afs/LINUX/osi_machdep.h:1.22.2.12
*** openafs/src/afs/LINUX/osi_machdep.h:1.22.2.11	Mon Jul 11 15:29:56 2005
--- openafs/src/afs/LINUX/osi_machdep.h	Thu Mar  9 16:41:54 2006
***************
*** 187,201 ****
  #define afs_linux_page_address(page) (afs_linux_page_offset + PAGE_SIZE * (page - mem_map))
  
  #if defined(__KERNEL__)
! #include "../h/sched.h"
! #include "linux/wait.h"
  
  extern struct semaphore afs_global_lock;
  extern int afs_global_owner;
  
  #define AFS_GLOCK() \
  do { \
! 	 down(&afs_global_lock); \
  	 if (afs_global_owner) \
  	     osi_Panic("afs_global_lock already held by pid %d", \
  		       afs_global_owner); \
--- 187,208 ----
  #define afs_linux_page_address(page) (afs_linux_page_offset + PAGE_SIZE * (page - mem_map))
  
  #if defined(__KERNEL__)
! #include <linux/version.h>
! #include <linux/sched.h>
! #include <linux/wait.h>
  
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ extern struct mutex afs_global_lock;
+ #else
  extern struct semaphore afs_global_lock;
+ #define mutex_lock(lock) down(lock)
+ #define mutex_unlock(lock) up(lock)
+ #endif
  extern int afs_global_owner;
  
  #define AFS_GLOCK() \
  do { \
! 	 mutex_lock(&afs_global_lock); \
  	 if (afs_global_owner) \
  	     osi_Panic("afs_global_lock already held by pid %d", \
  		       afs_global_owner); \
***************
*** 209,218 ****
      if (!ISAFS_GLOCK()) \
  	osi_Panic("afs global lock not held at %s:%d", __FILE__, __LINE__); \
      afs_global_owner = 0; \
!     up(&afs_global_lock); \
  } while (0)
- 
- 
  #else
  #define AFS_GLOCK()
  #define AFS_GUNLOCK()
--- 216,223 ----
      if (!ISAFS_GLOCK()) \
  	osi_Panic("afs global lock not held at %s:%d", __FILE__, __LINE__); \
      afs_global_owner = 0; \
!     mutex_unlock(&afs_global_lock); \
  } while (0)
  #else
  #define AFS_GLOCK()
  #define AFS_GUNLOCK()
Index: openafs/src/afs/LINUX/osi_module.c
diff -c openafs/src/afs/LINUX/osi_module.c:1.52.2.22 openafs/src/afs/LINUX/osi_module.c:1.52.2.23
*** openafs/src/afs/LINUX/osi_module.c:1.52.2.22	Tue Feb 28 16:22:50 2006
--- openafs/src/afs/LINUX/osi_module.c	Thu Mar  9 16:41:54 2006
***************
*** 15,21 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.22 2006/02/28 21:22:50 rra Exp $");
  
  #include <linux/module.h> /* early to avoid printf->printk mapping */
  #include "afs/sysincludes.h"
--- 15,21 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.23 2006/03/09 21:41:54 shadow Exp $");
  
  #include <linux/module.h> /* early to avoid printf->printk mapping */
  #include "afs/sysincludes.h"
***************
*** 48,54 ****
  static long get_page_offset(void);
  #endif
  
! #if defined(AFS_LINUX24_ENV)
  DECLARE_MUTEX(afs_global_lock);
  #else
  struct semaphore afs_global_lock = MUTEX;
--- 48,56 ----
  static long get_page_offset(void);
  #endif
  
! #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
! DEFINE_MUTEX(afs_global_lock);
! #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
  DECLARE_MUTEX(afs_global_lock);
  #else
  struct semaphore afs_global_lock = MUTEX;
Index: openafs/src/afs/LINUX/osi_probe.c
diff -c openafs/src/afs/LINUX/osi_probe.c:1.1.2.6 openafs/src/afs/LINUX/osi_probe.c:1.1.2.7
*** openafs/src/afs/LINUX/osi_probe.c:1.1.2.6	Wed Apr  6 00:58:19 2005
--- openafs/src/afs/LINUX/osi_probe.c	Wed Mar 15 11:28:01 2006
***************
*** 114,129 ****
--- 114,141 ----
  
  /* Allow the user to specify sys_call_table addresses */
  static unsigned long sys_call_table_addr[4] = { 0,0,0,0 };
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ module_param_array(sys_call_table_addr, long, NULL, 0);
+ #else
  MODULE_PARM(sys_call_table_addr, "1-4l");
+ #endif
  MODULE_PARM_DESC(sys_call_table_addr, "Location of system call tables");
  
  /* If this is set, we are more careful about avoiding duplicate matches */
  static int probe_carefully = 1;
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ module_param(probe_carefully, int, 0);
+ #else
  MODULE_PARM(probe_carefully, "i");
+ #endif
  MODULE_PARM_DESC(probe_carefully, "Probe for system call tables carefully");
  
  static int probe_ignore_syscalls[8] = { -1, -1, -1, -1, -1, -1, -1, -1 };
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ module_param_array(probe_ignore_syscalls, int, NULL, 0);
+ #else
  MODULE_PARM(probe_ignore_syscalls, "1-8i");
+ #endif
  MODULE_PARM_DESC(probe_ignore_syscalls, "Syscalls to ignore in table checks");
  
  #ifdef OSI_PROBE_DEBUG
***************
*** 138,156 ****
--- 150,184 ----
   * 0x0040 - automatically ignore setgroups and afs_syscall
   */
  static int probe_debug = 0x41;
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ module_param(probe_debug, int, 0);
+ #else
  MODULE_PARM(probe_debug, "i");
+ #endif
  MODULE_PARM_DESC(probe_debug, "Debugging level");
  
  static unsigned long probe_debug_addr[4] = { 0,0,0,0 };
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ module_param_array(probe_debug_addr, long, NULL, 0);
+ #else
  MODULE_PARM(probe_debug_addr, "1-4l");
+ #endif
  MODULE_PARM_DESC(probe_debug_addr, "Debug range starting locations");
  
  static unsigned long probe_debug_range = 0;
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ module_param(probe_debug_range, long, 0);
+ #else
  MODULE_PARM(probe_debug_range, "l");
+ #endif
  MODULE_PARM_DESC(probe_debug_range, "Debug range length");
  
  static unsigned long probe_debug_tag = 0;
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ module_param(probe_debug_tag, long, 0);
+ #else
  MODULE_PARM(probe_debug_tag, "l");
+ #endif
  MODULE_PARM_DESC(probe_debug_tag, "Debugging output start tag");
  #endif
  
Index: openafs/src/afsd/Makefile.in
diff -c openafs/src/afsd/Makefile.in:1.16.2.1 openafs/src/afsd/Makefile.in:1.16.2.2
*** openafs/src/afsd/Makefile.in:1.16.2.1	Sun Jan 30 23:13:57 2005
--- openafs/src/afsd/Makefile.in	Thu Mar  9 01:41:34 2006
***************
*** 9,15 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! LDFLAGS = ${XLDFLAGS}
  
  #
  # What to make
--- 9,15 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! LDFLAGS = ${XLDFLAGS} ${ARCHFLAGS}
  
  #
  # What to make
Index: openafs/src/afsmonitor/afsmonitor.c
diff -c openafs/src/afsmonitor/afsmonitor.c:1.18.2.2 openafs/src/afsmonitor/afsmonitor.c:1.18.2.3
*** openafs/src/afsmonitor/afsmonitor.c:1.18.2.2	Thu Oct 13 13:55:33 2005
--- openafs/src/afsmonitor/afsmonitor.c	Thu Mar  9 01:41:34 2006
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsmonitor/afsmonitor.c,v 1.18.2.2 2005/10/13 17:55:33 shadow Exp $");
  
  #include <stdio.h>
  #include <math.h>
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsmonitor/afsmonitor.c,v 1.18.2.3 2006/03/09 06:41:34 shadow Exp $");
  
  #include <stdio.h>
  #include <math.h>
***************
*** 3680,3686 ****
--- 3680,3690 ----
  	    }
  	    strncpy(curr_FS->hostName, he->h_name, HOST_NAME_LEN);	/* complete name */
  	    memcpy(&(curr_skt->sin_addr.s_addr), he->h_addr, 4);
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ 	    curr_skt->sin_family = AF_INET;		/*Internet family */
+ #else
  	    curr_skt->sin_family = htons(AF_INET);	/*Internet family */
+ #endif
  	    curr_skt->sin_port = htons(7000);	/*FileServer port */
  #ifdef STRUCT_SOCKADDR_HAS_SA_LEN
  	    curr_skt->sin_len = sizeof(struct sockaddr_in);
***************
*** 3759,3765 ****
--- 3763,3773 ----
  	    }
  	    strncpy(curr_CM->hostName, he->h_name, HOST_NAME_LEN);	/* complete name */
  	    memcpy(&(curr_skt->sin_addr.s_addr), he->h_addr, 4);
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ 	    curr_skt->sin_family = AF_INET;		/*Internet family */
+ #else
  	    curr_skt->sin_family = htons(AF_INET);	/*Internet family */
+ #endif
  	    curr_skt->sin_port = htons(7001);	/*Cache Manager port */
  #ifdef STRUCT_SOCKADDR_HAS_SA_LEN
  	    curr_skt->sin_len = sizeof(struct sockaddr_in);
Index: openafs/src/audit/Makefile.in
diff -c openafs/src/audit/Makefile.in:1.8 openafs/src/audit/Makefile.in:1.8.2.1
*** openafs/src/audit/Makefile.in:1.8	Thu Apr 17 11:05:59 2003
--- openafs/src/audit/Makefile.in	Thu Mar  9 01:41:36 2006
***************
*** 15,21 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=-I. -I${srcdir} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
  
  all: ${TOP_LIBDIR}/libaudit.a ${TOP_INCDIR}/afs/audit.h
  
--- 15,21 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=-I. -I${srcdir} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
  
  all: ${TOP_LIBDIR}/libaudit.a ${TOP_INCDIR}/afs/audit.h
  
Index: openafs/src/auth/test/Makefile.in
diff -c openafs/src/auth/test/Makefile.in:1.5 openafs/src/auth/test/Makefile.in:1.5.8.1
*** openafs/src/auth/test/Makefile.in:1.5	Wed Oct 31 23:59:35 2001
--- openafs/src/auth/test/Makefile.in	Thu Mar  9 01:41:36 2006
***************
*** 12,18 ****
  LDIRS= -L${DESTDIR}/lib -L${DESTDIR}/lib/afs -L${DESTDIR}/lib/rx
  LIBS= -lauth -lsys -lrx -llwp -lafsutil ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${XCFLAGS}
  
  tests all: testcellconf ktctest
  
--- 12,18 ----
  LDIRS= -L${DESTDIR}/lib -L${DESTDIR}/lib/afs -L${DESTDIR}/lib/rx
  LIBS= -lauth -lsys -lrx -llwp -lafsutil ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${XCFLAGS} ${ARCHFLAGS}
  
  tests all: testcellconf ktctest
  
Index: openafs/src/bozo/test/Makefile.in
diff -c openafs/src/bozo/test/Makefile.in:1.6 openafs/src/bozo/test/Makefile.in:1.6.8.1
*** openafs/src/bozo/test/Makefile.in:1.6	Wed Oct 31 23:59:36 2001
--- openafs/src/bozo/test/Makefile.in	Thu Mar  9 01:41:37 2006
***************
*** 11,17 ****
  INCDIRS=-I${TOP_INCDIR} -I..
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS}
  
  all: testproc smail-notifier
  
--- 11,17 ----
  INCDIRS=-I${TOP_INCDIR} -I..
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS} ${ARCHFLAGS}
  
  all: testproc smail-notifier
  
Index: openafs/src/cf/osconf.m4
diff -c openafs/src/cf/osconf.m4:1.51.2.24 openafs/src/cf/osconf.m4:1.51.2.25
*** openafs/src/cf/osconf.m4:1.51.2.24	Mon Jan 30 13:20:46 2006
--- openafs/src/cf/osconf.m4	Thu Mar  9 01:41:38 2006
***************
*** 398,403 ****
--- 398,404 ----
  		REGEX_OBJ="regex.o"
  		XCFLAGS="-traditional-cpp"
  		SHLIB_LINKER="${MT_CC} -dynamiclib"
+ 		SHLIB_SUFFIX="dylib"
  		;;
  
  	ppc_darwin_13)
***************
*** 407,412 ****
--- 408,414 ----
  		REGEX_OBJ="regex.o"
  		XCFLAGS="-no-cpp-precomp"
  		SHLIB_LINKER="${MT_CC} -dynamiclib"
+ 		SHLIB_SUFFIX="dylib"
  		;;
  
  	ppc_darwin_14)
***************
*** 416,421 ****
--- 418,424 ----
  		REGEX_OBJ="regex.o"
  		XCFLAGS="-no-cpp-precomp"
  		SHLIB_LINKER="${MT_CC} -dynamiclib"
+ 		SHLIB_SUFFIX="dylib"
  		;;
  
  	ppc_darwin_60)
***************
*** 426,431 ****
--- 429,435 ----
  		XCFLAGS="-no-cpp-precomp"
  		TXLIBS="-lncurses"
  		SHLIB_LINKER="${MT_CC} -dynamiclib"
+ 		SHLIB_SUFFIX="dylib"
  		;;
  
  	ppc_darwin_70)
***************
*** 440,459 ****
  		TXLIBS="-lncurses"
  		EXTRA_VLIBOBJS="fstab.o"
  		SHLIB_LINKER="${MT_CC} -dynamiclib"
  		;;
  
  	*_darwin_80)
  		AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
  		LEX="lex -l"
! 		MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}'
  		KROOT=
  		KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
! 		LWP_OPTMZ="-O2"
  		REGEX_OBJ="regex.o"
- 		XCFLAGS="-no-cpp-precomp"
  		TXLIBS="-lncurses"
  		EXTRA_VLIBOBJS="fstab.o"
  		SHLIB_LINKER="${MT_CC} -dynamiclib"
  		;;
  
  	ppc_linux*)
--- 444,483 ----
  		TXLIBS="-lncurses"
  		EXTRA_VLIBOBJS="fstab.o"
  		SHLIB_LINKER="${MT_CC} -dynamiclib"
+ 		SHLIB_SUFFIX="dylib"
  		;;
  
  	*_darwin_80)
  		AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
  		LEX="lex -l"
! 		MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
  		KROOT=
  		KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
! 		KERN_OPTMZ="-Os"
! 		LWP_OPTMZ="-Os"
! 		OPTMZ="-Os"
! 		REGEX_OBJ="regex.o"
! 		TXLIBS="-lncurses"
! 		EXTRA_VLIBOBJS="fstab.o"
! 		SHLIB_LINKER="${MT_CC} -dynamiclib"
! 		SHLIB_SUFFIX="dylib"
! 		;;
! 
! 	*_darwin_90)
! 		AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
! 		LEX="lex -l"
! 		MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
! 		KROOT=
! 		KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
! 		LD="cc"
! 		KERN_OPTMZ="-Os"
! 		LWP_OPTMZ="-Os"
! 		OPTMZ="-Os"
  		REGEX_OBJ="regex.o"
  		TXLIBS="-lncurses"
  		EXTRA_VLIBOBJS="fstab.o"
  		SHLIB_LINKER="${MT_CC} -dynamiclib"
+ 		SHLIB_SUFFIX="dylib"
  		;;
  
  	ppc_linux*)
Index: openafs/src/cmd/test/Makefile.in
diff -c openafs/src/cmd/test/Makefile.in:1.7 openafs/src/cmd/test/Makefile.in:1.7.2.1
*** openafs/src/cmd/test/Makefile.in:1.7	Tue Oct 15 23:58:30 2002
--- openafs/src/cmd/test/Makefile.in	Thu Mar  9 01:41:39 2006
***************
*** 14,20 ****
  
  INCDIRS=  -I${SRCDIR}/include -I${SRCDIR}/include/afs -I..
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS}
  
  all: test
  test tests: ctest dtest itest
--- 14,20 ----
  
  INCDIRS=  -I${SRCDIR}/include -I${SRCDIR}/include/afs -I..
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS} ${ARCHFLAGS}
  
  all: test
  test tests: ctest dtest itest
Index: openafs/src/comerr/test/Makefile.in
diff -c openafs/src/comerr/test/Makefile.in:1.6 openafs/src/comerr/test/Makefile.in:1.6.8.1
*** openafs/src/comerr/test/Makefile.in:1.6	Wed Oct 31 23:59:42 2001
--- openafs/src/comerr/test/Makefile.in	Thu Mar  9 01:41:39 2006
***************
*** 6,12 ****
  INCDIRS=-I${TOP_INCDIR} -I..
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} -lcom_err ${XCFLAGS}
  
  all: test
  
--- 6,12 ----
  INCDIRS=-I${TOP_INCDIR} -I..
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} -lcom_err ${XCFLAGS} ${ARCHFLAGS}
  
  all: test
  
Index: openafs/src/config/Makefile.config.in
diff -c openafs/src/config/Makefile.config.in:1.10 openafs/src/config/Makefile.config.in:1.10.2.1
*** openafs/src/config/Makefile.config.in:1.10	Sun May  9 23:19:01 2004
--- openafs/src/config/Makefile.config.in	Thu Mar  9 01:41:42 2006
***************
*** 125,132 ****
  COMMON_INCL=-I${TOP_OBJDIR}/src/config -I. -I${srcdir} -I${TOP_INCDIR} -I${TOP_INCDIR}/afs -I${TOP_INCDIR}/rx -I${TOP_OBJDIR} -I${TOP_SRCDIR} -I${TOP_OBJDIR}/src
  COMMON_CFLAGS=${DBG} ${OPTMZ} ${COMMON_INCL}
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS}
! LDFLAGS=${XLDFLAGS}
  
  .c.o:
  	$(CCOBJ) $(CFLAGS) -c $<
--- 125,132 ----
  COMMON_INCL=-I${TOP_OBJDIR}/src/config -I. -I${srcdir} -I${TOP_INCDIR} -I${TOP_INCDIR}/afs -I${TOP_INCDIR}/rx -I${TOP_OBJDIR} -I${TOP_SRCDIR} -I${TOP_OBJDIR}/src
  COMMON_CFLAGS=${DBG} ${OPTMZ} ${COMMON_INCL}
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} ${ARCHFLAGS}
! LDFLAGS=${XLDFLAGS} ${ARCHFLAGS}
  
  .c.o:
  	$(CCOBJ) $(CFLAGS) -c $<
Index: openafs/src/config/Makefile.i386_djgpp
diff -c openafs/src/config/Makefile.i386_djgpp:1.7 openafs/src/config/Makefile.i386_djgpp:1.7.8.1
*** openafs/src/config/Makefile.i386_djgpp:1.7	Wed Oct 31 23:59:43 2001
--- openafs/src/config/Makefile.i386_djgpp	Thu Mar  9 01:41:42 2006
***************
*** 16,22 ****
  #PAM_CFLAGS = -O2 -Dlinux -DLINUX_PAM -fPIC
  # Put -O2 here to _ensure_ all Makefiles pick it up.
  XCFLAGS= ${DBG} -Dfds_bits=fd_bits -DAFS_AFSDB_ENV -DAFS_FREELANCE_CLIENT
! MT_CFLAGS=${XCFLAGS}
  XLDFLAGS=
  SHLIB_LDFLAGS = -shared -Xlinker -x
  SHLIB_SUFFIX=so
--- 16,22 ----
  #PAM_CFLAGS = -O2 -Dlinux -DLINUX_PAM -fPIC
  # Put -O2 here to _ensure_ all Makefiles pick it up.
  XCFLAGS= ${DBG} -Dfds_bits=fd_bits -DAFS_AFSDB_ENV -DAFS_FREELANCE_CLIENT
! MT_CFLAGS=${XCFLAGS} ${ARCHFLAGS}
  XLDFLAGS=
  SHLIB_LDFLAGS = -shared -Xlinker -x
  SHLIB_SUFFIX=so
Index: openafs/src/config/Makefile.in
diff -c openafs/src/config/Makefile.in:1.14 openafs/src/config/Makefile.in:1.14.2.1
*** openafs/src/config/Makefile.in:1.14	Sat Jan 11 02:34:04 2003
--- openafs/src/config/Makefile.in	Thu Mar  9 01:41:42 2006
***************
*** 8,14 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${DBG} ${OPTMZ} -I${TOP_INCDIR} -I. ${XCFLAGS}
  
  INST=$(RM) -f $@; $(CP) $? $@
  
--- 8,14 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${DBG} ${OPTMZ} -I${TOP_INCDIR} -I. ${XCFLAGS} ${ARCHFLAGS}
  
  INST=$(RM) -f $@; $(CP) $? $@
  
Index: openafs/src/config/NTMakefile
diff -c openafs/src/config/NTMakefile:1.15.2.2 openafs/src/config/NTMakefile:1.15.2.3
*** openafs/src/config/NTMakefile:1.15.2.2	Sun Jun 12 11:56:49 2005
--- openafs/src/config/NTMakefile	Sun Mar  5 22:16:41 2006
***************
*** 230,235 ****
--- 230,238 ----
  !	IF (!EXIST($(OJT)\volser))
  		$(MKDIR) $(OJT)\volser
  !	ENDIF
+ !	IF (!EXIST($(OJT)\xstat))
+ 		$(MKDIR) $(OJT)\xstat
+ !	ENDIF
  !	IF (!EXIST($(OJT)\WINNT))
  		$(MKDIR) $(OJT)\WINNT
  !	ENDIF
Index: openafs/src/config/NTMakefile.amd64_w2k
diff -c openafs/src/config/NTMakefile.amd64_w2k:1.1.2.30 openafs/src/config/NTMakefile.amd64_w2k:1.1.2.31
*** openafs/src/config/NTMakefile.amd64_w2k:1.1.2.30	Wed Mar  1 00:59:14 2006
--- openafs/src/config/NTMakefile.amd64_w2k	Fri Mar 10 14:16:10 2006
***************
*** 80,86 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0099
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
--- 80,86 ----
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0100
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
Index: openafs/src/config/NTMakefile.i386_nt40
diff -c openafs/src/config/NTMakefile.i386_nt40:1.46.2.45 openafs/src/config/NTMakefile.i386_nt40:1.46.2.46
*** openafs/src/config/NTMakefile.i386_nt40:1.46.2.45	Wed Mar  1 00:59:14 2006
--- openafs/src/config/NTMakefile.i386_nt40	Fri Mar 10 14:16:10 2006
***************
*** 80,86 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0099
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
--- 80,86 ----
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0100
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
Index: openafs/src/config/NTMakefile.i386_w2k
diff -c openafs/src/config/NTMakefile.i386_w2k:1.1.2.32 openafs/src/config/NTMakefile.i386_w2k:1.1.2.33
*** openafs/src/config/NTMakefile.i386_w2k:1.1.2.32	Wed Mar  1 00:59:15 2006
--- openafs/src/config/NTMakefile.i386_w2k	Fri Mar 10 14:16:10 2006
***************
*** 80,86 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0099
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
--- 80,86 ----
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0100
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
Index: openafs/src/config/afs_sysnames.h
diff -c openafs/src/config/afs_sysnames.h:1.50.2.21 openafs/src/config/afs_sysnames.h:1.50.2.23
*** openafs/src/config/afs_sysnames.h:1.50.2.21	Tue Jan 10 23:47:10 2006
--- openafs/src/config/afs_sysnames.h	Wed Mar 15 11:16:36 2006
***************
*** 60,65 ****
--- 60,67 ----
  #define SYS_NAME_ID_ppc_darwin_70        507
  #define SYS_NAME_ID_ppc_darwin_80        508
  #define SYS_NAME_ID_x86_darwin_80        509
+ #define SYS_NAME_ID_ppc_darwin_90        510
+ #define SYS_NAME_ID_x86_darwin_90        511
  
  #define SYS_NAME_ID_next_mach20		 601
  #define SYS_NAME_ID_next_mach30		 602
***************
*** 157,162 ****
--- 159,165 ----
  #define SYS_NAME_ID_s390_linux2         1900
  #define SYS_NAME_ID_s390_linux22        1901
  #define SYS_NAME_ID_s390_linux24        1902
+ #define SYS_NAME_ID_s390_linux26        1907
  #define SYS_NAME_ID_s390x_linux2         1903
  #define SYS_NAME_ID_s390x_linux22        1904
  #define SYS_NAME_ID_s390x_linux24        1905
Index: openafs/src/config/param.ppc_darwin_80.h
diff -c openafs/src/config/param.ppc_darwin_80.h:1.1.2.4 openafs/src/config/param.ppc_darwin_80.h:1.1.2.5
*** openafs/src/config/param.ppc_darwin_80.h:1.1.2.4	Mon Feb 13 13:31:15 2006
--- openafs/src/config/param.ppc_darwin_80.h	Thu Mar  9 01:41:42 2006
***************
*** 7,15 ****
  #define AFS_ENV                 1
  #define AFS_64BIT_ENV           1	/* Defines afs_int32 as int, not long. */
  #define AFS_64BIT_CLIENT        1
! #define AFS_64BIT_IOPS_ENV 1
! #define AFS_PPC_ENV 1
! #define AFS_VFSINCL_ENV 1
  
  #include <afs/afs_sysnames.h>
  
--- 7,21 ----
  #define AFS_ENV                 1
  #define AFS_64BIT_ENV           1	/* Defines afs_int32 as int, not long. */
  #define AFS_64BIT_CLIENT        1
! #define AFS_64BIT_IOPS_ENV	1
! #if defined(__ppc__)
! #define AFS_PPC_ENV		1
! #elif defined(__i386__)
! #define AFS_X86_ENV		1
! #else
! #error Unsupported architecture
! #endif
! #define AFS_VFSINCL_ENV		1
  
  #include <afs/afs_sysnames.h>
  
***************
*** 28,42 ****
  #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_ppc_darwin_80   1
! #define SYS_NAME        "ppc_darwin_80"
! #define SYS_NAME_ID     SYS_NAME_ID_ppc_darwin_80
! #define AFSBIG_ENDIAN   1
  #define AFS_HAVE_FFS    1	/* Use system's ffs. */
  
  #define AFS_GCPAGS               0
--- 34,62 ----
  #define AFS_MOUNT_AFS    "afs"
  
  /* Machine / Operating system information */
! #if defined(__ppc__)
! #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_ppc_darwin_80	1
! #define SYS_NAME		"ppc_darwin_80"
! #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_80
! #define AFSBIG_ENDIAN		1
! #elif defined(__i386__)
! #define sys_x86_darwin_12	1
! #define sys_x86_darwin_13	1
! #define sys_x86_darwin_14	1
! #define sys_x86_darwin_60	1
! #define sys_x86_darwin_70	1
! #define sys_x86_darwin_80	1
! #define SYS_NAME		"x86_darwin_80"
! #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_80
! #define AFSLITTLE_ENDIAN	1
! #else
! #error Unsupported architecture
! #endif
  #define AFS_HAVE_FFS    1	/* Use system's ffs. */
  
  #define AFS_GCPAGS               0
***************
*** 82,88 ****
  #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 <afs/afs_sysnames.h>
  #define AFS_USERSPACE_ENV
--- 102,114 ----
  #define AFS_VFSINCL_ENV 1	/* NOBODY uses this.... */
  #define AFS_ENV                 1
  #define AFS_64BIT_ENV           1	/* Defines afs_int32 as int, not long. */
! #if defined(__ppc__)
! #define AFS_PPC_ENV		1
! #elif defined(__i386__)
! #define AFS_X86_ENV		1
! #else
! #error Unsupported architecture
! #endif
  
  #include <afs/afs_sysnames.h>
  #define AFS_USERSPACE_ENV
***************
*** 100,114 ****
  #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_ppc_darwin_80   1
! #define SYS_NAME        "ppc_darwin_80"
! #define SYS_NAME_ID     SYS_NAME_ID_ppc_darwin_80
! #define AFSBIG_ENDIAN   1
  #define AFS_HAVE_FFS    1	/* Use system's ffs. */
  
  #define AFS_UIOSYS      UIO_SYSSPACE
--- 126,154 ----
  #define AFS_MOUNT_AFS    "afs"
  
  /* Machine / Operating system information */
! #if defined(__ppc__)
! #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_ppc_darwin_80	1
! #define SYS_NAME		"ppc_darwin_80"
! #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_80
! #define AFSBIG_ENDIAN		1
! #elif defined(__i386__)
! #define sys_x86_darwin_12	1
! #define sys_x86_darwin_13	1
! #define sys_x86_darwin_14	1
! #define sys_x86_darwin_60	1
! #define sys_x86_darwin_70	1
! #define sys_x86_darwin_80	1
! #define SYS_NAME		"x86_darwin_80"
! #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_80
! #define AFSLITTLE_ENDIAN	1
! #else
! #error Unsupported architecture
! #endif
  #define AFS_HAVE_FFS    1	/* Use system's ffs. */
  
  #define AFS_UIOSYS      UIO_SYSSPACE
Index: openafs/src/config/param.ppc_darwin_90.h
diff -c /dev/null openafs/src/config/param.ppc_darwin_90.h:1.1.2.2
*** /dev/null	Fri Mar 17 19:52:19 2006
--- openafs/src/config/param.ppc_darwin_90.h	Thu Mar  9 01:41:42 2006
***************
*** 0 ****
--- 1,184 ----
+ #ifndef UKERNEL
+ /* This section for kernel libafs compiles only */
+ 
+ #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_CLIENT        1
+ #define AFS_64BIT_IOPS_ENV	1
+ #if defined(__ppc__)
+ #define AFS_PPC_ENV		1
+ #elif defined(__i386__)
+ #define AFS_X86_ENV		1
+ #else
+ #error Unsupported architecture
+ #endif
+ #define AFS_VFSINCL_ENV		1
+ 
+ #include <afs/afs_sysnames.h>
+ 
+ #define AFS_DARWIN_ENV
+ #define AFS_DARWIN13_ENV
+ #define AFS_DARWIN14_ENV
+ #define AFS_DARWIN60_ENV
+ #define AFS_DARWIN70_ENV
+ #define AFS_DARWIN80_ENV
+ #define AFS_DARWIN90_ENV
+ #define AFS_NONFSTRANS
+ #define AFS_SYSCALL             230
+ #define AFS_NAMEI_ENV 1
+ #define DARWIN_REFBASE 3
+ 
+ /* File system entry (used if mount.h doesn't define MOUNT_AFS */
+ #define AFS_MOUNT_AFS    "afs"
+ 
+ /* Machine / Operating system information */
+ #if defined(__ppc__)
+ #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_ppc_darwin_80	1
+ #define sys_ppc_darwin_90	1
+ #define SYS_NAME		"ppc_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_90
+ #define AFSBIG_ENDIAN		1
+ #elif defined(__i386__)
+ #define sys_x86_darwin_12	1
+ #define sys_x86_darwin_13	1
+ #define sys_x86_darwin_14	1
+ #define sys_x86_darwin_60	1
+ #define sys_x86_darwin_70	1
+ #define sys_x86_darwin_80	1
+ #define sys_x86_darwin_90	1
+ #define SYS_NAME		"x86_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_90
+ #define AFSLITTLE_ENDIAN	1
+ #else
+ #error Unsupported architecture
+ #endif
+ #define AFS_HAVE_FFS    1	/* Use system's ffs. */
+ 
+ #define AFS_GCPAGS               0
+ #define RXK_LISTENER_ENV         1
+ 
+ #ifdef KERNEL
+ #undef MACRO_BEGIN
+ #undef MACRO_END
+ #include <kern/macro_help.h>
+ #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)   _MALLOC(x, M_TEMP, M_WAITOK)
+ #define AFS_KFREE(x,y)  _FREE(x,M_TEMP)
+ #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 BIND_8_COMPAT
+ 
+ #endif
+ #endif /* AFS_PARAM_H */
+ 
+ #else /* !defined(UKERNEL) */
+ 
+ /* This section for user space compiles only */
+ 
+ #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. */
+ #if defined(__ppc__)
+ #define AFS_PPC_ENV		1
+ #elif defined(__i386__)
+ #define AFS_X86_ENV		1
+ #else
+ #error Unsupported architecture
+ #endif
+ 
+ #include <afs/afs_sysnames.h>
+ #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_USR_DARWIN80_ENV
+ #define AFS_USR_DARWIN90_ENV
+ #define AFS_NONFSTRANS
+ #define AFS_SYSCALL             230
+ #define DARWIN_REFBASE 0
+ 
+ /* File system entry (used if mount.h doesn't define MOUNT_AFS */
+ #define AFS_MOUNT_AFS    "afs"
+ 
+ /* Machine / Operating system information */
+ #if defined(__ppc__)
+ #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_ppc_darwin_80	1
+ #define sys_ppc_darwin_90	1
+ #define SYS_NAME		"ppc_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_90
+ #define AFSBIG_ENDIAN		1
+ #elif defined(__i386__)
+ #define sys_x86_darwin_12	1
+ #define sys_x86_darwin_13	1
+ #define sys_x86_darwin_14	1
+ #define sys_x86_darwin_60	1
+ #define sys_x86_darwin_70	1
+ #define sys_x86_darwin_80	1
+ #define sys_x86_darwin_90	1
+ #define SYS_NAME		"x86_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_90
+ #define AFSLITTLE_ENDIAN	1
+ #else
+ #error Unsupported architecture
+ #endif
+ #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 */
+ 
+ #endif /* !defined(UKERNEL) */
Index: openafs/src/config/param.s390_linux26.h
diff -c /dev/null openafs/src/config/param.s390_linux26.h:1.1.2.2
*** /dev/null	Fri Mar 17 19:52:19 2006
--- openafs/src/config/param.s390_linux26.h	Wed Mar 15 11:16:36 2006
***************
*** 0 ****
--- 1,162 ----
+ #ifndef UKERNEL
+ /* This section for kernel libafs compiles only */
+ 
+ /*
+  * Copyright 2000, International Business Machines Corporation and others.
+  * All Rights Reserved.
+  * 
+  * 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
+  */
+ 
+ 
+ #ifndef AFS_PARAM_H
+ #define AFS_PARAM_H
+ 
+ /* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+  * it's a judgment call. If something is obviously s390 specific, use that
+  * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+  * in the sysname is the current version of the client. This takes into
+  * account the perferred OS user space configuration as well as the kernel.
+  */
+ 
+ #define AFS_LINUX20_ENV 1
+ #define AFS_LINUX22_ENV	1
+ #define AFS_LINUX24_ENV	1
+ #define AFS_LINUX26_ENV	1
+ #define AFS_S390_LINUX20_ENV    1
+ #define AFS_S390_LINUX22_ENV	1
+ #define AFS_S390_LINUX24_ENV	1
+ #define AFS_S390_LINUX26_ENV	1
+ #define AFS_NONFSTRANS 1
+ 
+ #define AFS_MOUNT_AFS "afs"	/* The name of the filesystem type. */
+ #define AFS_SYSCALL 137
+ #define AFS_64BIT_ENV	1
+ #define AFS_64BIT_CLIENT	1
+ #define AFS_64BIT_IOPS_ENV  1
+ #define AFS_NAMEI_ENV     1	/* User space interface to file system */
+ 
+ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+ #include <linux/threads.h>
+ 
+ #include <linux/config.h>
+ #ifdef CONFIG_SMP
+ #undef CONFIG_SMP
+ #endif
+ /* Using "AFS_SMP" to map to however many #define's are required to get
+  * MP to compile for Linux
+  */
+ #ifdef AFS_SMP
+ #define CONFIG_SMP 1
+ #ifndef CONFIG_S390_LOCAL_APIC
+ #define CONFIG_S390_LOCAL_APIC 1
+ #endif
+ #ifndef __SMP__
+ #define __SMP__
+ #endif
+ #endif
+ #define AFS_GLOBAL_SUNLOCK
+ #if defined(MODULE) && defined(CONFIG_MODVERSIONS)
+ #define MODVERSIONS
+ // #include <linux/modversions.h>
+ #endif
+ #endif /* __KERNEL__  && !DUMP_KERNEL */
+ 
+ #include <afs/afs_sysnames.h>
+ 
+ #define AFS_USERSPACE_IP_ADDR 1
+ #define RXK_LISTENER_ENV 1
+ #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
+ 
+ /* Machine / Operating system information */
+ #define SYS_NAME	"s390_linux26"
+ #define SYS_NAME_ID	SYS_NAME_ID_s390_linux26
+ #define AFSBIG_ENDIAN    1
+ #define AFS_HAVE_FFS        1	/* Use system's ffs. */
+ #define AFS_HAVE_STATVFS    0	/* System doesn't support statvfs */
+ #define AFS_VM_RDWR_ENV	    1	/* read/write implemented via VM */
+ #define AFS_USE_GETTIMEOFDAY       1	/* use gettimeofday to implement rx clock */
+ 
+ #ifdef KERNEL
+ #ifndef MIN
+ #define MIN(A,B) ((A) < (B) ? (A) : (B))
+ #endif
+ #ifndef MAX
+ #define MAX(A,B) ((A) > (B) ? (A) : (B))
+ #endif
+ #endif /* KERNEL */
+ 
+ #endif /* AFS_PARAM_H */
+ 
+ #else /* !defined(UKERNEL) */
+ 
+ /* This section for user space compiles only */
+ 
+ /* 
+  * Copyright 2000, International Business Machines Corporation and others.
+  * All Rights Reserved.
+  * 
+  * 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
+  */
+ 
+ #ifndef AFS_PARAM_H
+ #define AFS_PARAM_H
+ 
+ /* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+  * it's a judgment call. If something is obviously s390 specific, use that
+  * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+  * in the sysname is the current version of the client. This takes into
+  * account the perferred OS user space configuration as well as the kernel.
+  */
+ 
+ #define UKERNEL			1	/* user space kernel */
+ #define AFS_ENV			1
+ #define AFS_USR_LINUX20_ENV     1
+ #define AFS_USR_LINUX22_ENV	1
+ #define AFS_USR_LINUX24_ENV	1
+ #define AFS_USR_LINUX26_ENV	1
+ #define AFS_NONFSTRANS 1
+ 
+ #define AFS_MOUNT_AFS "afs"	/* The name of the filesystem type. */
+ #define AFS_SYSCALL 137
+ #define AFS_64BIT_IOPS_ENV  1
+ #define AFS_NAMEI_ENV     1	/* User space interface to file system */
+ #include <afs/afs_sysnames.h>
+ 
+ #define AFS_USERSPACE_IP_ADDR 1
+ #define RXK_LISTENER_ENV 1
+ #define AFS_GCPAGS		0	/* if nonzero, garbage collect PAGs */
+ 
+ 
+ /* Machine / Operating system information */
+ #define SYS_NAME	"s390_linux26"
+ #define SYS_NAME_ID	SYS_NAME_ID_s390_linux26
+ #define AFSBIG_ENDIAN    1
+ #define AFS_HAVE_FFS        1	/* Use system's ffs. */
+ #define AFS_HAVE_STATVFS    0	/* System doesn't support statvfs */
+ #define AFS_VM_RDWR_ENV	    1	/* read/write implemented via VM */
+ 
+ #define	afsio_iov	uio_iov
+ #define	afsio_iovcnt	uio_iovcnt
+ #define	afsio_offset	uio_offset
+ #define	afsio_seg	uio_segflg
+ #define	afsio_fmode	uio_fmode
+ #define	afsio_resid	uio_resid
+ #define	AFS_UIOSYS	1
+ #define	AFS_UIOUSER	UIO_USERSPACE
+ #define	AFS_CLBYTES	MCLBYTES
+ #define	AFS_MINCHANGE	2
+ #define	VATTR_NULL	usr_vattr_null
+ 
+ #define AFS_DIRENT
+ #ifndef CMSERVERPREF
+ #define CMSERVERPREF
+ #endif
+ 
+ #endif /* AFS_PARAM_H */
+ 
+ #endif /* !defined(UKERNEL) */
Index: openafs/src/config/param.x86_darwin_80.h
diff -c openafs/src/config/param.x86_darwin_80.h:1.1.2.2 openafs/src/config/param.x86_darwin_80.h:1.1.2.3
*** openafs/src/config/param.x86_darwin_80.h:1.1.2.2	Fri Oct 21 00:48:48 2005
--- openafs/src/config/param.x86_darwin_80.h	Thu Mar  9 01:41:42 2006
***************
*** 8,13 ****
--- 8,20 ----
  #define AFS_64BIT_ENV           1	/* Defines afs_int32 as int, not long. */
  #define AFS_64BIT_CLIENT        1
  #define AFS_64BIT_IOPS_ENV	1
+ #if defined(__ppc__)
+ #define AFS_PPC_ENV		1
+ #elif defined(__i386__)
+ #define AFS_X86_ENV		1
+ #else
+ #error Unsupported architecture
+ #endif
  #define AFS_VFSINCL_ENV		1
  
  #include <afs/afs_sysnames.h>
***************
*** 27,41 ****
  #define AFS_MOUNT_AFS    "afs"
  
  /* Machine / Operating system information */
! #define sys_x86_darwin_12   1
! #define sys_x86_darwin_13   1
! #define sys_x86_darwin_14   1
! #define sys_x86_darwin_60   1
! #define sys_x86_darwin_70   1
! #define sys_x86_darwin_80   1
! #define SYS_NAME        "x86_darwin_80"
! #define SYS_NAME_ID     SYS_NAME_ID_x86_darwin_80
! #define AFSLITTLE_ENDIAN   1
  #define AFS_HAVE_FFS    1	/* Use system's ffs. */
  
  #define AFS_GCPAGS               0
--- 34,62 ----
  #define AFS_MOUNT_AFS    "afs"
  
  /* Machine / Operating system information */
! #if defined(__ppc__)
! #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_ppc_darwin_80	1
! #define SYS_NAME		"ppc_darwin_80"
! #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_80
! #define AFSBIG_ENDIAN		1
! #elif defined(__i386__)
! #define sys_x86_darwin_12	1
! #define sys_x86_darwin_13	1
! #define sys_x86_darwin_14	1
! #define sys_x86_darwin_60	1
! #define sys_x86_darwin_70	1
! #define sys_x86_darwin_80	1
! #define SYS_NAME		"x86_darwin_80"
! #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_80
! #define AFSLITTLE_ENDIAN	1
! #else
! #error Unsupported architecture
! #endif
  #define AFS_HAVE_FFS    1	/* Use system's ffs. */
  
  #define AFS_GCPAGS               0
***************
*** 81,87 ****
  #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_X86_ENV 1
  
  #include <afs/afs_sysnames.h>
  #define AFS_USERSPACE_ENV
--- 102,114 ----
  #define AFS_VFSINCL_ENV 1	/* NOBODY uses this.... */
  #define AFS_ENV                 1
  #define AFS_64BIT_ENV           1	/* Defines afs_int32 as int, not long. */
! #if defined(__ppc__)
! #define AFS_PPC_ENV		1
! #elif defined(__i386__)
! #define AFS_X86_ENV		1
! #else
! #error Unsupported architecture
! #endif
  
  #include <afs/afs_sysnames.h>
  #define AFS_USERSPACE_ENV
***************
*** 99,113 ****
  #define AFS_MOUNT_AFS    "afs"
  
  /* Machine / Operating system information */
! #define sys_x86_darwin_12   1
! #define sys_x86_darwin_13   1
! #define sys_x86_darwin_14   1
! #define sys_x86_darwin_60   1
! #define sys_x86_darwin_70   1
! #define sys_x86_darwin_80   1
! #define SYS_NAME        "x86_darwin_80"
! #define SYS_NAME_ID     SYS_NAME_ID_x86_darwin_80
! #define AFSLITTLE_ENDIAN   1
  #define AFS_HAVE_FFS    1	/* Use system's ffs. */
  
  #define AFS_UIOSYS      UIO_SYSSPACE
--- 126,154 ----
  #define AFS_MOUNT_AFS    "afs"
  
  /* Machine / Operating system information */
! #if defined(__ppc__)
! #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_ppc_darwin_80	1
! #define SYS_NAME		"ppc_darwin_80"
! #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_80
! #define AFSBIG_ENDIAN		1
! #elif defined(__i386__)
! #define sys_x86_darwin_12	1
! #define sys_x86_darwin_13	1
! #define sys_x86_darwin_14	1
! #define sys_x86_darwin_60	1
! #define sys_x86_darwin_70	1
! #define sys_x86_darwin_80	1
! #define SYS_NAME		"x86_darwin_80"
! #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_80
! #define AFSLITTLE_ENDIAN	1
! #else
! #error Unsupported architecture
! #endif
  #define AFS_HAVE_FFS    1	/* Use system's ffs. */
  
  #define AFS_UIOSYS      UIO_SYSSPACE
Index: openafs/src/config/param.x86_darwin_90.h
diff -c /dev/null openafs/src/config/param.x86_darwin_90.h:1.1.2.2
*** /dev/null	Fri Mar 17 19:52:19 2006
--- openafs/src/config/param.x86_darwin_90.h	Thu Mar  9 01:41:42 2006
***************
*** 0 ****
--- 1,184 ----
+ #ifndef UKERNEL
+ /* This section for kernel libafs compiles only */
+ 
+ #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_CLIENT        1
+ #define AFS_64BIT_IOPS_ENV	1
+ #if defined(__ppc__)
+ #define AFS_PPC_ENV		1
+ #elif defined(__i386__)
+ #define AFS_X86_ENV		1
+ #else
+ #error Unsupported architecture
+ #endif
+ #define AFS_VFSINCL_ENV		1
+ 
+ #include <afs/afs_sysnames.h>
+ 
+ #define AFS_DARWIN_ENV
+ #define AFS_DARWIN13_ENV
+ #define AFS_DARWIN14_ENV
+ #define AFS_DARWIN60_ENV
+ #define AFS_DARWIN70_ENV
+ #define AFS_DARWIN80_ENV
+ #define AFS_DARWIN90_ENV
+ #define AFS_NONFSTRANS
+ #define AFS_SYSCALL             230
+ #define AFS_NAMEI_ENV 1
+ #define DARWIN_REFBASE 3
+ 
+ /* File system entry (used if mount.h doesn't define MOUNT_AFS */
+ #define AFS_MOUNT_AFS    "afs"
+ 
+ /* Machine / Operating system information */
+ #if defined(__ppc__)
+ #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_ppc_darwin_80	1
+ #define sys_ppc_darwin_90	1
+ #define SYS_NAME		"ppc_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_90
+ #define AFSBIG_ENDIAN		1
+ #elif defined(__i386__)
+ #define sys_x86_darwin_12	1
+ #define sys_x86_darwin_13	1
+ #define sys_x86_darwin_14	1
+ #define sys_x86_darwin_60	1
+ #define sys_x86_darwin_70	1
+ #define sys_x86_darwin_80	1
+ #define sys_x86_darwin_90	1
+ #define SYS_NAME		"x86_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_90
+ #define AFSLITTLE_ENDIAN	1
+ #else
+ #error Unsupported architecture
+ #endif
+ #define AFS_HAVE_FFS    1	/* Use system's ffs. */
+ 
+ #define AFS_GCPAGS               0
+ #define RXK_LISTENER_ENV         1
+ 
+ #ifdef KERNEL
+ #undef MACRO_BEGIN
+ #undef MACRO_END
+ #include <kern/macro_help.h>
+ #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)   _MALLOC(x, M_TEMP, M_WAITOK)
+ #define AFS_KFREE(x,y)  _FREE(x,M_TEMP)
+ #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 BIND_8_COMPAT
+ 
+ #endif
+ #endif /* AFS_PARAM_H */
+ 
+ #else /* !defined(UKERNEL) */
+ 
+ /* This section for user space compiles only */
+ 
+ #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. */
+ #if defined(__ppc__)
+ #define AFS_PPC_ENV		1
+ #elif defined(__i386__)
+ #define AFS_X86_ENV		1
+ #else
+ #error Unsupported architecture
+ #endif
+ 
+ #include <afs/afs_sysnames.h>
+ #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_USR_DARWIN80_ENV
+ #define AFS_USR_DARWIN90_ENV
+ #define AFS_NONFSTRANS
+ #define AFS_SYSCALL             230
+ #define DARWIN_REFBASE 0
+ 
+ /* File system entry (used if mount.h doesn't define MOUNT_AFS */
+ #define AFS_MOUNT_AFS    "afs"
+ 
+ /* Machine / Operating system information */
+ #if defined(__ppc__)
+ #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_ppc_darwin_80	1
+ #define sys_ppc_darwin_90	1
+ #define SYS_NAME		"ppc_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_90
+ #define AFSBIG_ENDIAN		1
+ #elif defined(__i386__)
+ #define sys_x86_darwin_12	1
+ #define sys_x86_darwin_13	1
+ #define sys_x86_darwin_14	1
+ #define sys_x86_darwin_60	1
+ #define sys_x86_darwin_70	1
+ #define sys_x86_darwin_80	1
+ #define sys_x86_darwin_90	1
+ #define SYS_NAME		"x86_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_90
+ #define AFSLITTLE_ENDIAN	1
+ #else
+ #error Unsupported architecture
+ #endif
+ #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 */
+ 
+ #endif /* !defined(UKERNEL) */
Index: openafs/src/des/andrew-conf.h
diff -c openafs/src/des/andrew-conf.h:1.16.2.1 openafs/src/des/andrew-conf.h:1.16.2.2
*** openafs/src/des/andrew-conf.h:1.16.2.1	Fri Oct 21 00:48:48 2005
--- openafs/src/des/andrew-conf.h	Thu Mar  9 01:41:43 2006
***************
*** 37,43 ****
  #error unknown osf
  #endif
  #else
! #if	defined(AFS_X86_ENV)
  #include "conf-bsd-ncr.h"
  #else
  #ifdef AFS_NT40_ENV
--- 37,43 ----
  #error unknown osf
  #endif
  #else
! #if	defined(AFS_X86_ENV) && !defined(AFS_DARWIN_ENV)
  #include "conf-bsd-ncr.h"
  #else
  #ifdef AFS_NT40_ENV
Index: openafs/src/des/conf-darwin.h
diff -c openafs/src/des/conf-darwin.h:1.1.2.2 openafs/src/des/conf-darwin.h:1.1.2.3
*** openafs/src/des/conf-darwin.h:1.1.2.2	Fri Oct 21 00:48:48 2005
--- openafs/src/des/conf-darwin.h	Thu Mar  9 01:41:43 2006
***************
*** 9,11 ****
--- 9,16 ----
  #error "MSBFIRST or LSBFIRST undefined"
  #endif
  #define MUSTALIGN
+ #if !defined(KERNEL) && defined(AFS_DARWIN80_ENV)
+ extern int _darwin_swap_long_bytes_bit_number(afs_uint32 x);
+ extern char *_darwin_whichstr[];
+ extern int _darwin_which;
+ #endif /* !KERNEL && AFS_DARWIN80_ENV */
Index: openafs/src/des/make_fp.c
diff -c openafs/src/des/make_fp.c:1.6 openafs/src/des/make_fp.c:1.6.2.1
*** openafs/src/des/make_fp.c:1.6	Tue Jul 15 19:15:00 2003
--- openafs/src/des/make_fp.c	Thu Mar  9 01:41:43 2006
***************
*** 12,18 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/make_fp.c,v 1.6 2003/07/15 23:15:00 shadow Exp $");
  
  #include <mit-cpyright.h>
  #include <stdio.h>
--- 12,18 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/make_fp.c,v 1.6.2.1 2006/03/09 06:41:43 shadow Exp $");
  
  #include <mit-cpyright.h>
  #include <stdio.h>
***************
*** 27,32 ****
--- 27,37 ----
  gen(FILE * stream)
  {
      register int i;
+ #ifdef AFS_DARWIN80_ENV
+     int j;
+ 
+ #define swap_long_bytes_bit_number _darwin_swap_long_bytes_bit_number
+ #endif /* AFS_DARWIN80_ENV */
  
      /* clear the output */
      fprintf(stream, "    L2 = 0; R2 = 0;\n");
***************
*** 41,46 ****
--- 46,57 ----
  #define SWAP(i,j) \
      swap_long_bytes_bit_number(swap_bit_pos_0_to_ansi((unsigned)i)-j)
  
+ #ifdef AFS_DARWIN80_ENV
+   for(j = 0;; j++) {
+     fprintf(stream, _darwin_whichstr[j]);
+     if (j == 2)
+ 	break;
+ #endif /* AFS_DARWIN80_ENV */
      /* first setup FP */
      fprintf(stream, "/* FP operations */\n/* first left to left */\n");
  
***************
*** 67,70 ****
--- 78,85 ----
      for (i = 32; i <= 63; i++)
  	if (FP[i] >= 32)
  	    test_set(stream, "R1", FP[i] - 32, "R2", SWAP(i, 32));
+ #ifdef AFS_DARWIN80_ENV
+     _darwin_which = !_darwin_which;
+   }
+ #endif /* AFS_DARWIN80_ENV */
  }
Index: openafs/src/des/make_ip.c
diff -c openafs/src/des/make_ip.c:1.7 openafs/src/des/make_ip.c:1.7.2.1
*** openafs/src/des/make_ip.c:1.7	Tue Jul 15 19:15:00 2003
--- openafs/src/des/make_ip.c	Thu Mar  9 01:41:43 2006
***************
*** 12,18 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/make_ip.c,v 1.7 2003/07/15 23:15:00 shadow Exp $");
  
  #include <mit-cpyright.h>
  #include <stdio.h>
--- 12,18 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/make_ip.c,v 1.7.2.1 2006/03/09 06:41:43 shadow Exp $");
  
  #include <mit-cpyright.h>
  #include <stdio.h>
***************
*** 31,40 ****
--- 31,51 ----
  gen(FILE * stream)
  {
      register int i;
+ #ifdef AFS_DARWIN80_ENV
+     int j;
+ 
+ #define swap_long_bytes_bit_number _darwin_swap_long_bytes_bit_number
+ #endif /* AFS_DARWIN80_ENV */
  
      /* clear the output */
      fprintf(stream, "    L2 = 0; R2 = 0;\n");
  
+ #ifdef AFS_DARWIN80_ENV
+   for(j = 0;; j++) {
+     fprintf(stream, _darwin_whichstr[j]);
+     if (j == 2)
+ 	break;
+ #endif /* AFS_DARWIN80_ENV */
      /* first setup IP */
      fprintf(stream, "/* IP operations */\n/* first left to left */\n");
  
***************
*** 60,64 ****
--- 71,79 ----
      for (i = 32; i <= 63; i++)
  	if (IP[i] >= 32)
  	    test_set(stream, "R1", SWAP(IP[i] - 32), "R2", i - 32);
+ #ifdef AFS_DARWIN80_ENV
+     _darwin_which = !_darwin_which;
+   }
+ #endif /* AFS_DARWIN80_ENV */
      exit(0);
  }
Index: openafs/src/des/make_p.c
diff -c openafs/src/des/make_p.c:1.5 openafs/src/des/make_p.c:1.5.2.1
*** openafs/src/des/make_p.c:1.5	Tue Jul 15 19:15:00 2003
--- openafs/src/des/make_p.c	Thu Mar  9 01:41:43 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/make_p.c,v 1.5 2003/07/15 23:15:00 shadow Exp $");
  
  #include <mit-cpyright.h>
  #include <stdio.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/make_p.c,v 1.5.2.1 2006/03/09 06:41:43 shadow Exp $");
  
  #include <mit-cpyright.h>
  #include <stdio.h>
***************
*** 39,44 ****
--- 39,57 ----
      fprintf(stream, "    P_temp = R1;\n");
      fprintf(stream, "    P_temp_p = (unsigned char *) &P_temp;\n");
  
+ #ifdef AFS_DARWIN80_ENV
+     fprintf(stream, "#if defined(__i386__)\n");
+     fprintf(stream, "    R2 = P_prime[0][*P_temp_p++];\n");
+     fprintf(stream, "    R2 |= P_prime[1][*P_temp_p++];\n");
+     fprintf(stream, "    R2 |= P_prime[2][*P_temp_p++];\n");
+     fprintf(stream, "    R2 |= P_prime[3][*P_temp_p];\n");
+     fprintf(stream, "#elif defined(__ppc__)\n");
+     fprintf(stream, "    R2 = P_prime[3][*P_temp_p++];\n");
+     fprintf(stream, "    R2 |= P_prime[2][*P_temp_p++];\n");
+     fprintf(stream, "    R2 |= P_prime[1][*P_temp_p++];\n");
+     fprintf(stream, "    R2 |= P_prime[0][*P_temp_p];\n");
+     fprintf(stream, "#else\n#error Unsupported architecture\n#endif\n");
+ #else /* !AFS_DARWIN80_ENV */
  #ifdef	LSBFIRST
      fprintf(stream, "    R2 = P_prime[0][*P_temp_p++];\n");
      fprintf(stream, "    R2 |= P_prime[1][*P_temp_p++];\n");
***************
*** 50,54 ****
--- 63,68 ----
      fprintf(stream, "    R2 |= P_prime[1][*P_temp_p++];\n");
      fprintf(stream, "    R2 |= P_prime[0][*P_temp_p];\n");
  #endif /* MSBFIRST */
+ #endif /* !AFS_DARWIN80_ENV */
  #endif /* BIG */
  }
Index: openafs/src/des/misc.c
diff -c openafs/src/des/misc.c:1.7 openafs/src/des/misc.c:1.7.2.1
*** openafs/src/des/misc.c:1.7	Tue Jul 15 19:15:00 2003
--- openafs/src/des/misc.c	Thu Mar  9 01:41:43 2006
***************
*** 14,20 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/misc.c,v 1.7 2003/07/15 23:15:00 shadow Exp $");
  
  #include <mit-cpyright.h>
  #ifndef KERNEL
--- 14,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/misc.c,v 1.7.2.1 2006/03/09 06:41:43 shadow Exp $");
  
  #include <mit-cpyright.h>
  #ifndef KERNEL
***************
*** 270,275 ****
--- 270,304 ----
  #endif /* MSBFIRST */
  }
  
+ #if !defined(KERNEL) && defined(AFS_DARWIN80_ENV)
+ char *_darwin_whichstr[] = {
+     "#if defined(__ppc__)\n",
+     "#elif defined(__i386__)\n",
+     "#else\n#error architecture unsupported\n#endif\n"
+ };
+ int _darwin_which = 1;
+ 
+ int
+ _darwin_swap_long_bytes_bit_number(afs_uint32 x)
+ {
+     /*
+      * given a bit number (0-31) from a vax, swap the byte part of the
+      * bit number to change the byte ordering to mSBFIRST type
+      */
+ 
+     afs_uint32 y, z;
+ 
+     if (!_darwin_which)
+ 	return x;
+ 
+     y = x / 8;			/* initial byte component */
+     z = x % 8;			/* bit within byte */
+ 
+     x = (3 - y) * 8 + z;
+     return x;
+ }
+ #endif /* !KERNEL && AFS_DARWIN80_ENV */
+ 
  void
  test_set(FILE * stream, const char *src, int testbit, const char *dest,
  	 int setbit)
Index: openafs/src/des/test/Makefile.in
diff -c openafs/src/des/test/Makefile.in:1.8 openafs/src/des/test/Makefile.in:1.8.2.1
*** openafs/src/des/test/Makefile.in:1.8	Tue Oct 15 23:58:36 2002
--- openafs/src/des/test/Makefile.in	Thu Mar  9 01:41:44 2006
***************
*** 1,7 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=-g -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
  
  #  Test programs
  PROGS = \
--- 1,7 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=-g -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
  
  #  Test programs
  PROGS = \
***************
*** 9,15 ****
  	testit \
  	verify
  
! LDFLAGS = ${XLDFLAGS}
  
  LIBS=\
  	${TOP_LIBDIR}/libdes.a \
--- 9,15 ----
  	testit \
  	verify
  
! LDFLAGS = ${XLDFLAGS} ${ARCHFLAGS}
  
  LIBS=\
  	${TOP_LIBDIR}/libdes.a \
Index: openafs/src/dir/test/Makefile.in
diff -c openafs/src/dir/test/Makefile.in:1.6 openafs/src/dir/test/Makefile.in:1.6.2.1
*** openafs/src/dir/test/Makefile.in:1.6	Mon Nov 11 16:23:15 2002
--- openafs/src/dir/test/Makefile.in	Thu Mar  9 01:41:44 2006
***************
*** 9,15 ****
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  LIBS = ${srcdir}/lib/libdir.a ${srcdir}/lib/util.a  ${srcdir}/lib/liblwp.a
! CFLAGS=${OPTMZ} -I${TOP_INCDIR} -I${srcdir} -I${TOP_OBJDIR}/src/config ${XCFLAGS}
  
  OBJS=test-salvage.o physio.o dtest.o
  
--- 9,15 ----
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  LIBS = ${srcdir}/lib/libdir.a ${srcdir}/lib/util.a  ${srcdir}/lib/liblwp.a
! CFLAGS=${OPTMZ} -I${TOP_INCDIR} -I${srcdir} -I${TOP_OBJDIR}/src/config ${XCFLAGS} ${ARCHFLAGS}
  
  OBJS=test-salvage.o physio.o dtest.o
  
Index: openafs/src/fsint/common.xg
diff -c openafs/src/fsint/common.xg:1.5 openafs/src/fsint/common.xg:1.5.2.1
*** openafs/src/fsint/common.xg:1.5	Tue Mar  4 11:19:48 2003
--- openafs/src/fsint/common.xg	Thu Mar  9 11:28:59 2006
***************
*** 127,132 ****
--- 127,133 ----
  const AFS_XSTATSCOLL_CALL_INFO = 0;	 /*FS call counting & info*/
  const AFS_XSTATSCOLL_PERF_INFO = 1;	 /*FS performance info*/
  const AFS_XSTATSCOLL_FULL_PERF_INFO = 2; /*Full FS performance info*/
+ const AFS_XSTATSCOLL_CBSTATS = 3;	 /*Callback package counters */
  
  typedef afs_uint32 VolumeId;
  typedef afs_uint32 VolId;
Index: openafs/src/fsprobe/fsprobe_test.c
diff -c openafs/src/fsprobe/fsprobe_test.c:1.8 openafs/src/fsprobe/fsprobe_test.c:1.8.2.1
*** openafs/src/fsprobe/fsprobe_test.c:1.8	Tue Jul 15 19:15:09 2003
--- openafs/src/fsprobe/fsprobe_test.c	Thu Mar  9 01:41:45 2006
***************
*** 17,23 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/fsprobe/fsprobe_test.c,v 1.8 2003/07/15 23:15:09 shadow Exp $");
  
  #ifdef HAVE_STRING_H
  #include <string.h>
--- 17,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/fsprobe/fsprobe_test.c,v 1.8.2.1 2006/03/09 06:41:45 shadow Exp $");
  
  #ifdef HAVE_STRING_H
  #include <string.h>
***************
*** 171,177 ****
--- 171,181 ----
      /*
       * Fill in the socket array for bigbird, vice1, and vice2.
       */
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+     FSSktArray[0].sin_family = AF_INET;		/*Internet family */
+ #else
      FSSktArray[0].sin_family = htons(AF_INET);	/*Internet family */
+ #endif
      FSSktArray[0].sin_port = htons(7000);	/*FileServer port */
      he = hostutil_GetHostByName("servername1");
      if (he == NULL) {
***************
*** 180,186 ****
--- 184,194 ----
      }
      memcpy(&(FSSktArray[0].sin_addr.s_addr), he->h_addr, 4);
  
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+     FSSktArray[1].sin_family = AF_INET;		/*Internet address family */
+ #else
      FSSktArray[1].sin_family = htons(AF_INET);	/*Internet address family */
+ #endif
      FSSktArray[1].sin_port = htons(7000);	/*FileServer port */
      he = hostutil_GetHostByName("servername2");
      if (he == NULL) {
***************
*** 189,195 ****
--- 197,207 ----
      }
      memcpy(&(FSSktArray[1].sin_addr.s_addr), he->h_addr, 4);
  
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+     FSSktArray[2].sin_family = AF_INET;		/*Internet address family */
+ #else
      FSSktArray[2].sin_family = htons(AF_INET);	/*Internet address family */
+ #endif
      FSSktArray[2].sin_port = htons(7000);	/*FileServer port */
      he = hostutil_GetHostByName("servername3");
      if (he == NULL) {
Index: openafs/src/kauth/test/Makefile.in
diff -c openafs/src/kauth/test/Makefile.in:1.6 openafs/src/kauth/test/Makefile.in:1.6.8.1
*** openafs/src/kauth/test/Makefile.in:1.6	Wed Oct 31 23:59:53 2001
--- openafs/src/kauth/test/Makefile.in	Thu Mar  9 01:41:46 2006
***************
*** 12,18 ****
  LDIRS= -L${DESTDIR}/lib -L${DESTDIR}/lib/afs -L..
  LIBS= -llwp -ldes -lrxkad -lauth -lcmd -lubik -lprot -lsys -lrx -lcom_err -lkauth
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS}
  
  
  # the only tests _known_ to work are multiklog and the tcl scripts.
--- 12,18 ----
  LDIRS= -L${DESTDIR}/lib -L${DESTDIR}/lib/afs -L..
  LIBS= -llwp -ldes -lrxkad -lauth -lcmd -lubik -lprot -lsys -lrx -lcom_err -lkauth
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS} ${ARCHFLAGS}
  
  
  # the only tests _known_ to work are multiklog and the tcl scripts.
Index: openafs/src/libacl/test/Makefile.in
diff -c openafs/src/libacl/test/Makefile.in:1.6 openafs/src/libacl/test/Makefile.in:1.6.8.1
*** openafs/src/libacl/test/Makefile.in:1.6	Wed Oct 31 23:59:54 2001
--- openafs/src/libacl/test/Makefile.in	Thu Mar  9 01:41:47 2006
***************
*** 12,18 ****
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  LIBS= -lacl -lprot -lubik -lrx -llwp -lauth -lrxkad -lsys ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS}
  
  all: acltest
  
--- 12,18 ----
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  LIBS= -lacl -lprot -lubik -lrx -llwp -lauth -lrxkad -lsys ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS} ${ARCHFLAGS}
  
  all: acltest
  
Index: openafs/src/libafs/Makefile.common.in
diff -c openafs/src/libafs/Makefile.common.in:1.21.2.2 openafs/src/libafs/Makefile.common.in:1.21.2.3
*** openafs/src/libafs/Makefile.common.in:1.21.2.2	Sun Apr  3 15:32:41 2005
--- openafs/src/libafs/Makefile.common.in	Thu Mar  9 01:41:47 2006
***************
*** 47,55 ****
  	$(CC) $(COMMON_INCLUDE) $(CFLAGS) -P -c $<
  
  .c.o:
! 	$(CC) $(COMMON_INCLUDE) $(CFLAGS) $(KERN_DBG) -c $<
! CRULE_NOOPT=	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS) -c $?
! CRULE_OPT=	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS) -c $?
  
  system:	all
  
--- 47,55 ----
  	$(CC) $(COMMON_INCLUDE) $(CFLAGS) -P -c $<
  
  .c.o:
! 	$(CC) $(COMMON_INCLUDE) $(CFLAGS) $(CFLAGS-$@) $(KERN_DBG) -c $<
! CRULE_NOOPT=	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS) $(CFLAGS-$@) -o $@ -c $?
! CRULE_OPT=	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS) $(CFLAGS-$@) -o $@ -c $?
  
  system:	all
  
***************
*** 254,260 ****
  rx_rdwr.o: $(TOP_SRC_RX)/rx_rdwr.c
  	$(CRULE_OPT)
  afs_uuid.o: $(TOP_SRCDIR)/util/uuid.c
! 	$(CRULE_OPT) -o afs_uuid.o
  xdr_afsuuid.o: $(TOP_SRCDIR)/rx/xdr_afsuuid.c
  	$(CRULE_OPT)
  
--- 254,260 ----
  rx_rdwr.o: $(TOP_SRC_RX)/rx_rdwr.c
  	$(CRULE_OPT)
  afs_uuid.o: $(TOP_SRCDIR)/util/uuid.c
! 	$(CRULE_OPT)
  xdr_afsuuid.o: $(TOP_SRCDIR)/rx/xdr_afsuuid.c
  	$(CRULE_OPT)
  
***************
*** 268,274 ****
  afs_daemons.o: $(TOP_SRC_AFS)/afs_daemons.c
  	$(CRULE_NOOPT)
  afs_dir.o: 	$(TOP_SRCDIR)/dir/dir.c
! 	$(CRULE_NOOPT) -o afs_dir.o
  AFS_component_version_number.o: AFS_component_version_number.c
  	$(CRULE_NOOPT)
  afs_lock.o: $(TOP_SRC_AFS)/afs_lock.c
--- 268,274 ----
  afs_daemons.o: $(TOP_SRC_AFS)/afs_daemons.c
  	$(CRULE_NOOPT)
  afs_dir.o: 	$(TOP_SRCDIR)/dir/dir.c
! 	$(CRULE_NOOPT)
  AFS_component_version_number.o: AFS_component_version_number.c
  	$(CRULE_NOOPT)
  afs_lock.o: $(TOP_SRC_AFS)/afs_lock.c
***************
*** 337,344 ****
  	$(CRULE_NOOPT)
  Kvldbint.cs.o: ${TOP_OBJ_VLSERVER}/Kvldbint.cs.c
  	$(CRULE_NOOPT)
  Kvldbint.xdr.o: ${TOP_OBJ_VLSERVER}/Kvldbint.xdr.c
! 	$(CRULE_NOOPT) -DAFS_UUID_XG
  rx_kmutex.o: $(TOP_SRC_RX)/${MKAFS_OSTYPE}/rx_kmutex.c
  	$(CRULE_NOOPT)
  rx_knet.o: $(TOP_SRC_RX)/${MKAFS_OSTYPE}/rx_knet.c
--- 337,345 ----
  	$(CRULE_NOOPT)
  Kvldbint.cs.o: ${TOP_OBJ_VLSERVER}/Kvldbint.cs.c
  	$(CRULE_NOOPT)
+ CFLAGS-Kvldbint.xdr.o= -DAFS_UUID_XG
  Kvldbint.xdr.o: ${TOP_OBJ_VLSERVER}/Kvldbint.xdr.c
! 	$(CRULE_NOOPT)
  rx_kmutex.o: $(TOP_SRC_RX)/${MKAFS_OSTYPE}/rx_kmutex.c
  	$(CRULE_NOOPT)
  rx_knet.o: $(TOP_SRC_RX)/${MKAFS_OSTYPE}/rx_knet.c
***************
*** 347,362 ****
  	$(CRULE_NOOPT)
  
  # Files which do not contain NFS translator code.
  afs_call.o: $(TOP_SRC_AFS)/afs_call.c
! 	$(CRULE_NOOPT) -DAFS_NONFSTRANS
  afs_pioctl.o: $(TOP_SRC_AFS)/afs_pioctl.c
! 	$(CRULE_NOOPT) -DAFS_NONFSTRANS
  
  # NFS Translator versions of the above code.
  afs_call_nfs.o:	$(TOP_SRC_AFS)/afs_call.c
! 	$(CRULE_NOOPT) -o afs_call_nfs.o
  afs_pioctl_nfs.o:	$(TOP_SRC_AFS)/afs_pioctl.c
! 	$(CRULE_NOOPT) -o afs_pioctl_nfs.o
  
  # Files which are specific to particular architectures/targets
  # but have common build rules. Place here instead of duplicating
--- 348,365 ----
  	$(CRULE_NOOPT)
  
  # Files which do not contain NFS translator code.
+ CFLAGS-afs_call.o= -DAFS_NONFSTRANS
  afs_call.o: $(TOP_SRC_AFS)/afs_call.c
! 	$(CRULE_NOOPT)
! CFLAGS-afs_pioctl.o= -DAFS_NONFSTRANS
  afs_pioctl.o: $(TOP_SRC_AFS)/afs_pioctl.c
! 	$(CRULE_NOOPT)
  
  # NFS Translator versions of the above code.
  afs_call_nfs.o:	$(TOP_SRC_AFS)/afs_call.c
! 	$(CRULE_NOOPT)
  afs_pioctl_nfs.o:	$(TOP_SRC_AFS)/afs_pioctl.c
! 	$(CRULE_NOOPT)
  
  # Files which are specific to particular architectures/targets
  # but have common build rules. Place here instead of duplicating
***************
*** 371,384 ****
  	$(CRULE_NOOPT)
  osi_misc.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_misc.c
  	$(CRULE_NOOPT)
  osi_vfsops_nfs.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vfsops.c
! 	$(CRULE_NOOPT) -o osi_vfsops_nfs.o \
! 	-DAFS_WRAPPER=${LIBAFS}_wrapper \
! 	-DAFS_CONF_DATA=${LIBAFS}_conf_data
  osi_vfsops.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vfsops.c
! 	$(CRULE_NOOPT) -DAFS_NONFSTRANS \
! 	-DAFS_WRAPPER=${LIBAFSNONFS}_wrapper \
! 	-DAFS_CONF_DATA=${LIBAFSNONFS}_conf_data
  osi_vm.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vm.c
  	$(CRULE_NOOPT)
  osi_vnodeops.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vnodeops.c
--- 374,385 ----
  	$(CRULE_NOOPT)
  osi_misc.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_misc.c
  	$(CRULE_NOOPT)
+ CFLAGS-osi_vfsops_nfs.o= -DAFS_WRAPPER=${LIBAFS}_wrapper -DAFS_CONF_DATA=${LIBAFS}_conf_data
  osi_vfsops_nfs.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vfsops.c
! 	$(CRULE_NOOPT)
! CFLAGS-osi_vfsops.o= -DAFS_NONFSTRANS -DAFS_WRAPPER=${LIBAFSNONFS}_wrapper -DAFS_CONF_DATA=${LIBAFSNONFS}_conf_data
  osi_vfsops.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vfsops.c
! 	$(CRULE_NOOPT)
  osi_vm.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vm.c
  	$(CRULE_NOOPT)
  osi_vnodeops.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vnodeops.c
Index: openafs/src/libafs/MakefileProto.DARWIN.in
diff -c openafs/src/libafs/MakefileProto.DARWIN.in:1.21.2.4 openafs/src/libafs/MakefileProto.DARWIN.in:1.21.2.5
*** openafs/src/libafs/MakefileProto.DARWIN.in:1.21.2.4	Fri Oct 21 00:48:50 2005
--- openafs/src/libafs/MakefileProto.DARWIN.in	Thu Mar  9 01:41:47 2006
***************
*** 4,10 ****
  # 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
! # $Header: /cvs/openafs/src/libafs/MakefileProto.DARWIN.in,v 1.21.2.4 2005/10/21 04:48:50 shadow Exp $
  # 
  # MakefileProto for Digital Unix systems
  #
--- 4,10 ----
  # 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
! # $Header: /cvs/openafs/src/libafs/MakefileProto.DARWIN.in,v 1.21.2.5 2006/03/09 06:41:47 shadow Exp $
  # 
  # MakefileProto for Digital Unix systems
  #
***************
*** 33,46 ****
  KDEFS=
  DBUG = 
  DEFINES= -D_KERNEL -DKERNEL -DKERNEL_PRIVATE -DDIAGNOSTIC -DUSE_SELECT -DMACH_USER_API -DMACH_KERNEL
! <x86_darwin_80>
! KOPTS=-static -g -nostdinc -nostdlib -no-cpp-precomp -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch i386 -Di386 -DI386 -D__I386__ -DPAGE_SIZE_FIXED -march=i686 -mpreferred-stack-boundary=2 -falign-functions=4
! MODLD=$(CC) $(KOPTS)
! <ppc_darwin_80>
! KOPTS=-static -g -nostdinc -nostdlib -no-cpp-precomp -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch ppc -Dppc -DPPC -D__PPC__ -DPAGE_SIZE_FIXED -O2 -mcpu=750 -mmultiple -fschedule-insns
! MODLD=$(CC) $(KOPTS)
! <all -ppc_darwin_80 -x86_darwin_80>
  MODLD=$(LD)
  <ppc_darwin_70>
  KOPTS=-static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
  <ppc_darwin_60>
--- 33,67 ----
  KDEFS=
  DBUG = 
  DEFINES= -D_KERNEL -DKERNEL -DKERNEL_PRIVATE -DDIAGNOSTIC -DUSE_SELECT -DMACH_USER_API -DMACH_KERNEL
! <ppc_darwin_80 x86_darwin_80 ppc_darwin_90 x86_darwin_90>
! KOPTS_ppc=-static -g -nostdinc -nostdlib -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch ppc -Dppc -DPPC -D__PPC__ -DPAGE_SIZE_FIXED -mcpu=750 -mmultiple -fschedule-insns
! KOPTS_x86=-static -g -nostdinc -nostdlib -fno-builtin -finline -fno-keep-inline-functions -msoft-float -mlong-branch -fsigned-bitfields -arch i386 -Di386 -DI386 -D__I386__ -DPAGE_SIZE_FIXED -march=i686 -mpreferred-stack-boundary=2 -falign-functions=4
! ARCH_ppc=$(shell echo "${ARCHFLAGS}" | grep -q -w ppc && echo yes)
! ARCH_x86=$(shell echo "${ARCHFLAGS}" | grep -q -w i386 && echo yes)
! ifeq ($(ARCH_ppc),yes)
! ifeq ($(ARCH_x86),yes)
! MODLD=$(CC) -static -g -nostdlib -arch ppc -arch i386
! CFLAGS_ppc=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS_ppc)
! CFLAGS_x86=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS_x86)
! else
! MODLD=$(CC) -static -g -nostdlib -arch ppc
! KOPTS=$(KOPTS_ppc)
! CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS)
! endif
! else
! ifeq ($(ARCH_x86),yes)
! MODLD=$(CC) -static -g -nostdlib -arch i386
! KOPTS=$(KOPTS_x86)
! else
! _ARCH=$(shell arch)
! MODLD=$(CC) -static -g -nostdlib -arch $(_ARCH)
! KOPTS=$(KOPTS_$(shell echo $(_ARCH) | sed 's/i386/x86/'))
! endif
! CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS)
! endif
! <all -ppc_darwin_80 -x86_darwin_80 -ppc_darwin_90 -x86_darwin_90>
  MODLD=$(LD)
+ CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS)
  <ppc_darwin_70>
  KOPTS=-static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
  <ppc_darwin_60>
***************
*** 48,54 ****
  <ppc_darwin_14 ppc_darwin_13 ppc_darwin_12>
  KOPTS=-no-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
  <all>
- CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG} ${OPTMZ}
  KINCLUDES=-I${KROOT}/System/Library/Frameworks/Kernel.framework/Headers
  
  
--- 69,74 ----
***************
*** 62,67 ****
--- 82,107 ----
  
  include Makefile.common
  
+ <ppc_darwin_80 x86_darwin_80 ppc_darwin_90 x86_darwin_90>
+ ifeq ($(ARCH_ppc),yes)
+ ifeq ($(ARCH_x86),yes)
+ # override suffix rule; unfortunately, this causes a warning message
+ .c.o:
+ 	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.ppc.o,$@) -c $<
+ 	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.x86.o,$@) -c $<
+ 	lipo -create $(patsubst %.o,%.ppc.o,$@) $(patsubst %.o,%.x86.o,$@) -output $@
+ CRULE_NOOPT= \
+ 	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.ppc.o,$@) -c $? && \
+ 	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.x86.o,$@) -c $? && \
+ 	lipo -create $(patsubst %.o,%.ppc.o,$@) $(patsubst %.o,%.x86.o,$@) -output $@
+ CRULE_OPT= \
+ 	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.ppc.o,$@) -c $? && \
+ 	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.x86.o,$@) -c $? && \
+ 	lipo -create $(patsubst %.o,%.ppc.o,$@) $(patsubst %.o,%.x86.o,$@) -output $@
+ endif
+ endif
+ <all>
+ 
  setup:
  	-mkdir $(KOBJ)
  	-$(RM) $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
Index: openafs/src/libafs/afs.ppc_darwin_90.plist.in
diff -c /dev/null openafs/src/libafs/afs.ppc_darwin_90.plist.in:1.1.2.2
*** /dev/null	Fri Mar 17 19:52:20 2006
--- openafs/src/libafs/afs.ppc_darwin_90.plist.in	Thu Mar  9 01:41:47 2006
***************
*** 0 ****
--- 1,33 ----
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+ <plist version="0.9">
+ <dict>
+ 	<key>CFBundleDevelopmentRegion</key>
+ 	<string>English</string>
+ 	<key>CFBundleExecutable</key>
+ 	<string>afs</string>
+ 	<key>CFBundleIdentifier</key>
+ 	<string>org.openafs.filesystems.afs</string>
+ 	<key>CFBundleInfoDictionaryVersion</key>
+ 	<string>8.0</string>
+ 	<key>CFBundleName</key>
+ 	<string>afs</string>
+ 	<key>CFBundlePackageType</key>
+ 	<string>KEXT</string>
+ 	<key>CFBundleShortVersionString</key>
+ 	<string>1.4.0</string>
+ 	<key>CFBundleSignature</key>
+ 	<string>????</string>
+ 	<key>CFBundleVersion</key>
+ 	<string>1.4.0</string>
+ 	<key>OSBundleLibraries</key>
+ 	<dict>
+ 		<key>com.apple.kpi.bsd</key>
+ 		<string>8.0.0</string>
+ 		<key>com.apple.kpi.mach</key>
+ 		<string>8.0.0</string>
+ 		<key>com.apple.kpi.libkern</key>
+ 		<string>8.0</string>
+ 	</dict>
+ </dict>
+ </plist>
Index: openafs/src/libafs/afs.x86_darwin_90.plist.in
diff -c /dev/null openafs/src/libafs/afs.x86_darwin_90.plist.in:1.1.2.2
*** /dev/null	Fri Mar 17 19:52:20 2006
--- openafs/src/libafs/afs.x86_darwin_90.plist.in	Thu Mar  9 01:41:47 2006
***************
*** 0 ****
--- 1,33 ----
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+ <plist version="0.9">
+ <dict>
+ 	<key>CFBundleDevelopmentRegion</key>
+ 	<string>English</string>
+ 	<key>CFBundleExecutable</key>
+ 	<string>afs</string>
+ 	<key>CFBundleIdentifier</key>
+ 	<string>org.openafs.filesystems.afs</string>
+ 	<key>CFBundleInfoDictionaryVersion</key>
+ 	<string>8.0</string>
+ 	<key>CFBundleName</key>
+ 	<string>afs</string>
+ 	<key>CFBundlePackageType</key>
+ 	<string>KEXT</string>
+ 	<key>CFBundleShortVersionString</key>
+ 	<string>1.3.82</string>
+ 	<key>CFBundleSignature</key>
+ 	<string>????</string>
+ 	<key>CFBundleVersion</key>
+ 	<string>1.3.82</string>
+ 	<key>OSBundleLibraries</key>
+ 	<dict>
+ 		<key>com.apple.kpi.bsd</key>
+ 		<string>8.0.0</string>
+ 		<key>com.apple.kpi.mach</key>
+ 		<string>8.0.0</string>
+ 		<key>com.apple.kpi.libkern</key>
+ 		<string>8.0</string>
+ 	</dict>
+ </dict>
+ </plist>
Index: openafs/src/libafsrpc/Makefile.in
diff -c openafs/src/libafsrpc/Makefile.in:1.29.2.6 openafs/src/libafsrpc/Makefile.in:1.29.2.7
*** openafs/src/libafsrpc/Makefile.in:1.29.2.6	Mon Aug  8 11:39:22 2005
--- openafs/src/libafsrpc/Makefile.in	Sun Mar  5 19:33:23 2006
***************
*** 272,278 ****
  #
  #   $ what /opt/langtools/bin/pxdb32
  #   /opt/langtools/bin/pxdb32:
! #           HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.29.2.6 $
  #
  # 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.
--- 272,278 ----
  #
  #   $ what /opt/langtools/bin/pxdb32
  #   /opt/langtools/bin/pxdb32:
! #           HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.29.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.
***************
*** 363,369 ****
  		${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \
  		${AS} -o syscall.o syscall.i; \
  		$(RM) -f syscall.ss syscall.i;; \
! 	 *fbsd* | *nbsd* ) \
  		touch syscall.o ;; \
  	 *) \
  		/lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
--- 363,369 ----
  		${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \
  		${AS} -o syscall.o syscall.i; \
  		$(RM) -f syscall.ss syscall.i;; \
! 	 *bsd* ) \
  		touch syscall.o ;; \
  	 *) \
  		/lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
Index: openafs/src/libuafs/MakefileProto.DARWIN.in
diff -c openafs/src/libuafs/MakefileProto.DARWIN.in:1.9 openafs/src/libuafs/MakefileProto.DARWIN.in:1.9.2.1
*** openafs/src/libuafs/MakefileProto.DARWIN.in:1.9	Sun Apr 18 02:10:33 2004
--- openafs/src/libuafs/MakefileProto.DARWIN.in	Thu Mar  9 01:41:48 2006
***************
*** 13,24 ****
  CC = cc
  DEFINES= -D_REENTRANT -DKERNEL -DUKERNEL
  KOPTS=
! CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBG} $(XCFLAGS)
! OPTF=-O
  # WEBOPTS = -I../nsapi -DNETSCAPE_NSAPI -DNET_SSL -DXP_UNIX -DMCC_HTTPD
  
! TEST_CFLAGS=-D_REENTRANT -DAFS_PTHREAD_ENV
! TEST_LDFLAGS=
  TEST_LIBS=
  
  LIBUAFS = libuafs.a
--- 13,24 ----
  CC = cc
  DEFINES= -D_REENTRANT -DKERNEL -DUKERNEL
  KOPTS=
! CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBG} $(XCFLAGS) $(ARCHFLAGS)
! OPTF=-Os
  # WEBOPTS = -I../nsapi -DNETSCAPE_NSAPI -DNET_SSL -DXP_UNIX -DMCC_HTTPD
  
! TEST_CFLAGS=-D_REENTRANT -DAFS_PTHREAD_ENV $(XCFLAGS) $(ARCHFLAGS)
! TEST_LDFLAGS=$(XLDFLAGS) $(ARCHFLAGS)
  TEST_LIBS=
  
  LIBUAFS = libuafs.a
Index: openafs/src/log/tokens.c
diff -c openafs/src/log/tokens.c:1.6.2.1 openafs/src/log/tokens.c:1.6.2.2
*** openafs/src/log/tokens.c:1.6.2.1	Mon Jul 11 15:46:16 2005
--- openafs/src/log/tokens.c	Wed Mar 15 13:29:03 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/log/tokens.c,v 1.6.2.1 2005/07/11 19:46:16 shadow Exp $");
  
  #include <stdio.h>
  #ifdef	AFS_AIX32_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/log/tokens.c,v 1.6.2.2 2006/03/15 18:29:03 shadow Exp $");
  
  #include <stdio.h>
  #ifdef	AFS_AIX32_ENV
***************
*** 54,60 ****
      time_t current_time;	/*Current time of day */
      time_t tokenExpireTime;	/*When token expires */
      char *expireString;		/*Char string of expiration time */
!     char UserName[16];		/*Printable user name */
      struct ktc_principal serviceName, clientName;	/* service name for ticket */
      struct ktc_token token;	/* the token we're printing */
  
--- 54,60 ----
      time_t current_time;	/*Current time of day */
      time_t tokenExpireTime;	/*When token expires */
      char *expireString;		/*Char string of expiration time */
!     char UserName[MAXKTCNAMELEN * 2 + 2]; /*Printable user name */
      struct ktc_principal serviceName, clientName;	/* service name for ticket */
      struct ktc_token token;	/* the token we're printing */
  
Index: openafs/src/log/test/Makefile.in
diff -c openafs/src/log/test/Makefile.in:1.6 openafs/src/log/test/Makefile.in:1.6.8.1
*** openafs/src/log/test/Makefile.in:1.6	Thu Nov  1 00:00:15 2001
--- openafs/src/log/test/Makefile.in	Thu Mar  9 01:41:49 2006
***************
*** 14,20 ****
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  LIBS= -lauth -lrxkad -ldes -lsys -lrx -llwp -lcmd -lafsutil ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS}
  
  all: testlog gettoktest
  
--- 14,20 ----
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  LIBS= -lauth -lrxkad -ldes -lsys -lrx -llwp -lcmd -lafsutil ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS} ${ARCHFLAGS}
  
  all: testlog gettoktest
  
Index: openafs/src/lwp/Makefile.in
diff -c openafs/src/lwp/Makefile.in:1.29.2.7 openafs/src/lwp/Makefile.in:1.29.2.8
*** openafs/src/lwp/Makefile.in:1.29.2.7	Fri Oct 21 00:48:51 2005
--- openafs/src/lwp/Makefile.in	Thu Mar  9 01:41:50 2006
***************
*** 10,16 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${LWP_DBG} ${LWP_OPTMZ} ${XCFLAGS} ${COMMON_INCL}
  
  LIBOBJS=lwp.o process.o lock.o iomgr.o timer.o fasttime.o preempt.o \
  	waitkey.o threadname.o AFS_component_version_number.o
--- 10,16 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${LWP_DBG} ${LWP_OPTMZ} ${XCFLAGS} ${ARCHFLAGS} ${COMMON_INCL}
  
  LIBOBJS=lwp.o process.o lock.o iomgr.o timer.o fasttime.o preempt.o \
  	waitkey.o threadname.o AFS_component_version_number.o
***************
*** 29,39 ****
  
  # This is required so sgi_64+ does not try to build this file.
  process.s:
! 	echo Nothing to be done for process.s
  
  # Making process.o for $(SYS_NAME)
  process.o	: process.s process.i386.s process.c
! 	@case "$(SYS_NAME)" in \
  	pmax_he1) \
  		$(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c -I${TOP_INCDIR} process.s;; \
  	sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53  | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5* ) \
--- 29,39 ----
  
  # This is required so sgi_64+ does not try to build this file.
  process.s:
! 	@echo Nothing to be done for process.s
  
  # Making process.o for $(SYS_NAME)
  process.o	: process.s process.i386.s process.c
! 	@set -x; case "$(SYS_NAME)" in \
  	pmax_he1) \
  		$(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c -I${TOP_INCDIR} process.s;; \
  	sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53  | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5* ) \
***************
*** 43,49 ****
  	sgi_5* ) \
  		$(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c -I${TOP_INCDIR} -KPIC -G0  ${srcdir}/process.s;; \
  	sgi_61 | sgi_62 | sgi_63 ) \
! 		$(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c ${XCFLAGS} -I${TOP_INCDIR} -KPIC -G0  ${srcdir}/process.s;; \
  	s390_*) \
  		/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s390.s >process.ss; \
  		${AS} -ahlns process.ss -o process.o >process.lst; \
--- 43,49 ----
  	sgi_5* ) \
  		$(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c -I${TOP_INCDIR} -KPIC -G0  ${srcdir}/process.s;; \
  	sgi_61 | sgi_62 | sgi_63 ) \
! 		$(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c ${XCFLAGS} ${ARCHFLAGS} -I${TOP_INCDIR} -KPIC -G0  ${srcdir}/process.s;; \
  	s390_*) \
  		/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s390.s >process.ss; \
  		${AS} -ahlns process.ss -o process.o >process.lst; \
***************
*** 52,63 ****
  		/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s390x.s >process.ss; \
  		${AS} -ahlns process.ss -o process.o >process.lst; \
  		$(RM) process.ss ;; \
! 	ppc_darwin* ) \
! 		$(CC) ${LWP_DBG} ${LWP_OPTMZ} -c ${XCFLAGS} -I${TOP_INCDIR} ${srcdir}/process.s;; \
! 	x86_darwin*) \
! 		/usr/bin/cpp -P -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s process.ss; \
! 		${AS} process.ss -o process.o; \
! 		$(RM) process.ss ;; \
  	i386_*bsd*) \
  		cp ${srcdir}/process.i386.s process.S ; \
  		${CCOBJ} -DIGNORE_STDS_H -E -I${srcdir} -I${TOP_INCDIR} process.S > process.ss ; \
--- 52,82 ----
  		/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s390x.s >process.ss; \
  		${AS} -ahlns process.ss -o process.o >process.lst; \
  		$(RM) process.ss ;; \
! 	*_darwin* ) \
! 		ppc=`echo "${ARCHFLAGS}" | grep -q -w ppc && echo yes` ; \
! 		i386=`echo "${ARCHFLAGS}" | grep -q -w i386 && echo yes` ; \
! 		if [ -z "$${ppc}" -a -z "$${i386}" ] ; then \
! 			if [ `arch` = ppc ] ; then \
! 				ppc=yes ; \
! 			else \
! 				i386=yes ; \
! 			fi ; \
! 		fi ; \
! 		if [ -n "$${ppc}" ] ; then \
! 			$(CC) ${LWP_DBG} ${LWP_OPTMZ} -c -arch ppc -I${TOP_INCDIR} ${srcdir}/process.s -o process.ppc.o ; \
! 			if [ -z "$${i386}" ] ; then \
! 				${MV} process.ppc.o process.o ; \
! 			fi ; \
! 		fi ; \
! 		if [ -n "$${i386}" ] ; then \
! 			$(CC) -x assembler-with-cpp -c -arch i386 -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s -o process.i386.o ; \
! 			if [ -z "$${ppc}" ] ; then \
! 				${MV} process.i386.o process.o ; \
! 			fi ; \
! 		fi ; \
! 		if [ -n "$${ppc}" -a -n "$${i386}" ] ; then \
! 			lipo -create process.ppc.o process.i386.o -output process.o ;\
! 		fi ;; \
  	i386_*bsd*) \
  		cp ${srcdir}/process.i386.s process.S ; \
  		${CCOBJ} -DIGNORE_STDS_H -E -I${srcdir} -I${TOP_INCDIR} process.S > process.ss ; \
Index: openafs/src/lwp/lwp.c
diff -c openafs/src/lwp/lwp.c:1.27.2.6 openafs/src/lwp/lwp.c:1.27.2.7
*** openafs/src/lwp/lwp.c:1.27.2.6	Mon Jul 11 14:59:55 2005
--- openafs/src/lwp/lwp.c	Thu Mar  9 01:41:50 2006
***************
*** 17,23 ****
  #include <afsconfig.h>
  #include <afs/param.h>
  
! RCSID("$Header: /cvs/openafs/src/lwp/lwp.c,v 1.27.2.6 2005/07/11 18:59:55 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
--- 17,23 ----
  #include <afsconfig.h>
  #include <afs/param.h>
  
! RCSID("$Header: /cvs/openafs/src/lwp/lwp.c,v 1.27.2.7 2006/03/09 06:41:50 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
***************
*** 80,85 ****
--- 80,87 ----
  #ifdef __s390__
  #define MINFRAME    96
  #define STACK_ALIGN 8
+ #elif defined(AFS_DARWIN_ENV)
+ #define STACK_ALIGN 16
  #else
  #define STACK_ALIGN 4
  #endif
***************
*** 297,303 ****
--- 299,309 ----
  	    return LWP_ENOMEM;
  	}
  	if (stacksize < MINSTACK)
+ #ifdef AFS_DARWIN_ENV
+ 	    stacksize = 1008;
+ #else /* !AFS_DARWIN_ENV */
  	    stacksize = 1000;
+ #endif /* !AFS_DARWIN_ENV */
  	else
  	    stacksize =
  		STACK_ALIGN * ((stacksize + STACK_ALIGN - 1) / STACK_ALIGN);
***************
*** 342,353 ****
  	stackptr -= stacksize;
  	stackmemory = stackptr;
  #else
! 	if ((stackmemory = (char *)malloc(stacksize + 7)) == NULL) {
  	    Set_LWP_RC();
  	    return LWP_ENOMEM;
  	}
  	/* Round stack pointer to byte boundary */
  	stackptr = (char *)(8 * (((long)stackmemory + 7) / 8));
  #endif
  	if (priority < 0 || priority >= MAX_PRIORITIES) {
  	    Set_LWP_RC();
--- 348,368 ----
  	stackptr -= stacksize;
  	stackmemory = stackptr;
  #else
! #ifdef AFS_DARWIN_ENV
! 	if ((stackmemory = (char *)malloc(stacksize + STACK_ALIGN - 1)) == NULL)
! #else /* !AFS_DARWIN_ENV */
! 	if ((stackmemory = (char *)malloc(stacksize + 7)) == NULL)
! #endif /* !AFS_DARWIN_ENV */
! 	{
  	    Set_LWP_RC();
  	    return LWP_ENOMEM;
  	}
  	/* Round stack pointer to byte boundary */
+ #ifdef AFS_DARWIN_ENV
+ 	stackptr = (char *)(STACK_ALIGN * (((long)stackmemory + STACK_ALIGN - 1) / STACK_ALIGN));
+ #else /* !AFS_DARWIN_ENV */
  	stackptr = (char *)(8 * (((long)stackmemory + 7) / 8));
+ #endif /* !AFS_DARWIN_ENV */
  #endif
  	if (priority < 0 || priority >= MAX_PRIORITIES) {
  	    Set_LWP_RC();
***************
*** 372,379 ****
--- 387,398 ----
  		    stackptr + MINFRAME);
  #else
  #if defined(AFS_SGI62_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ #ifdef sys_x86_darwin_80
+ 	savecontext(Create_Process_Part2, &temp2->context, stackptr + stacksize - 16 - sizeof(void *));	/* 16 = 2 * jmp_buf_type */
+ #else /* !sys_x86_darwin_80 */
  	/* Need to have the sp on an 8-byte boundary for storing doubles. */
  	savecontext(Create_Process_Part2, &temp2->context, stackptr + stacksize - 16);	/* 16 = 2 * jmp_buf_type */
+ #endif /* !sys_x86_darwin_80 */
  #else
  #if defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_SPARC_LINUX20_ENV)
  	savecontext(Create_Process_Part2, &temp2->context, stackptr + stacksize - 0x40);	/* lomgjmp does something
Index: openafs/src/lwp/test/Makefile.in
diff -c openafs/src/lwp/test/Makefile.in:1.3 openafs/src/lwp/test/Makefile.in:1.3.8.1
*** openafs/src/lwp/test/Makefile.in:1.3	Thu Nov  1 00:00:20 2001
--- openafs/src/lwp/test/Makefile.in	Thu Mar  9 01:41:50 2006
***************
*** 11,17 ****
  INCDIRS= -I.. -I${DESTDIR}/include 
  LIBS= ../liblwp.a
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${XCFLAGS}
  
  system noversion: test
  
--- 11,17 ----
  INCDIRS= -I.. -I${DESTDIR}/include 
  LIBS= ../liblwp.a
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${XCFLAGS} ${ARCHFLAGS}
  
  system noversion: test
  
Index: openafs/src/packaging/MacOS/Makefile
diff -c openafs/src/packaging/MacOS/Makefile:1.2 openafs/src/packaging/MacOS/Makefile:1.2.2.1
*** openafs/src/packaging/MacOS/Makefile:1.2	Fri Oct 24 02:26:13 2003
--- openafs/src/packaging/MacOS/Makefile	Thu Mar  9 01:41:53 2006
***************
*** 19,33 ****
  # 
  # @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)
--- 19,37 ----
  # 
  # @APPLE_LICENSE_HEADER_END@
  
! # We assume the either we are in src/packaging/MacOS (so ../.. should work
! # with #include <afs/sysctl.h>, or we are in a directory where configure
! # was run, so the afs/sysctl.h should be in the include subdirectory
! AFSINCLUDE = -I../.. -Iinclude
! CFLAGS = -Os $(AFSINCLUDE) $(ARCHFLAGS)
  LIBS = -framework Foundation
  ALL = afssettings
+ DIR = $(shell dirname $(MAKEFILE_LIST))
  
  all: $(ALL)
  
! afssettings : $(DIR)/afssettings.m
  	cc $(CFLAGS) -o $@ $^ $(LIBS)
  
  clean:
! 	@rm -f $(ALL)
Index: openafs/src/packaging/MacOS/OpenAFS.info
diff -c openafs/src/packaging/MacOS/OpenAFS.info:1.1.4.29 openafs/src/packaging/MacOS/OpenAFS.info:1.1.4.30
*** openafs/src/packaging/MacOS/OpenAFS.info:1.1.4.29	Thu Mar  2 01:46:35 2006
--- openafs/src/packaging/MacOS/OpenAFS.info	Fri Mar 17 00:57:50 2006
***************
*** 1,5 ****
  Title OpenAFS
! Version 1.4.1-rc9
  Description The OpenAFS distributed filesystem. This package installs an almost-ready-to-run client for OpenAFS. see http://www.openafs.org for more information.
  DefaultLocation /
  Diskname (null)
--- 1,5 ----
  Title OpenAFS
! Version 1.4.1-rc10
  Description The OpenAFS distributed filesystem. This package installs an almost-ready-to-run client for OpenAFS. see http://www.openafs.org for more information.
  DefaultLocation /
  Diskname (null)
Index: openafs/src/packaging/MacOS/OpenAFS.post_install
diff -c openafs/src/packaging/MacOS/OpenAFS.post_install:1.3.2.1 openafs/src/packaging/MacOS/OpenAFS.post_install:1.3.2.2
*** openafs/src/packaging/MacOS/OpenAFS.post_install:1.3.2.1	Sun Apr  3 15:14:36 2005
--- openafs/src/packaging/MacOS/OpenAFS.post_install	Thu Mar  9 01:41:53 2006
***************
*** 73,79 ****
      # this is a new install, or an upgrade from pre-1.2.7
      echo "Installing new CellServDB"
      cp CellServDB.master CellServDB.master.last
!     cp CellServDB.master CellServDB
    fi
  fi
  
--- 73,81 ----
      # this is a new install, or an upgrade from pre-1.2.7
      echo "Installing new CellServDB"
      cp CellServDB.master CellServDB.master.last
!     if [ ! -e CellServDB ]; then
! 	cp CellServDB.master CellServDB
!     fi
    fi
  fi
  
Index: openafs/src/packaging/MacOS/afssettings.m
diff -c openafs/src/packaging/MacOS/afssettings.m:1.2 openafs/src/packaging/MacOS/afssettings.m:1.2.2.1
*** openafs/src/packaging/MacOS/afssettings.m:1.2	Fri Oct 24 02:26:13 2003
--- openafs/src/packaging/MacOS/afssettings.m	Thu Mar  9 01:41:53 2006
***************
*** 1,5 ****
  /*
!  * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
   *
   * @APPLE_LICENSE_HEADER_START@
   * 
--- 1,5 ----
  /*
!  * Copyright (c) 2003, 2006 Apple Computer, Inc. All rights reserved.
   *
   * @APPLE_LICENSE_HEADER_START@
   * 
***************
*** 52,57 ****
--- 52,59 ----
      {@"Darwin14", AFS_SC_DARWIN_14, TypeNode, NULL},
      {@"Darwin60", AFS_SC_DARWIN_60, TypeNode, NULL},
      {@"Darwin70", AFS_SC_DARWIN_70, TypeNode, NULL},
+     {@"Darwin80", AFS_SC_DARWIN_80, TypeNode, NULL},
+     {@"Darwin90", AFS_SC_DARWIN_90, TypeNode, NULL},
      {NULL, 0, 0, NULL}
  };
  Setting s_first[] = {
***************
*** 79,90 ****
      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;
--- 81,92 ----
      int i;
  
      len = sizeof(max);
!     if(sysctl(oidmax, 3, &max, &len, NULL, 0) < 0)
  	err(1, "sysctl VFS_MAXTYPENUM");
      for(i = max; --i >= 0; ) {
  	oidvfs[3] = i;
  	len = sizeof(conf);
! 	if(sysctl(oidvfs, 4, &conf, &len, NULL, 0) < 0)
  	    continue;
  	if(strcmp("afs", conf.vfc_name) == 0) {
  	    s_top.selector = conf.vfc_typenum;
Index: openafs/src/packaging/MacOS/buildpkg.sh
diff -c openafs/src/packaging/MacOS/buildpkg.sh:1.4.2.7 openafs/src/packaging/MacOS/buildpkg.sh:1.4.2.8
*** openafs/src/packaging/MacOS/buildpkg.sh:1.4.2.7	Tue Feb 14 19:35:00 2006
--- openafs/src/packaging/MacOS/buildpkg.sh	Thu Mar  9 01:41:53 2006
***************
*** 1,13 ****
  #!/bin/sh
! # Portions Copyright (c) 2003 Apple Computer, Inc.  All rights reserved.
  
  if [ -z "$1" ]; then
!    echo Usage: buildpkg binary-dir
!   exit 1
! 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
--- 1,33 ----
  #!/bin/sh
! # Portions Copyright (c) 2003, 2006 Apple Computer, Inc.  All rights reserved.
  
  if [ -z "$1" ]; then
!     echo Usage: buildpkg binary-dir
!     echo '  or'
!     echo 'Usage: buildpkg [-firstpass] binary-dir'
!     echo '            (customize pkgroot)'
!     echo '       buildpkg [-secondpass]'
!     exit 1
! fi
! 
! firstpass=yes
! secondpass=yes
! if [ "$1" = "-firstpass" ]; then
!     secondpass=no
!     shift
! elif [ "$1" = "-secondpass" ]; then
!     firstpass=no
!     shift
! fi
! 
! BINDEST=`cd $1 && pwd`
! CURDIR=`pwd`
! RESSRC=`dirname $0`
! RESSRC=`cd $RESSRC && pwd`
  majorvers=`uname -r | sed 's/\..*//'`
+ 
+ PKGROOT=$CURDIR/pkgroot
+ PKGRES=$CURDIR/pkgres
  if [ $majorvers -ge 7 ]; then
      SEP=:
      package=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
***************
*** 31,182 ****
      fi
  fi
  
! if [ -x /usr/bin/curl ]; then
  #    /usr/bin/curl -f -O http://www.central.org/dl/cellservdb/CellServDB
!     /usr/bin/curl -f -O http://dl.central.org/dl/cellservdb/CellServDB
! fi
! 
! if [ ! -f CellServDB ]; then
!    echo "A CellServDB file must be placed in the working directory"
!    die=1
! fi
! FILES="ReadMe.rtf License.rtf CellServDB.list OpenAFS.info OpenAFS.post_install OpenAFS.pre_upgrade csrvdbmerge.pl 2.0.txt"
! for f in $FILES; do
!    if [ ! -f $f ]; then
!      echo "file missing: " $f
!      die=1
!    fi
! done
! if [ "$die" ]; then
!   echo "Correct above errors; then retry"
!   exit 1
! fi
! if [ ! -f $BINDEST/bin/translate_et ]; then
!   die=1
! fi
! if [ ! -f $BINDEST/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs ]; then
!   die=1
! fi
! if [ "$die" ]; then
!    echo $BINDEST " is not a valid binary dir. it should be the result of"
!    echo "make dest"
!    exit 1
! fi
! 
! PKGROOT=$RESSRC/pkgroot
! PKGRES=$RESSRC/pkgres
! rm -rf pkgroot pkgres
! 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/StartupItems
! chmod -R og-w $PKGROOT/Library/StartupItems
! 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
! 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 openafs.org > $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 '-afsdb -stat 2000 -dcache 800 -daemons 3 -volumes 70 -dynroot -fakestat-all' > $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
! cp -RP $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/C $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
  
! mkdir $PKGROOT/usr $PKGROOT/usr/bin $PKGROOT/usr/sbin
  
! BINLIST="fs klog klog.krb pagsh pagsh.krb pts sys tokens tokens.krb unlog unlog.krb aklog"
  
! # Should these be linked into /usr too?
! OTHER_BINLIST="bos cmdebug rxgen translate_et udebug xstat_cm_test xstat_fs_test"
! OTHER_ETCLIST="vos rxdebug"
  
! for f in $BINLIST; do
!    ln -s ../../Library/OpenAFS/Tools/bin/$f $PKGROOT/usr/bin/$f
! done
! ln -s ../../Library/OpenAFS/Tools/bin/kpasswd $PKGROOT/usr/bin/kpasswd.afs
  
! 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
!     if [ $majorvers -ge 8 ]; then
!         cp InstallationCheck $PKGRES
!         mkdir $PKGRES/English.lproj
!         cp InstallationCheck $PKGRES/English.lproj
!         chmod a+x $PKGRES/InstallationCheck
      fi
!     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
! mkdir dmg
! mv OpenAFS.pkg dmg
! rm -rf OpenAFS.dmg
! hdiutil create -srcfolder dmg -volname OpenAFS -anyowners OpenAFS.dmg
! rm -rf dmg
! # Unfortunately, sudo sets $USER to root, so I can't chown the 
! #.pkg dir back to myself
! #chown -R $USER OpenAFS.pkg
--- 51,209 ----
      fi
  fi
  
! if [ $firstpass = yes ]; then
!     if [ -x /usr/bin/curl ]; then
  #    /usr/bin/curl -f -O http://www.central.org/dl/cellservdb/CellServDB
! 	/usr/bin/curl -f -O http://dl.central.org/dl/cellservdb/CellServDB
!     fi
  
!     if [ ! -f CellServDB ]; then
!        echo "A CellServDB file must be placed in the working directory"
!        die=1
!     fi
!     FILES="ReadMe.rtf License.rtf CellServDB.list OpenAFS.info OpenAFS.post_install OpenAFS.pre_upgrade csrvdbmerge.pl 2.0.txt"
!     for f in $FILES; do
!        if [ ! -f $RESSRC/$f ]; then
! 	 echo "file missing: " $RESSRC/$f
! 	 die=1
!        fi
!     done
!     if [ "$die" ]; then
!       echo "Correct above errors; then retry"
!       exit 1
!     fi
!     if [ ! -f $BINDEST/bin/translate_et ]; then
!       die=1
!     fi
!     if [ ! -f $BINDEST/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs ]; then
!       die=1
!     fi
!     if [ "$die" ]; then
!        echo $BINDEST " is not a valid binary dir. it should be the result of"
!        echo "make dest"
!        exit 1
!     fi
  
!     rm -rf $PKGROOT
!     mkdir $PKGROOT
  
!     mkdir -p $PKGROOT/Library
!     chown root${SEP}admin $PKGROOT
!     chmod 775 $PKGROOT $PKGROOT/Library
!     mkdir -p $PKGROOT/Library/OpenAFS/Tools
!     (cd $BINDEST && pax -rw * $PKGROOT/Library/OpenAFS/Tools)
!     cd $RESSRC
!     mkdir -p $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/StartupItems
!     chmod -R og-w $PKGROOT/Library/StartupItems
!     chown -R root${SEP}wheel $PKGROOT/Library/OpenAFS/Tools
!     chmod -R og-w $PKGROOT/Library/OpenAFS/Tools
! 
!     mkdir -p $PKGROOT/private/var/db/openafs/cache
!     mkdir -p $PKGROOT/private/var/db/openafs/etc/config
!     cp $CURDIR/CellServDB $PKGROOT/private/var/db/openafs/etc/CellServDB.master
!     echo openafs.org > $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
! 	(cd $CURDIR && \
! 	make -f $RESSRC/Makefile AFSINCLUDE="-I$BINDEST/include" && \
! 	cp afssettings $PKGROOT/private/var/db/openafs/etc/config && \
! 	make -f $RESSRC/Makefile clean)
! 	cp settings.plist $PKGROOT/private/var/db/openafs/etc/config/settings.plist.orig
!     else
! 	echo /Network/afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample
!     fi
!     echo '-afsdb -stat 2000 -dcache 800 -daemons 3 -volumes 70 -dynroot -fakestat-all' > $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
!     cp -RP $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/C $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
  
!     mkdir -p $PKGROOT/usr/bin $PKGROOT/usr/sbin
  
!     BINLIST="fs klog klog.krb pagsh pagsh.krb pts sys tokens tokens.krb unlog unlog.krb aklog"
  
! # Should these be linked into /usr too?
!     OTHER_BINLIST="bos cmdebug rxgen translate_et udebug xstat_cm_test xstat_fs_test"
!     OTHER_ETCLIST="vos rxdebug"
  
!     for f in $BINLIST; do
!        ln -s ../../Library/OpenAFS/Tools/bin/$f $PKGROOT/usr/bin/$f
!     done
!     ln -s ../../Library/OpenAFS/Tools/bin/kpasswd $PKGROOT/usr/bin/kpasswd.afs
! 
!     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
! fi
! 
! if [ $secondpass = yes ]; then
!     rm -rf $PKGRES
!     mkdir $PKGRES
! 
!     cd $RESSRC
!     if [ $majorvers -ge 7 ]; then
! 	cp OpenAFS.post_install $PKGRES/postinstall
! 	cp OpenAFS.pre_upgrade $PKGRES/preupgrade
! 	cp OpenAFS.post_install $PKGRES/postupgrade
! 	if [ $majorvers -ge 8 ]; then
! 	    cp InstallationCheck $PKGRES
! 	    mkdir -p $PKGRES/English.lproj
! 	    cp InstallationCheck $PKGRES/English.lproj
! 	    chmod a+x $PKGRES/InstallationCheck
! 	fi
! 	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 $CURDIR/OpenAFS.pkg
!     if [ $majorvers -ge 7 ]; then
! 	echo $package -build -p $CURDIR/OpenAFS.pkg -f $PKGROOT -r $PKGRES \
! 	    -i OpenAFS.Info.plist -d OpenAFS.Description.plist
! 	$package -build -p $CURDIR/OpenAFS.pkg -f $PKGROOT -r $PKGRES \
! 	    -i OpenAFS.Info.plist -d OpenAFS.Description.plist
!     else
! 	echo $package $PKGROOT $RESSRC/OpenAFS.info -r $PKGRES
! 	(cd $CURDIR && $package $PKGROOT $RESSRC/OpenAFS.info -r $PKGRES)
! 	#old versions of package didn't handle this properly
! 	if [ ! -r $CURDIR/OpenAFS.pkg/Contents ]; then
! 		mkdir -p $CURDIR/OpenAFS.pkg/Contents/Resources
! 		mv $CURDIR/OpenAFS.pkg/OpenAFS.* $CURDIR/OpenAFS.pkg/Contents/Resources
! 		mv $CURDIR/OpenAFS.pkg/*.rtf $CURDIR/OpenAFS.pkg/Contents/Resources
! 		mv $CURDIR/OpenAFS.pkg/csrvdbmerge.pl $CURDIR/OpenAFS.pkg/Contents/Resources
! 		mv $CURDIR/OpenAFS.pkg/CellServDB* $CURDIR/OpenAFS.pkg/Contents/Resources
! 	fi
      fi
  
!     rm -rf $PKGROOT $PKGRES
!     mkdir $CURDIR/dmg
!     mv $CURDIR/OpenAFS.pkg $CURDIR/dmg
!     rm -rf $CURDIR/OpenAFS.dmg
!     hdiutil create -srcfolder $CURDIR/dmg -volname OpenAFS -anyowners $CURDIR/OpenAFS.dmg
!     rm -rf $CURDIR/dmg
!     # Unfortunately, sudo sets $USER to root, so I can't chown the 
!     #.pkg dir back to myself
!     #chown -R $USER $CURDIR/OpenAFS.pkg
! else
!     echo "First pass completed.  Customize pkgroot and then run:"
!     echo "    $0 -secondpass"
! fi
Index: openafs/src/procmgmt/test/Makefile.in
diff -c openafs/src/procmgmt/test/Makefile.in:1.3 openafs/src/procmgmt/test/Makefile.in:1.3.8.1
*** openafs/src/procmgmt/test/Makefile.in:1.3	Thu Nov  1 00:00:35 2001
--- openafs/src/procmgmt/test/Makefile.in	Thu Mar  9 01:41:53 2006
***************
*** 9,15 ****
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS = $(DBUG) -I${SRCDIR}/include ${XCFLAGS}
  
  ########################################################################
  # build tests
--- 9,15 ----
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS = $(DBUG) -I${SRCDIR}/include ${XCFLAGS} ${ARCHFLAGS}
  
  ########################################################################
  # build tests
Index: openafs/src/ptserver/ubik.c
diff -c openafs/src/ptserver/ubik.c:1.7 openafs/src/ptserver/ubik.c:1.7.2.1
*** openafs/src/ptserver/ubik.c:1.7	Mon Dec  8 00:50:39 2003
--- openafs/src/ptserver/ubik.c	Thu Mar  9 01:41:54 2006
***************
*** 1,10 ****
! /* $Id: ubik.c,v 1.7 2003/12/08 05:50:39 shadow Exp $ */
  
  #include <afsconfig.h>
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ubik.c,v 1.7 2003/12/08 05:50:39 shadow Exp $");
  
  #include <sys/types.h>
  #include <netinet/in.h>
--- 1,10 ----
! /* $Id: ubik.c,v 1.7.2.1 2006/03/09 06:41:54 shadow Exp $ */
  
  #include <afsconfig.h>
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ubik.c,v 1.7.2.1 2006/03/09 06:41:54 shadow Exp $");
  
  #include <sys/types.h>
  #include <netinet/in.h>
***************
*** 46,52 ****
  	thdr.version.epoch = htonl(2);
  	thdr.version.counter = htonl(0);
  	thdr.magic = htonl(UBIK_MAGIC);
! 	thdr.size = htonl(HDRSIZE);
  	lseek(dbase_fd, 0, 0);
  	write(dbase_fd, &thdr, sizeof(thdr));
  	fsync(dbase_fd);
--- 46,52 ----
  	thdr.version.epoch = htonl(2);
  	thdr.version.counter = htonl(0);
  	thdr.magic = htonl(UBIK_MAGIC);
! 	thdr.size = htons(HDRSIZE);
  	lseek(dbase_fd, 0, 0);
  	write(dbase_fd, &thdr, sizeof(thdr));
  	fsync(dbase_fd);
Index: openafs/src/rx/Makefile.in
diff -c openafs/src/rx/Makefile.in:1.15 openafs/src/rx/Makefile.in:1.15.2.1
*** openafs/src/rx/Makefile.in:1.15	Sat Jan 11 02:34:49 2003
--- openafs/src/rx/Makefile.in	Thu Mar  9 01:41:55 2006
***************
*** 8,14 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} -DRXDEBUG
  
  #
  # Generic xdr objects (or, at least, xdr stuff that's not newly defined for rx).
--- 8,14 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} ${ARCHFLAGS} -DRXDEBUG
  
  #
  # Generic xdr objects (or, at least, xdr stuff that's not newly defined for rx).
Index: openafs/src/rx/rx_clock_nt.c
diff -c openafs/src/rx/rx_clock_nt.c:1.9.2.2 openafs/src/rx/rx_clock_nt.c:1.9.2.3
*** openafs/src/rx/rx_clock_nt.c:1.9.2.2	Thu Sep 15 22:28:50 2005
--- openafs/src/rx/rx_clock_nt.c	Sun Mar  5 22:05:02 2006
***************
*** 14,20 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_clock_nt.c,v 1.9.2.2 2005/09/16 02:28:50 jaltman Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <stdio.h>
--- 14,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_clock_nt.c,v 1.9.2.3 2006/03/06 03:05:02 jaltman Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <stdio.h>
***************
*** 50,59 ****
  	OutputDebugString("No High Performance clock, exiting.\n");
  	exit(1);
      }
- 
      clockInitialized = 1;
!     (void)QueryPerformanceCounter(&rxi_clock0);
! 
      clock_UpdateTime();
  }
  
--- 50,57 ----
  	OutputDebugString("No High Performance clock, exiting.\n");
  	exit(1);
      }
      clockInitialized = 1;
!     
      clock_UpdateTime();
  }
  
Index: openafs/src/rx/rx_kcommon.c
diff -c openafs/src/rx/rx_kcommon.c:1.44.2.10 openafs/src/rx/rx_kcommon.c:1.44.2.11
*** openafs/src/rx/rx_kcommon.c:1.44.2.10	Tue Jan 17 21:22:19 2006
--- openafs/src/rx/rx_kcommon.c	Wed Mar  8 00:05:51 2006
***************
*** 15,21 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_kcommon.c,v 1.44.2.10 2006/01/18 02:22:19 shadow Exp $");
  
  #include "rx/rx_kcommon.h"
  
--- 15,21 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_kcommon.c,v 1.44.2.11 2006/03/08 05:05:51 jaltman Exp $");
  
  #include "rx/rx_kcommon.h"
  
***************
*** 131,139 ****
      if (!msg)
  	msg = "Unknown AFS panic";
  
!     dpf((msg, a1, a2, a3));
  #ifdef AFS_LINUX24_ENV
-     printk("AFS BUG at %s\n", msg); 
      * ((char *) 0) = 0; 
  #else
      panic(msg);
--- 131,138 ----
      if (!msg)
  	msg = "Unknown AFS panic";
  
!     printf(msg, a1, a2, a3);
  #ifdef AFS_LINUX24_ENV
      * ((char *) 0) = 0; 
  #else
      panic(msg);
Index: openafs/src/rx/xdr.h
diff -c openafs/src/rx/xdr.h:1.12 openafs/src/rx/xdr.h:1.12.2.1
*** openafs/src/rx/xdr.h:1.12	Mon Jun 21 17:56:37 2004
--- openafs/src/rx/xdr.h	Thu Mar  9 01:41:55 2006
***************
*** 63,69 ****
  #define mem_free(ptr, bsize)	free(ptr)
  #endif
  
! #if defined(AFS_AMD64_LINUX24_ENV) || (defined(KERNEL) && !defined(UKERNEL))
  #define xdr_void afs_xdr_void
  #define xdr_int afs_xdr_int
  #define xdr_u_int afs_xdr_u_int
--- 63,69 ----
  #define mem_free(ptr, bsize)	free(ptr)
  #endif
  
! #if defined(AFS_AMD64_LINUX24_ENV) || defined(AFS_DARWIN_ENV) || (defined(KERNEL) && !defined(UKERNEL))
  #define xdr_void afs_xdr_void
  #define xdr_int afs_xdr_int
  #define xdr_u_int afs_xdr_u_int
***************
*** 88,93 ****
--- 88,94 ----
  #define xdr_vector afs_xdr_vector
  #define xdr_int64 afs_xdr_int64
  #define xdr_uint64 afs_xdr_uint64
+ #define xdr_pointer afs_xdr_pointer
  #endif
  
  #ifdef	KERNEL
Index: openafs/src/rx/LINUX/rx_kmutex.c
diff -c openafs/src/rx/LINUX/rx_kmutex.c:1.7.2.5 openafs/src/rx/LINUX/rx_kmutex.c:1.7.2.6
*** openafs/src/rx/LINUX/rx_kmutex.c:1.7.2.5	Thu Mar  2 01:41:23 2006
--- openafs/src/rx/LINUX/rx_kmutex.c	Thu Mar  9 16:41:55 2006
***************
*** 17,23 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/LINUX/rx_kmutex.c,v 1.7.2.5 2006/03/02 06:41:23 shadow Exp $");
  
  #include "rx/rx_kcommon.h"
  #include "rx_kmutex.h"
--- 17,23 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/LINUX/rx_kmutex.c,v 1.7.2.6 2006/03/09 21:41:55 shadow Exp $");
  
  #include "rx/rx_kcommon.h"
  #include "rx_kmutex.h"
***************
*** 26,32 ****
  void
  afs_mutex_init(afs_kmutex_t * l)
  {
! #if defined(AFS_LINUX24_ENV)
      init_MUTEX(&l->sem);
  #else
      l->sem = MUTEX;
--- 26,34 ----
  void
  afs_mutex_init(afs_kmutex_t * l)
  {
! #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
!     mutex_init(&l->mutex);
! #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
      init_MUTEX(&l->sem);
  #else
      l->sem = MUTEX;
***************
*** 37,43 ****
--- 39,49 ----
  void
  afs_mutex_enter(afs_kmutex_t * l)
  {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+     mutex_lock(&l->mutex);
+ #else
      down(&l->sem);
+ #endif
      if (l->owner)
  	osi_Panic("mutex_enter: 0x%x held by %d", l, l->owner);
      l->owner = current->pid;
***************
*** 46,52 ****
--- 52,62 ----
  int
  afs_mutex_tryenter(afs_kmutex_t * l)
  {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+     if (mutex_trylock(&l->mutex) == 0)
+ #else
      if (down_trylock(&l->sem))
+ #endif
  	return 0;
      l->owner = current->pid;
      return 1;
***************
*** 58,64 ****
--- 68,78 ----
      if (l->owner != current->pid)
  	osi_Panic("mutex_exit: 0x%x held by %d", l, l->owner);
      l->owner = 0;
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+     mutex_unlock(&l->mutex);
+ #else
      up(&l->sem);
+ #endif
  }
  
  /* CV_WAIT and CV_TIMEDWAIT sleep until the specified event occurs, or, in the
Index: openafs/src/rx/LINUX/rx_kmutex.h
diff -c openafs/src/rx/LINUX/rx_kmutex.h:1.11.2.5 openafs/src/rx/LINUX/rx_kmutex.h:1.11.2.6
*** openafs/src/rx/LINUX/rx_kmutex.h:1.11.2.5	Fri Oct  7 13:23:40 2005
--- openafs/src/rx/LINUX/rx_kmutex.h	Thu Mar  9 16:41:55 2006
***************
*** 31,41 ****
  struct coda_inode_info {
  };
  #endif
! #include "linux/wait.h"
! #include "linux/sched.h"
  
  typedef struct afs_kmutex {
      struct semaphore sem;
      int owner;
  } afs_kmutex_t;
  
--- 31,51 ----
  struct coda_inode_info {
  };
  #endif
! #include <linux/version.h>
! #include <linux/wait.h>
! #include <linux/sched.h>
! #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
! #include <linux/mutex.h>
! #else
! #include <asm/semaphore.h>
! #endif
  
  typedef struct afs_kmutex {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+     struct mutex mutex;
+ #else
      struct semaphore sem;
+ #endif
      int owner;
  } afs_kmutex_t;
  
Index: openafs/src/rx/bulk.example/Makefile.in
diff -c openafs/src/rx/bulk.example/Makefile.in:1.4 openafs/src/rx/bulk.example/Makefile.in:1.4.2.1
*** openafs/src/rx/bulk.example/Makefile.in:1.4	Wed May 14 10:30:51 2003
--- openafs/src/rx/bulk.example/Makefile.in	Thu Mar  9 01:41:56 2006
***************
*** 13,19 ****
  LIBRX=@TOP_OBJDIR@/lib/librx.a
  DESTDIR=@srcdir@
  LIBS=${LIBRX} ${TOP_OBJDIR}/lib/liblwp.a ${TOP_OBJDIR}/lib/libafsutil.a
! CFLAGS=-g ${COMMON_INCL} -DDEBUG ${XCFLAGS}
  
  all: bulk_client bulk_server
  
--- 13,19 ----
  LIBRX=@TOP_OBJDIR@/lib/librx.a
  DESTDIR=@srcdir@
  LIBS=${LIBRX} ${TOP_OBJDIR}/lib/liblwp.a ${TOP_OBJDIR}/lib/libafsutil.a
! CFLAGS=-g ${COMMON_INCL} -DDEBUG ${XCFLAGS} ${ARCHFLAGS}
  
  all: bulk_client bulk_server
  
Index: openafs/src/rx/bulktest/Makefile.in
diff -c openafs/src/rx/bulktest/Makefile.in:1.4 openafs/src/rx/bulktest/Makefile.in:1.4.2.1
*** openafs/src/rx/bulktest/Makefile.in:1.4	Tue Jul  1 15:23:55 2003
--- openafs/src/rx/bulktest/Makefile.in	Thu Mar  9 01:41:56 2006
***************
*** 14,20 ****
  DESTDIR=/usr/andy/
  INSTALL=${SRCDIR}/bin/install
  LIBS=${LIBRX} ${SRCDIR}/lib/liblwp.a
! CFLAGS=${DBG} -I.. -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS}
  
  all: bulk_client bulk_server
  
--- 14,20 ----
  DESTDIR=/usr/andy/
  INSTALL=${SRCDIR}/bin/install
  LIBS=${LIBRX} ${SRCDIR}/lib/liblwp.a
! CFLAGS=${DBG} -I.. -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS} ${ARCHFLAGS}
  
  all: bulk_client bulk_server
  
Index: openafs/src/rx/multi.example/Makefile.in
diff -c openafs/src/rx/multi.example/Makefile.in:1.4 openafs/src/rx/multi.example/Makefile.in:1.4.2.1
*** openafs/src/rx/multi.example/Makefile.in:1.4	Tue Jul  1 15:23:57 2003
--- openafs/src/rx/multi.example/Makefile.in	Thu Mar  9 01:41:58 2006
***************
*** 14,20 ****
  DESTDIR=/usr/andy/
  INSTALL=${SRCDIR}/bin/install
  LIBS=${LIBRX} ${SRCDIR}/lib/liblwp.a
! CFLAGS=${DBG} -I.. -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS}
  
  all: sample_client sample_server
  
--- 14,20 ----
  DESTDIR=/usr/andy/
  INSTALL=${SRCDIR}/bin/install
  LIBS=${LIBRX} ${SRCDIR}/lib/liblwp.a
! CFLAGS=${DBG} -I.. -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS} ${ARCHFLAGS}
  
  all: sample_client sample_server
  
Index: openafs/src/rx/simple.example/Makefile.in
diff -c openafs/src/rx/simple.example/Makefile.in:1.4 openafs/src/rx/simple.example/Makefile.in:1.4.2.1
*** openafs/src/rx/simple.example/Makefile.in:1.4	Tue Jul  1 15:23:58 2003
--- openafs/src/rx/simple.example/Makefile.in	Thu Mar  9 01:41:58 2006
***************
*** 14,20 ****
  DESTDIR=/usr/andy/
  INSTALL=${SRCDIR}/bin/install
  LIBS=${LIBRX} ${SRCDIR}/lib/liblwp.a
! CFLAGS=${DBG} -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS}
  
  all: sample_client sample_server
  
--- 14,20 ----
  DESTDIR=/usr/andy/
  INSTALL=${SRCDIR}/bin/install
  LIBS=${LIBRX} ${SRCDIR}/lib/liblwp.a
! CFLAGS=${DBG} -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS} ${ARCHFLAGS}
  
  all: sample_client sample_server
  
Index: openafs/src/rx/test/Makefile.in
diff -c openafs/src/rx/test/Makefile.in:1.6 openafs/src/rx/test/Makefile.in:1.6.8.1
*** openafs/src/rx/test/Makefile.in:1.6	Thu Nov  1 00:00:48 2001
--- openafs/src/rx/test/Makefile.in	Thu Mar  9 01:41:59 2006
***************
*** 15,21 ****
  LIBS= ${TOP_LIBDIR}/libcmd.a  ../librx.a ${TOP_LIBDIR}/liblwp.a \
  	 ${TOP_LIBDIR}/util.a ${TOP_LIBDIR}/libsys.a ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} -DRXDEBUG ${LDIRS} ${XCFLAGS}
  
  RXTESTOBJS = testclient.o testserver.o kstest.o kctest.o
  
--- 15,21 ----
  LIBS= ${TOP_LIBDIR}/libcmd.a  ../librx.a ${TOP_LIBDIR}/liblwp.a \
  	 ${TOP_LIBDIR}/util.a ${TOP_LIBDIR}/libsys.a ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} -DRXDEBUG ${LDIRS} ${XCFLAGS} ${ARCHFLAGS}
  
  RXTESTOBJS = testclient.o testserver.o kstest.o kctest.o
  
Index: openafs/src/rxdebug/Makefile.in
diff -c openafs/src/rxdebug/Makefile.in:1.4 openafs/src/rxdebug/Makefile.in:1.4.2.1
*** openafs/src/rxdebug/Makefile.in:1.4	Sat Jan 11 02:34:50 2003
--- openafs/src/rxdebug/Makefile.in	Thu Mar  9 01:42:00 2006
***************
*** 8,14 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} -DRXDEBUG
  
  LIBS=${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/libcmd.a \
  	       ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libafsutil.a
--- 8,14 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} ${ARCHFLAGS} -DRXDEBUG
  
  LIBS=${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/libcmd.a \
  	       ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libafsutil.a
Index: openafs/src/rxkad/test/Makefile.in
diff -c openafs/src/rxkad/test/Makefile.in:1.8 openafs/src/rxkad/test/Makefile.in:1.8.2.1
*** openafs/src/rxkad/test/Makefile.in:1.8	Sun Oct 27 20:18:40 2002
--- openafs/src/rxkad/test/Makefile.in	Thu Mar  9 01:42:01 2006
***************
*** 9,15 ****
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS=-g -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
  
  HEADERS = ../rxkad.h stress.h stress_internal.h stress_errs.h
  
--- 9,15 ----
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS=-g -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
  
  HEADERS = ../rxkad.h stress.h stress_internal.h stress_errs.h
  
Index: openafs/src/scout/scout.c
diff -c openafs/src/scout/scout.c:1.9 openafs/src/scout/scout.c:1.9.2.1
*** openafs/src/scout/scout.c:1.9	Tue Jul 15 19:16:48 2003
--- openafs/src/scout/scout.c	Thu Mar  9 01:42:04 2006
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/scout/scout.c,v 1.9 2003/07/15 23:16:48 shadow Exp $");
  
  #undef	IN
  #ifdef	AFS_AIX32_ENV
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/scout/scout.c,v 1.9.2.1 2006/03/09 06:42:04 shadow Exp $");
  
  #undef	IN
  #ifdef	AFS_AIX32_ENV
***************
*** 1765,1771 ****
--- 1765,1775 ----
  	    return (-1);
  	}
  	memcpy(&(curr_skt->sin_addr.s_addr), he->h_addr, 4);
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ 	curr_skt->sin_family = AF_INET;		/*Internet family */
+ #else
  	curr_skt->sin_family = htons(AF_INET);	/*Internet family */
+ #endif
  	curr_skt->sin_port = htons(7000);	/*FileServer port */
  
  	/*
Index: openafs/src/sgistuff/Makefile.in
diff -c openafs/src/sgistuff/Makefile.in:1.7.8.1 openafs/src/sgistuff/Makefile.in:1.7.8.2
*** openafs/src/sgistuff/Makefile.in:1.7.8.1	Tue Aug 16 14:00:44 2005
--- openafs/src/sgistuff/Makefile.in	Thu Mar  9 01:42:05 2006
***************
*** 15,22 ****
  # Note that if afskauthlib.so gets installed on a client
  # machine then that will be used ..
  #
! CFLAGS=${OPTIMIZE} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
! LDFLAGS = ${OPTIMIZE} ${XLDFLAGS}
  LIBDIR=${TOP_LIBDIR}/
  AFSLIBS=${TOP_LIBDIR}/libkauth.a ${TOP_LIBDIR}/libprot.a ${LIBDIR}/libubik.a \
  	  ${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/librxkad.a ${TOP_LIBDIR}/libsys.a \
--- 15,22 ----
  # Note that if afskauthlib.so gets installed on a client
  # machine then that will be used ..
  #
! CFLAGS=${OPTIMIZE} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
! LDFLAGS = ${OPTIMIZE} ${XLDFLAGS} ${ARCHFLAGS}
  LIBDIR=${TOP_LIBDIR}/
  AFSLIBS=${TOP_LIBDIR}/libkauth.a ${TOP_LIBDIR}/libprot.a ${LIBDIR}/libubik.a \
  	  ${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/librxkad.a ${TOP_LIBDIR}/libsys.a \
Index: openafs/src/sia/Makefile.in
diff -c openafs/src/sia/Makefile.in:1.7 openafs/src/sia/Makefile.in:1.7.2.1
*** openafs/src/sia/Makefile.in:1.7	Sat Jan 11 02:34:55 2003
--- openafs/src/sia/Makefile.in	Thu Mar  9 01:42:06 2006
***************
*** 23,29 ****
  clean:
  	$(RM) -f test-reauth libafssiad.so libafssiad.krb.so *.s *.o *.b core *~ *.com *.ld AFS_component_version_number.c
  
! CFLAGS=${DBG} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
  
  ${DEST}/lib/afs/libafssiad.so: libafssiad.so
  	${INSTALL} $? $@
--- 23,29 ----
  clean:
  	$(RM) -f test-reauth libafssiad.so libafssiad.krb.so *.s *.o *.b core *~ *.com *.ld AFS_component_version_number.c
  
! CFLAGS=${DBG} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
  
  ${DEST}/lib/afs/libafssiad.so: libafssiad.so
  	${INSTALL} $? $@
Index: openafs/src/sys/Makefile.in
diff -c openafs/src/sys/Makefile.in:1.27.2.9 openafs/src/sys/Makefile.in:1.27.2.11
*** openafs/src/sys/Makefile.in:1.27.2.9	Sun Dec 11 01:34:33 2005
--- openafs/src/sys/Makefile.in	Fri Mar 17 19:44:53 2006
***************
*** 1,8 ****
- # API version. When something changes, increment as appropriate. 
- # Ignore at your own risk.
- LIBAFSSETPAGMAJOR=1
- LIBAFSSETPAGMINOR=0
- 
  # Copyright 2000, International Business Machines Corporation and others.
  # All Rights Reserved.
  # 
--- 1,3 ----
***************
*** 15,21 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=-I. -I${srcdir} ${DBUG} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}  ${XCFLAGS}
  SFLAGS=-I${TOP_INCDIR}
  LIBS=libsys.a ${TOP_LIBDIR}/librx.a libsys.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/util.a ${XLIBS}
  
--- 10,16 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=-I. -I${srcdir} ${DBUG} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}  ${XCFLAGS} ${ARCHFLAGS}
  SFLAGS=-I${TOP_INCDIR}
  LIBS=libsys.a ${TOP_LIBDIR}/librx.a libsys.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/util.a ${XLIBS}
  
***************
*** 23,75 ****
  SHLIBOBJS = picobj/setpag.o picobj/glue.o syscall.o
  RMTOBJS=rmtsysnet.o rmtsysc.o rmtsys.cs.o rmtsys.xdr.o rmtsys.ss.o rmtsyss.o 
  
- LIBAFSSETPAG = libafssetpag.${SHLIB_SUFFIX}.${LIBAFSSETPAGMAJOR}.${LIBAFSSETPAGMINOR}
- 
  all: \
! 	rmtsysd \
! 	pagsh \
! 	pagsh.krb \
! 	${TOP_INCDIR}/afs/afssyscalls.h \
! 	${TOP_INCDIR}/afs/afs.exp \
! 	${TOP_INCDIR}/afs/xfsattrs.h \
! 	${TOP_LIBDIR}/afs.exp \
! 	${TOP_LIBDIR}/libsys.a \
! 	${TOP_LIBDIR}/${LIBAFSSETPAG} \
! 	${KERNELDIR}/afs \
! 	${KERNELDIR}/afs/xfsattrs.h \
! 	${UKERNELDIR}/afs \
! 	${UKERNELDIR}/afs/afsl.exp
  
  libsys.a: ${OBJECTS} ${RMTOBJS} afsl.exp AFS_component_version_number.o
  	-$(RM) -f $@
  	$(AR) crv $@ ${OBJECTS} ${RMTOBJS} \
  		AFS_component_version_number.o ${LIBSYS_AIX_EXP}
  	$(RANLIB) $@
! 	case "${SYS_NAME}" in                   	\
  		rs_aix*) 			        \
  			$(AR) crv $@ afsl.exp;;         \
  	esac
  
- ${LIBAFSSETPAG}: ${SHLIBOBJS}
- 	case ${SYS_NAME} in \
- 	*_linux*) \
- 	    ${SHLIB_LINKER} -Wl,-h,libafssetpag.so.${LIBAFSSETPAGMAJOR} \
- 	        -o ${LIBAFSSETPAG} -Wl,--version-script=${srcdir}/mapfile \
- 	        ${SHLIBOBJS};; \
- 	rs_aix4*) \
- 	    ${SHLIB_LINKER} -o ${LIBAFSSETPAG} ${SHLIBOBJS} \
- 	        -bE:afssetpag.exp;; \
- 	sun*_5*) \
- 	    ${SHLIB_LINKER} -h libafssetpag.so.${LIBAFSSETPAGMAJOR} \
- 	        -o ${LIBAFSSETPAG} ${SHLIBOBJS};; \
- 	*) \
- 	    ${SHLIB_LINKER} -o ${LIBAFSSETPAG} ${SHLIBOBJS};; \
- 	esac
- 
  tests:	pagsh pagsh.krb fixit iinc idec icreate iopen istat rmtsysd
  
  syscall.o: syscall.s
! 	case "$(SYS_NAME)" in \
  	 sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53  | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5? | sun4x_5?? | sunx86_5? | sunx86_5?? ) \
  		/usr/ccs/lib/cpp -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
  		as -o syscall.o syscall.ss;		\
--- 18,51 ----
  SHLIBOBJS = picobj/setpag.o picobj/glue.o syscall.o
  RMTOBJS=rmtsysnet.o rmtsysc.o rmtsys.cs.o rmtsys.xdr.o rmtsys.ss.o rmtsyss.o 
  
  all: \
!     rmtsysd \
!     pagsh \
!     pagsh.krb \
!     ${TOP_INCDIR}/afs/afssyscalls.h \
!     ${TOP_INCDIR}/afs/afs.exp \
!     ${TOP_INCDIR}/afs/xfsattrs.h \
!     ${TOP_LIBDIR}/afs.exp \
!     ${TOP_LIBDIR}/libsys.a \
!     ${KERNELDIR}/afs \
!     ${KERNELDIR}/afs/xfsattrs.h \
!     ${UKERNELDIR}/afs \
!     ${UKERNELDIR}/afs/afsl.exp
  
  libsys.a: ${OBJECTS} ${RMTOBJS} afsl.exp AFS_component_version_number.o
  	-$(RM) -f $@
  	$(AR) crv $@ ${OBJECTS} ${RMTOBJS} \
  		AFS_component_version_number.o ${LIBSYS_AIX_EXP}
  	$(RANLIB) $@
! 	@set -x; case "${SYS_NAME}" in                   	\
  		rs_aix*) 			        \
  			$(AR) crv $@ afsl.exp;;         \
  	esac
  
  tests:	pagsh pagsh.krb fixit iinc idec icreate iopen istat rmtsysd
  
  syscall.o: syscall.s
! 	@set -x; case "$(SYS_NAME)" in \
  	 sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53  | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5? | sun4x_5?? | sunx86_5? | sunx86_5?? ) \
  		/usr/ccs/lib/cpp -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
  		as -o syscall.o syscall.ss;		\
***************
*** 171,189 ****
  
  
  xfsinode: xfsinode.c  AFS_component_version_number.c
! 	case "${SYS_NAME}" in \
  		sgi_62 | sgi_64 ) \
  		$(CC) -o xfsinode ${CFLAGS} ${srcdir}/xfsinode.c ${LIBS}
  	esac
  
- ${TOP_LIBDIR}/${LIBAFSSETPAG}: ${LIBAFSSETPAG}
- 	${INSTALL} ${LIBAFSSETPAG} ${TOP_LIBDIR}/${LIBAFSSETPAG}
- 	-ln -f -s ${LIBAFSSETPAG} ${TOP_LIBDIR}/libafssetpag.${SHLIB_SUFFIX}
- 	-ln -f -s ${LIBAFSSETPAG} ${TOP_LIBDIR}/libafssetpag.${SHLIB_SUFFIX}.${LIBAFSSETPAGMAJOR}
-  
- 
  afs.exp: ${srcdir}/afs4.exp ${srcdir}/afs5.exp
! 	case ${SYS_NAME} in \
  		rs_aix5* ) \
  			cp -p ${srcdir}/afs5.exp afs.exp ;; \
  		rs_aix* ) \
--- 147,159 ----
  
  
  xfsinode: xfsinode.c  AFS_component_version_number.c
! 	@set -x; case "${SYS_NAME}" in \
  		sgi_62 | sgi_64 ) \
  		$(CC) -o xfsinode ${CFLAGS} ${srcdir}/xfsinode.c ${LIBS}
  	esac
  
  afs.exp: ${srcdir}/afs4.exp ${srcdir}/afs5.exp
! 	@set -x; case ${SYS_NAME} in \
  		rs_aix5* ) \
  			cp -p ${srcdir}/afs5.exp afs.exp ;; \
  		rs_aix* ) \
***************
*** 193,199 ****
  	esac
  
  afsl.exp: ${srcdir}/afsl4.exp ${srcdir}/afsl5.exp
! 	case ${SYS_NAME} in \
  		rs_aix5* ) \
  			cp -p ${srcdir}/afsl5.exp afsl.exp ;; \
  		rs_aix* ) \
--- 163,169 ----
  	esac
  
  afsl.exp: ${srcdir}/afsl4.exp ${srcdir}/afsl5.exp
! 	@set -x; case ${SYS_NAME} in \
  		rs_aix5* ) \
  			cp -p ${srcdir}/afsl5.exp afsl.exp ;; \
  		rs_aix* ) \
***************
*** 210,222 ****
  	${INSTALL} $? $@
  
  ${TOP_INCDIR}/afs/afs.exp: afs.exp
! 	case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
  
  ${TOP_LIBDIR}/afs.exp: afs.exp
! 	case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
--- 180,192 ----
  	${INSTALL} $? $@
  
  ${TOP_INCDIR}/afs/afs.exp: afs.exp
! 	@set -x; case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
  
  ${TOP_LIBDIR}/afs.exp: afs.exp
! 	@set -x; case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
***************
*** 231,237 ****
  	mkdir -p $@
  
  ${UKERNELDIR}/afs/afsl.exp: afsl.exp
! 	case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
--- 201,207 ----
  	mkdir -p $@
  
  ${UKERNELDIR}/afs/afsl.exp: afsl.exp
! 	@set -x; case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
***************
*** 250,274 ****
  	${UKERNELDIR}/afs/afsl.exp
  
  install: \
! 	${DESTDIR}${libdir}/afs/libsys.a \
! 	${DESTDIR}${libdir}/${LIBAFSSETPAG} \
! 	${DESTDIR}${sbindir}/rmtsysd \
! 	${DESTDIR}${includedir}/afs/afssyscalls.h \
! 	${DESTDIR}${bindir}/pagsh \
! 	${DESTDIR}${bindir}/pagsh.krb \
! 	${DESTDIR}${includedir}/afs/afs.exp \
! 	${DESTDIR}${includedir}/afs/xfsattrs.h
  
  ${DESTDIR}${libdir}/afs/libsys.a: libsys.a
  	${INSTALL} $? $@
  
- ${DESTDIR}${libdir}/${LIBAFSSETPAG}: ${LIBAFSSETPAG}
- 	${INSTALL} ${LIBAFSSETPAG} ${DESTDIR}${libdir}/${LIBAFSSETPAG}
- 	-ln -f -s ${LIBAFSSETPAG} \
- 	    ${DESTDIR}${libdir}/libafssetpag.${SHLIB_SUFFIX}
- 	-ln -f -s ${LIBAFSSETPAG} \
- 	    ${DESTDIR}${libdir}/libafssetpag.${SHLIB_SUFFIX}.${LIBAFSSETPAGMAJOR}
- 
  ${DESTDIR}${sbindir}/rmtsysd: rmtsysd
  	${INSTALL} -s $? $@
  
--- 220,236 ----
  	${UKERNELDIR}/afs/afsl.exp
  
  install: \
!     ${DESTDIR}${libdir}/afs/libsys.a \
!     ${DESTDIR}${sbindir}/rmtsysd \
!     ${DESTDIR}${includedir}/afs/afssyscalls.h \
!     ${DESTDIR}${bindir}/pagsh \
!     ${DESTDIR}${bindir}/pagsh.krb \
!     ${DESTDIR}${includedir}/afs/afs.exp \
!     ${DESTDIR}${includedir}/afs/xfsattrs.h
  
  ${DESTDIR}${libdir}/afs/libsys.a: libsys.a
  	${INSTALL} $? $@
  
  ${DESTDIR}${sbindir}/rmtsysd: rmtsysd
  	${INSTALL} -s $? $@
  
***************
*** 282,288 ****
  	${INSTALL} -s $? $@
  
  ${DESTDIR}${includedir}/afs/afs.exp: afs.exp
! 	case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
--- 244,250 ----
  	${INSTALL} -s $? $@
  
  ${DESTDIR}${includedir}/afs/afs.exp: afs.exp
! 	@set -x; case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
***************
*** 291,310 ****
  	${INSTALL} $? $@
  
  dest: \
! 	${DEST}/lib/afs/libsys.a \
! 	${TOP_LIBDIR}/${LIBAFSSETPAG} \
! 	${DEST}/etc/rmtsysd \
! 	${DEST}/bin/pagsh \
! 	${DEST}/bin/pagsh.krb \
! 	${DEST}/include/afs/afssyscalls.h \
! 	${DEST}/include/afs/afs.exp \
! 	${DEST}/include/afs/xfsattrs.h
  
  ${DEST}/lib/afs/libsys.a: libsys.a
  	${INSTALL} $? $@
  
  ${DEST}/include/afs/afs.exp: afs.exp
! 	case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
--- 253,271 ----
  	${INSTALL} $? $@
  
  dest: \
!     ${DEST}/lib/afs/libsys.a \
!     ${DEST}/etc/rmtsysd \
!     ${DEST}/bin/pagsh \
!     ${DEST}/bin/pagsh.krb \
!     ${DEST}/include/afs/afssyscalls.h \
!     ${DEST}/include/afs/afs.exp \
!     ${DEST}/include/afs/xfsattrs.h
  
  ${DEST}/lib/afs/libsys.a: libsys.a
  	${INSTALL} $? $@
  
  ${DEST}/include/afs/afs.exp: afs.exp
! 	@set -x; case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
***************
*** 333,337 ****
  	$(RM) -f *.o libsys.a xfsinode iinc idec icreate iopen istat core \
  	rmtsysc rmtsyss *.o rmtsys.ss.c rmtsys.cs.c rmtsys.xdr.c rmtsys.h \
  	rmtsysd AFS_component_version_number.c pagsh pagsh.krb \
! 	afs.exp afsl.exp libafssetpag.*
  	$(RM) -rf picobj
--- 294,298 ----
  	$(RM) -f *.o libsys.a xfsinode iinc idec icreate iopen istat core \
  	rmtsysc rmtsyss *.o rmtsys.ss.c rmtsys.cs.c rmtsys.xdr.c rmtsys.h \
  	rmtsysd AFS_component_version_number.c pagsh pagsh.krb \
! 	afs.exp afsl.exp 
  	$(RM) -rf picobj
Index: openafs/src/tests/Makefile.in
diff -c openafs/src/tests/Makefile.in:1.12 openafs/src/tests/Makefile.in:1.12.2.1
*** openafs/src/tests/Makefile.in:1.12	Sat Jan 11 02:34:57 2003
--- openafs/src/tests/Makefile.in	Thu Mar  9 01:42:08 2006
***************
*** 3,10 ****
  
  SHELL		= /bin/sh
  
! CFLAGS		= ${DBG} ${OPTMZ} -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
! LDFLAGS=${XLDFLAGS}
  
  INCDIRS=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}/afs -I${TOP_INCDIR}
  INCLIBS=-L${SRCDIR}/lib/afs -L${TOP_LIBDIR}
--- 3,10 ----
  
  SHELL		= /bin/sh
  
! CFLAGS		= ${DBG} ${OPTMZ} -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
! LDFLAGS=${XLDFLAGS} ${ARCHFLAGS}
  
  INCDIRS=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}/afs -I${TOP_INCDIR}
  INCLIBS=-L${SRCDIR}/lib/afs -L${TOP_LIBDIR}
Index: openafs/src/tsm41/Makefile.in
diff -c openafs/src/tsm41/Makefile.in:1.7 openafs/src/tsm41/Makefile.in:1.7.6.1
*** openafs/src/tsm41/Makefile.in:1.7	Tue May 21 01:35:49 2002
--- openafs/src/tsm41/Makefile.in	Thu Mar  9 01:42:10 2006
***************
*** 9,15 ****
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS=${OPTIMIZE} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
  AFSLIBS =  ${TOP_LIBDIR}/libkauth.a ${TOP_LIBDIR}/libprot.a \
  	   ${TOP_LIBDIR}/libubik.a ${TOP_LIBDIR}/libauth.a \
  	   ${TOP_LIBDIR}/librxkad.a ${TOP_LIBDIR}/libsys.a \
--- 9,15 ----
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS=${OPTIMIZE} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
  AFSLIBS =  ${TOP_LIBDIR}/libkauth.a ${TOP_LIBDIR}/libprot.a \
  	   ${TOP_LIBDIR}/libubik.a ${TOP_LIBDIR}/libauth.a \
  	   ${TOP_LIBDIR}/librxkad.a ${TOP_LIBDIR}/libsys.a \
Index: openafs/src/tviced/Makefile.in
diff -c openafs/src/tviced/Makefile.in:1.10.2.1 openafs/src/tviced/Makefile.in:1.10.2.2
*** openafs/src/tviced/Makefile.in:1.10.2.1	Mon Aug  8 11:39:24 2005
--- openafs/src/tviced/Makefile.in	Thu Mar  9 16:46:09 2006
***************
*** 145,152 ****
  devname.o: ${VOL}/devname.c
  	${CCRULE}
  
! # only for darwin
! fstab.o: ${VOL}/fstab.c
  	${CCRULE}
  
  common.o: ${VOL}/common.c
--- 145,152 ----
  devname.o: ${VOL}/devname.c
  	${CCRULE}
  
! # only for darwin?
! fstab.o: ${UTIL}/fstab.c
  	${CCRULE}
  
  common.o: ${VOL}/common.c
Index: openafs/src/ubik/phys.c
diff -c openafs/src/ubik/phys.c:1.8 openafs/src/ubik/phys.c:1.8.2.1
*** openafs/src/ubik/phys.c:1.8	Tue Jul 15 19:17:05 2003
--- openafs/src/ubik/phys.c	Thu Mar  9 01:42:12 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/phys.c,v 1.8 2003/07/15 23:17:05 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/phys.c,v 1.8.2.1 2006/03/09 06:42:12 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 276,282 ****
      thdr.version.epoch = htonl(aversion->epoch);
      thdr.version.counter = htonl(aversion->counter);
      thdr.magic = htonl(UBIK_MAGIC);
!     thdr.size = htonl(HDRSIZE);
      code = write(fd, &thdr, sizeof(thdr));
      fsync(fd);			/* preserve over crash */
      uphys_close(fd);
--- 276,282 ----
      thdr.version.epoch = htonl(aversion->epoch);
      thdr.version.counter = htonl(aversion->counter);
      thdr.magic = htonl(UBIK_MAGIC);
!     thdr.size = htons(HDRSIZE);
      code = write(fd, &thdr, sizeof(thdr));
      fsync(fd);			/* preserve over crash */
      uphys_close(fd);
Index: openafs/src/usd/Makefile.in
diff -c openafs/src/usd/Makefile.in:1.6 openafs/src/usd/Makefile.in:1.6.8.1
*** openafs/src/usd/Makefile.in:1.6	Thu Nov  1 00:01:09 2001
--- openafs/src/usd/Makefile.in	Thu Mar  9 01:42:14 2006
***************
*** 10,16 ****
  
  
  
! CFLAGS=-I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
  
  all: ${TOP_LIBDIR}/libusd.a ${TOP_INCDIR}/afs/usd.h
  
--- 10,16 ----
  
  
  
! CFLAGS=-I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
  
  all: ${TOP_LIBDIR}/libusd.a ${TOP_INCDIR}/afs/usd.h
  
Index: openafs/src/usd/test/Makefile.in
diff -c openafs/src/usd/test/Makefile.in:1.5 openafs/src/usd/test/Makefile.in:1.5.2.1
*** openafs/src/usd/test/Makefile.in:1.5	Tue Oct 15 23:59:17 2002
--- openafs/src/usd/test/Makefile.in	Thu Mar  9 01:42:15 2006
***************
*** 10,16 ****
  
  
  INCDIRS= -I${DESTDIR}/include  -I..
! CFLAGS = $(DBUG) -I${SRCDIR}/include ${INCDIRS} ${XCFLAGS}
  LIBUSD=DEST/lib/afs/libusd.a
  
  #####################################################################
--- 10,16 ----
  
  
  INCDIRS= -I${DESTDIR}/include  -I..
! CFLAGS = $(DBUG) -I${SRCDIR}/include ${INCDIRS} ${XCFLAGS} ${ARCHFLAGS}
  LIBUSD=DEST/lib/afs/libusd.a
  
  #####################################################################
Index: openafs/src/uss/Makefile.in
diff -c openafs/src/uss/Makefile.in:1.7 openafs/src/uss/Makefile.in:1.7.2.1
*** openafs/src/uss/Makefile.in:1.7	Thu Jun 19 12:55:10 2003
--- openafs/src/uss/Makefile.in	Thu Mar  9 01:42:16 2006
***************
*** 13,19 ****
  all: uss
  
  CFLAGS=-I. -I${srcdir} ${DBUG} -I${TOP_OBJDIR}/src/config \
! 	-I${TOP_INCDIR} -I. ${XCFLAGS}
  
  #
  # Build targets
--- 13,19 ----
  all: uss
  
  CFLAGS=-I. -I${srcdir} ${DBUG} -I${TOP_OBJDIR}/src/config \
! 	-I${TOP_INCDIR} -I. ${XCFLAGS} ${ARCHFLAGS}
  
  #
  # Build targets
Index: openafs/src/util/Makefile.am
diff -c openafs/src/util/Makefile.am:1.1 openafs/src/util/Makefile.am:1.1.16.1
*** openafs/src/util/Makefile.am:1.1	Tue Jun  5 16:17:53 2001
--- openafs/src/util/Makefile.am	Thu Mar  9 01:42:17 2006
***************
*** 1,4 ****
! # $Id: Makefile.am,v 1.1 2001/06/05 20:17:53 shadow Exp $
  
  include $(top_srcdir)/Makefile.am.common
  
--- 1,4 ----
! # $Id: Makefile.am,v 1.1.16.1 2006/03/09 06:42:17 shadow Exp $
  
  include $(top_srcdir)/Makefile.am.common
  
***************
*** 27,31 ****
  	flipbase64.c	\
  	afs_atomlist.c	\
  	afs_lhash.c	\
! 	snprintf.c
  
--- 27,32 ----
  	flipbase64.c	\
  	afs_atomlist.c	\
  	afs_lhash.c	\
! 	snprintf.c	\
! 	fstab.c
  
Index: openafs/src/util/Makefile.in
diff -c openafs/src/util/Makefile.in:1.24.2.4 openafs/src/util/Makefile.in:1.24.2.5
*** openafs/src/util/Makefile.in:1.24.2.4	Tue Jun 21 16:20:00 2005
--- openafs/src/util/Makefile.in	Thu Mar  9 01:42:17 2006
***************
*** 12,18 ****
  
  objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \
  	 hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \
! 	 dirpath.o fileutil.o netutils.o flipbase64.o \
  	 afs_atomlist.o afs_lhash.o snprintf.o strlcat.o strlcpy.o \
  	 daemon.o rxkstats.o ${REGEX_OBJ}
  
--- 12,18 ----
  
  objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \
  	 hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \
! 	 dirpath.o fileutil.o netutils.o flipbase64.o fstab.o \
  	 afs_atomlist.o afs_lhash.o snprintf.o strlcat.o strlcpy.o \
  	 daemon.o rxkstats.o ${REGEX_OBJ}
  
***************
*** 80,85 ****
--- 80,88 ----
  snprintf.o: ${srcdir}/snprintf.c ${includes}
  	${CCOBJ} ${CFLAGS} -c ${srcdir}/snprintf.c
  
+ fstab.o: ${srcdir}/fstab.c ${includes}
+ 	${CCOBJ} ${CFLAGS} -c ${srcdir}/fstab.c
+ 
  base64.o: ${srcdir}/base64.c ${includes}
  	${CCOBJ} ${CFLAGS} -c ${srcdir}/base64.c
  
***************
*** 389,392 ****
  	    assert.c base64.c casestrcpy.c ktime.c volparse.c hostparse.c \
  	    hputil.c kreltime.c isathing.c get_krbrlm.c uuid.c serverLog.c \
  	    dirpath.c fileutil.c netutils.c flipbase64.c \
! 	    afs_atomlist.c afs_lhash.c snprintf.c
--- 392,395 ----
  	    assert.c base64.c casestrcpy.c ktime.c volparse.c hostparse.c \
  	    hputil.c kreltime.c isathing.c get_krbrlm.c uuid.c serverLog.c \
  	    dirpath.c fileutil.c netutils.c flipbase64.c \
! 	    afs_atomlist.c afs_lhash.c snprintf.c fstab.c
Index: openafs/src/util/afsutil.h
diff -c openafs/src/util/afsutil.h:1.17.2.2 openafs/src/util/afsutil.h:1.17.2.3
*** openafs/src/util/afsutil.h:1.17.2.2	Mon Jul 11 15:08:49 2005
--- openafs/src/util/afsutil.h	Wed Mar 15 13:35:56 2006
***************
*** 30,35 ****
--- 30,36 ----
  extern int serverLogSyslog;
  extern int serverLogSyslogFacility;
  extern char *serverLogSyslogTag;
+ #include <arpa/inet.h> /* for inet_ntoa() */
  #endif
  extern void vFSLog(const char *format, va_list args);
  extern void SetLogThreadNumProgram(int (*func) () );
Index: openafs/src/util/fstab.c
diff -c /dev/null openafs/src/util/fstab.c:1.1.2.2
*** /dev/null	Fri Mar 17 19:52:20 2006
--- openafs/src/util/fstab.c	Thu Mar  9 01:42:17 2006
***************
*** 0 ****
--- 1,181 ----
+ /*
+  * 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.
+  */
+ 
+ #include <afs/param.h>
+ 
+ #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 <errno.h>
+ #include <fstab.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <sys/param.h>
+ #include <sys/ucred.h>
+ #include <sys/mount.h>
+ 
+ #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/util/test/Makefile.in
diff -c openafs/src/util/test/Makefile.in:1.4 openafs/src/util/test/Makefile.in:1.4.2.1
*** openafs/src/util/test/Makefile.in:1.4	Tue Jul  1 15:24:05 2003
--- openafs/src/util/test/Makefile.in	Thu Mar  9 01:42:19 2006
***************
*** 9,15 ****
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS = -I. -I.. -I${SRCDIR}/include ${XCFLAGS} ${DBG}
  
  tests: test_ktime ktest dirpath_test
  
--- 9,15 ----
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS = -I. -I.. -I${SRCDIR}/include ${XCFLAGS} ${ARCHFLAGS} ${DBG}
  
  tests: test_ktime ktest dirpath_test
  
Index: openafs/src/venus/Makefile.in
diff -c openafs/src/venus/Makefile.in:1.30.2.2 openafs/src/venus/Makefile.in:1.30.2.3
*** openafs/src/venus/Makefile.in:1.30.2.2	Mon Apr  4 03:36:32 2005
--- openafs/src/venus/Makefile.in	Thu Mar  9 01:42:21 2006
***************
*** 159,165 ****
  					-o kdump.$$IP kdump.$$IP.o \
  					${TOP_LIBDIR}/libcmd64.a -lelf \
  				;; \
! 			*) 	${CC} ${XCFLAGS} \
  					$$CPU_KDEFS \
  					-o kdump.$$IP kdump.$$IP.o \
  					${TOP_LIBDIR}/libcmd.a -lelf \
--- 159,165 ----
  					-o kdump.$$IP kdump.$$IP.o \
  					${TOP_LIBDIR}/libcmd64.a -lelf \
  				;; \
! 			*) 	${CC} ${XCFLAGS} ${ARCHFLAGS} \
  					$$CPU_KDEFS \
  					-o kdump.$$IP kdump.$$IP.o \
  					${TOP_LIBDIR}/libcmd.a -lelf \
***************
*** 213,219 ****
  						${KERN_DBG} ${KERN_OPTMZ} -I${TOP_INCDIR} \
  						-I${TOP_OBJDIR}/src/config \
  						$$CPU_KDEFS \
! 						${XCFLAGS} -DAFS_32BIT_KERNEL_ENV \
  						-c ${srcdir}/kdump.c -o kdump.$$IP.o \
  					;; \
  				esac || exit $$?; \
--- 213,219 ----
  						${KERN_DBG} ${KERN_OPTMZ} -I${TOP_INCDIR} \
  						-I${TOP_OBJDIR}/src/config \
  						$$CPU_KDEFS \
! 						${XCFLAGS} ${ARCHFLAGS} -DAFS_32BIT_KERNEL_ENV \
  						-c ${srcdir}/kdump.c -o kdump.$$IP.o \
  					;; \
  				esac || exit $$?; \
***************
*** 223,229 ****
  			touch kdump.o ;; \
  		*) \
  			${CC} ${KERN_DBG} ${KERN_OPTMZ} -I${TOP_SRCDIR} -I${TOP_INCDIR}/afs \
! 			-I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src -I${TOP_INCDIR} ${XCFLAGS} \
  			-o kdump.o -c ${srcdir}/kdump.c ;; \
  	esac ;
  
--- 223,229 ----
  			touch kdump.o ;; \
  		*) \
  			${CC} ${KERN_DBG} ${KERN_OPTMZ} -I${TOP_SRCDIR} -I${TOP_INCDIR}/afs \
! 			-I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS} \
  			-o kdump.o -c ${srcdir}/kdump.c ;; \
  	esac ;
  
***************
*** 243,249 ****
  		-I${TOP_OBJDIR}/src/afs/${MKAFS_OSTYPE} \
  		-I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src/libafs/afs \
  		-I${TOP_SRCDIR} -I${TOP_SRCDIR}/afs/${MKAFS_OSTYPE} \
! 		-I${TOP_INCDIR} ${XCFLAGS} -o kdump-linux-${LINUX_VERSION}.o \
  		-c ${srcdir}/kdump.c
  
  kdump-linux-@LINUX_VERSION@: kdump-linux-@LINUX_VERSION@.o
--- 243,249 ----
  		-I${TOP_OBJDIR}/src/afs/${MKAFS_OSTYPE} \
  		-I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src/libafs/afs \
  		-I${TOP_SRCDIR} -I${TOP_SRCDIR}/afs/${MKAFS_OSTYPE} \
! 		-I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS} -o kdump-linux-${LINUX_VERSION}.o \
  		-c ${srcdir}/kdump.c
  
  kdump-linux-@LINUX_VERSION@: kdump-linux-@LINUX_VERSION@.o
***************
*** 257,263 ****
  		-I${TOP_OBJDIR}/src/afs/${MKAFS_OSTYPE} \
  		-I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src/libafs/afs \
  		-I${TOP_SRCDIR} -I${TOP_SRCDIR}/afs/${MKAFS_OSTYPE} \
! 		-I${TOP_INCDIR} ${XCFLAGS} -mno-fp-regs -ffixed-8 \
  		-o kdump-alpha_linux-${LINUX_VERSION}.o -c ${srcdir}/kdump.c ;; \
  
  kdump-alpha_linux-@LINUX_VERSION@: kdump-alpha_linux-@LINUX_VERSION@.o
--- 257,263 ----
  		-I${TOP_OBJDIR}/src/afs/${MKAFS_OSTYPE} \
  		-I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src/libafs/afs \
  		-I${TOP_SRCDIR} -I${TOP_SRCDIR}/afs/${MKAFS_OSTYPE} \
! 		-I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS} -mno-fp-regs -ffixed-8 \
  		-o kdump-alpha_linux-${LINUX_VERSION}.o -c ${srcdir}/kdump.c ;; \
  
  kdump-alpha_linux-@LINUX_VERSION@: kdump-alpha_linux-@LINUX_VERSION@.o
Index: openafs/src/venus/test/Makefile.in
diff -c openafs/src/venus/test/Makefile.in:1.7 openafs/src/venus/test/Makefile.in:1.7.8.1
*** openafs/src/venus/test/Makefile.in:1.7	Thu Nov  1 00:01:17 2001
--- openafs/src/venus/test/Makefile.in	Thu Mar  9 01:42:22 2006
***************
*** 13,19 ****
  LDIRS= -L${TOP_LIBDIR} -L..
  LIBS= -lsys -lubik -lvldb -lauth -lrxkad -ldes -lcom_err -lcmd -lrx -llwp -lafsutil
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${XCFLAGS}
  
  all test:  fulltest owntest idtest getinitparams
  
--- 13,19 ----
  LDIRS= -L${TOP_LIBDIR} -L..
  LIBS= -lsys -lubik -lvldb -lauth -lrxkad -ldes -lcom_err -lcmd -lrx -llwp -lafsutil
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${XCFLAGS} ${ARCHFLAGS}
  
  all test:  fulltest owntest idtest getinitparams
  
Index: openafs/src/vfsck/Makefile.in
diff -c openafs/src/vfsck/Makefile.in:1.10 openafs/src/vfsck/Makefile.in:1.10.2.1
*** openafs/src/vfsck/Makefile.in:1.10	Sat Jan 11 02:35:00 2003
--- openafs/src/vfsck/Makefile.in	Thu Mar  9 01:42:25 2006
***************
*** 19,25 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} ${VFSCK_CFLAGS}
  
  SRCS= dir.c inode.c main.c pass1.c pass1b.c pass2.c pass3.c \
  	pass4.c pass5.c setup.c utilities.c ufs_subr.c \
--- 19,25 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} ${ARCHFLAGS} ${VFSCK_CFLAGS}
  
  SRCS= dir.c inode.c main.c pass1.c pass1b.c pass2.c pass3.c \
  	pass4.c pass5.c setup.c utilities.c ufs_subr.c \
Index: openafs/src/viced/Makefile.in
diff -c openafs/src/viced/Makefile.in:1.12 openafs/src/viced/Makefile.in:1.12.2.1
*** openafs/src/viced/Makefile.in:1.12	Fri Oct 24 02:26:17 2003
--- openafs/src/viced/Makefile.in	Thu Mar  9 01:42:26 2006
***************
*** 14,22 ****
  
  CFLAGS=${DBG} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I. -I${TOP_INCDIR} \
  	-I${TOP_INCDIR}/afs -I${TOP_OBJDIR} -I${TOP_OBJDIR}/fsint\
! 	 ${XCFLAGS} -DRXDEBUG -DNINTERFACE
  
! LDFLAGS = ${DBUG} ${XLDFLAGS}
  
  LIBS=${TOP_LIBDIR}/libacl.a	\
  	${TOP_LIBDIR}/libvldb.a	\
--- 14,22 ----
  
  CFLAGS=${DBG} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I. -I${TOP_INCDIR} \
  	-I${TOP_INCDIR}/afs -I${TOP_OBJDIR} -I${TOP_OBJDIR}/fsint\
! 	 ${XCFLAGS} ${ARCHFLAGS} -DRXDEBUG -DNINTERFACE
  
! LDFLAGS = ${DBUG} ${XLDFLAGS} ${ARCHFLAGS}
  
  LIBS=${TOP_LIBDIR}/libacl.a	\
  	${TOP_LIBDIR}/libvldb.a	\
Index: openafs/src/viced/afsfileprocs.c
diff -c openafs/src/viced/afsfileprocs.c:1.81.2.22 openafs/src/viced/afsfileprocs.c:1.81.2.24
*** openafs/src/viced/afsfileprocs.c:1.81.2.22	Thu Mar  2 01:17:18 2006
--- openafs/src/viced/afsfileprocs.c	Thu Mar  9 11:29:00 2006
***************
*** 29,35 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/afsfileprocs.c,v 1.81.2.22 2006/03/02 06:17:18 jaltman Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
--- 29,35 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/afsfileprocs.c,v 1.81.2.24 2006/03/09 16:29:00 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
***************
*** 5950,5955 ****
--- 5950,5985 ----
  #endif
  	break;
  
+     case AFS_XSTATSCOLL_CBSTATS:
+ 	afs_perfstats.numPerfCalls++;
+ 
+ 	dataBytes = sizeof(struct cbcounters);
+ 	dataBuffP = (afs_int32 *) malloc(dataBytes);
+ 	{
+ 	    extern struct cbcounters cbstuff;
+ 	    dataBuffP[0]=cbstuff.DeleteFiles;
+ 	    dataBuffP[1]=cbstuff.DeleteCallBacks;
+ 	    dataBuffP[2]=cbstuff.BreakCallBacks;
+ 	    dataBuffP[3]=cbstuff.AddCallBacks;
+ 	    dataBuffP[4]=cbstuff.GotSomeSpaces;
+ 	    dataBuffP[5]=cbstuff.DeleteAllCallBacks;
+ 	    dataBuffP[6]=cbstuff.nFEs;
+ 	    dataBuffP[7]=cbstuff.nCBs;
+ 	    dataBuffP[8]=cbstuff.nblks;
+ 	    dataBuffP[9]=cbstuff.CBsTimedOut;
+ 	    dataBuffP[10]=cbstuff.nbreakers;
+ 	    dataBuffP[11]=cbstuff.GSS1;
+ 	    dataBuffP[12]=cbstuff.GSS2;
+ 	    dataBuffP[13]=cbstuff.GSS3;
+ 	    dataBuffP[14]=cbstuff.GSS4;
+ 	    dataBuffP[15]=cbstuff.GSS5;
+ 	}
+ 
+ 	a_dataP->AFS_CollData_len = dataBytes >> 2;
+ 	a_dataP->AFS_CollData_val = dataBuffP;
+ 	break;
+ 
+ 
      default:
  	/*
  	 * Illegal collection number.
***************
*** 7473,7479 ****
      Error errorCode = 0;
      struct host *thost;
      struct client *tclient;
!     struct client *tcallhost;
      static struct rx_securityClass *sc = 0;
      int i,j;
      struct rx_connection *tcon;
--- 7503,7509 ----
      Error errorCode = 0;
      struct host *thost;
      struct client *tclient;
!     struct host *tcallhost;
      static struct rx_securityClass *sc = 0;
      int i,j;
      struct rx_connection *tcon;
Index: openafs/src/viced/host.c
diff -c openafs/src/viced/host.c:1.57.2.22 openafs/src/viced/host.c:1.57.2.26
*** openafs/src/viced/host.c:1.57.2.22	Thu Mar  2 01:24:41 2006
--- openafs/src/viced/host.c	Mon Mar 13 19:33:46 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/host.c,v 1.57.2.22 2006/03/02 06:24:41 jaltman Exp $");
  
  #include <stdio.h>
  #include <errno.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/host.c,v 1.57.2.26 2006/03/14 00:33:46 jaltman Exp $");
  
  #include <stdio.h>
  #include <errno.h>
***************
*** 450,456 ****
      slept ? (host->cpsCall = FT_ApproxTime()) : (host->cpsCall = now);
  
      H_UNLOCK;
!     code = pr_GetHostCPS(htonl(host->host), &host->hcps);
      H_LOCK;
      if (code) {
  	/*
--- 450,456 ----
      slept ? (host->cpsCall = FT_ApproxTime()) : (host->cpsCall = now);
  
      H_UNLOCK;
!     code = pr_GetHostCPS(ntohl(host->host), &host->hcps);
      H_LOCK;
      if (code) {
  	/*
***************
*** 504,510 ****
  
  /* args in net byte order */
  void
! h_flushhostcps(register afs_uint32 hostaddr, register afs_uint32 hport)
  {
      register struct host *host;
      int held = 0;
--- 504,510 ----
  
  /* args in net byte order */
  void
! h_flushhostcps(register afs_uint32 hostaddr, register afs_uint16 hport)
  {
      register struct host *host;
      int held = 0;
***************
*** 531,559 ****
  h_Alloc_r(register struct rx_connection *r_con)
  {
      struct servent *serverentry;
-     register index = h_HashIndex(rxr_HostOf(r_con));
      register struct host *host;
      static struct rx_securityClass *sc = 0;
      afs_int32 now;
-     struct h_hashChain *h_hashChain;
  #if FS_STATS_DETAILED
      afs_uint32 newHostAddr_HBO;	/*New host IP addr, in host byte order */
  #endif /* FS_STATS_DETAILED */
  
      host = GetHT();
  
-     h_hashChain = (struct h_hashChain *)malloc(sizeof(struct h_hashChain));
-     if (!h_hashChain) {
- 	ViceLog(0, ("Failed malloc in h_Alloc_r\n"));
- 	assert(0);
-     }
-     h_hashChain->hostPtr = host;
-     h_hashChain->addr = rxr_HostOf(r_con);
-     h_hashChain->next = hostHashTable[index];
-     hostHashTable[index] = h_hashChain;
- 
      host->host = rxr_HostOf(r_con);
      host->port = rxr_PortOf(r_con);
      if (consolePort == 0) {	/* find the portal number for console */
  #if	defined(AFS_OSF_ENV)
  	serverentry = getservbyname("ropcons", "");
--- 531,550 ----
  h_Alloc_r(register struct rx_connection *r_con)
  {
      struct servent *serverentry;
      register struct host *host;
      static struct rx_securityClass *sc = 0;
      afs_int32 now;
  #if FS_STATS_DETAILED
      afs_uint32 newHostAddr_HBO;	/*New host IP addr, in host byte order */
  #endif /* FS_STATS_DETAILED */
  
      host = GetHT();
  
      host->host = rxr_HostOf(r_con);
      host->port = rxr_PortOf(r_con);
+ 
+     hashInsert_r(host->host, host->port, host);
+ 
      if (consolePort == 0) {	/* find the portal number for console */
  #if	defined(AFS_OSF_ENV)
  	serverentry = getservbyname("ropcons", "");
***************
*** 609,615 ****
  /* Note: host should be released by caller if 0 == *heldp and non-null */
  /* hostaddr and hport are in network order */
  struct host *
! h_Lookup_r(afs_uint32 haddr, afs_uint32 hport, int *heldp)
  {
      register afs_int32 now;
      register struct host *host = 0;
--- 600,606 ----
  /* Note: host should be released by caller if 0 == *heldp and non-null */
  /* hostaddr and hport are in network order */
  struct host *
! h_Lookup_r(afs_uint32 haddr, afs_uint16 hport, int *heldp)
  {
      register afs_int32 now;
      register struct host *host = 0;
***************
*** 713,728 ****
      /* ASSUMPTION: rxi_FreeConnection() does not yield */
      for (cp = &host->FirstClient; (client = *cp);) {
  	if ((host->hostFlags & HOSTDELETED) || client->deleted) {
  	    if (client->refCount) {
  		char hoststr[16];
  		ViceLog(0,
! 			("Warning: Host %s:%d client %x refcount %d while deleting, failing.\n",
  			 afs_inet_ntoa_r(host->host, hoststr),
  			 ntohs(host->port), client, client->refCount));
  		/* This is the same thing we do if the host is locked */
  		return;
  	    }
- 	    /* We can't protect this without dropping the H_LOCK */
  	    client->CPS.prlist_len = 0;
  	    if ((client->ViceId != ANONYMOUSID) && client->CPS.prlist_val)
  		free(client->CPS.prlist_val);
--- 704,730 ----
      /* ASSUMPTION: rxi_FreeConnection() does not yield */
      for (cp = &host->FirstClient; (client = *cp);) {
  	if ((host->hostFlags & HOSTDELETED) || client->deleted) {
+ 	    int code;
+ 	    ObtainWriteLockNoBlock(&client->lock, code);
+ 	    if (code < 0) {
+ 		char hoststr[16];
+ 		ViceLog(0,
+ 			("Warning: h_TossStuff_r failed: Host %s:%d client %x was locked.\n",
+ 			 afs_inet_ntoa_r(host->host, hoststr),
+ 			 ntohs(host->port), client));
+ 		return;
+ 	    }
+ 		 
  	    if (client->refCount) {
  		char hoststr[16];
  		ViceLog(0,
! 			("Warning: h_TossStuff_r failed: Host %s:%d client %x refcount %d.\n",
  			 afs_inet_ntoa_r(host->host, hoststr),
  			 ntohs(host->port), client, client->refCount));
  		/* This is the same thing we do if the host is locked */
+ 		ReleaseWriteLock(&client->lock);
  		return;
  	    }
  	    client->CPS.prlist_len = 0;
  	    if ((client->ViceId != ANONYMOUSID) && client->CPS.prlist_val)
  		free(client->CPS.prlist_val);
***************
*** 732,737 ****
--- 734,740 ----
  	    }
  	    CurrentConnections--;
  	    *cp = client->next;
+ 	    ReleaseWriteLock(&client->lock);
  	    FreeCE(client);
  	} else
  	    cp = &client->next;
***************
*** 979,985 ****
      assert(host);
      assert(host->interface);
  
!     ViceLog(125, ("addInterfaceAddr : host %s:d addr %s:%d\n", 
  		   afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port), 
  		   afs_inet_ntoa_r(addr, hoststr2), ntohs(port)));
  
--- 982,988 ----
      assert(host);
      assert(host->interface);
  
!     ViceLog(125, ("addInterfaceAddr : host %s:%d addr %s:%d\n", 
  		   afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port), 
  		   afs_inet_ntoa_r(addr, hoststr2), ntohs(port)));
  
***************
*** 1085,1092 ****
      struct interfaceAddr interf;
      int interfValid = 0;
      struct Identity *identP = NULL;
!     afs_int32 haddr;
!     afs_int16 hport;
      char hoststr[16], hoststr2[16];
      Capabilities caps;
      struct rx_connection *cb_conn = NULL;
--- 1088,1095 ----
      struct interfaceAddr interf;
      int interfValid = 0;
      struct Identity *identP = NULL;
!     afs_uint32 haddr;
!     afs_uint16 hport;
      char hoststr[16], hoststr2[16];
      Capabilities caps;
      struct rx_connection *cb_conn = NULL;
Index: openafs/src/viced/host.h
diff -c openafs/src/viced/host.h:1.9.2.6 openafs/src/viced/host.h:1.9.2.8
*** openafs/src/viced/host.h:1.9.2.6	Mon Feb 13 12:10:15 2006
--- openafs/src/viced/host.h	Mon Mar 13 19:33:46 2006
***************
*** 66,75 ****
      /* holds on this host; 1 bit per lwp.
       * A hold prevents this structure and
       * inferior structures from disappearing */
!     unsigned int host;		/* IP address of host interface that is
  				 * currently being used, in network
  				 * byte order */
!     unsigned short port;	/* port address of host */
      char Console;		/* XXXX This host is a console */
      unsigned short hostFlags;		/*  bit map */
  #if FS_STATS_DETAILED
--- 66,75 ----
      /* holds on this host; 1 bit per lwp.
       * A hold prevents this structure and
       * inferior structures from disappearing */
!     afs_uint32 host;		/* IP address of host interface that is
  				 * currently being used, in network
  				 * byte order */
!     afs_uint16 port;		/* port address of host */
      char Console;		/* XXXX This host is a console */
      unsigned short hostFlags;		/*  bit map */
  #if FS_STATS_DETAILED
***************
*** 200,207 ****
  extern int DeleteAllCallBacks_r(struct host *host, int deletefe);
  extern struct host *h_Alloc(register struct rx_connection *r_con);
  extern struct host *h_Alloc_r(register struct rx_connection *r_con);
! extern struct host *h_Lookup_r(afs_uint32 hostaddr, afs_uint32 hport,
  			       int *heldp);
  extern struct host *h_LookupUuid_r(afsUUID * uuidp);
  extern int h_FreeConnection(struct rx_connection *tcon);
  extern void h_Enumerate(int (*proc) (), char *param);
--- 200,209 ----
  extern int DeleteAllCallBacks_r(struct host *host, int deletefe);
  extern struct host *h_Alloc(register struct rx_connection *r_con);
  extern struct host *h_Alloc_r(register struct rx_connection *r_con);
! extern struct host *h_Lookup_r(afs_uint32 hostaddr, afs_uint16 hport,
  			       int *heldp);
+ extern void   hashInsert_r(afs_uint32 addr, afs_uint16 port, 
+ 			   struct host* host);
  extern struct host *h_LookupUuid_r(afsUUID * uuidp);
  extern int h_FreeConnection(struct rx_connection *tcon);
  extern void h_Enumerate(int (*proc) (), char *param);
***************
*** 215,221 ****
  extern void h_PrintClients();
  extern void h_GetWorkStats();
  extern void h_flushhostcps(register afs_uint32 hostaddr,
! 			   register afs_uint32 hport);
  struct Interface *MultiVerifyInterface_r();
  
  struct host *(hosttableptrs[h_MAXHOSTTABLES]);	/* Used by h_itoh */
--- 217,223 ----
  extern void h_PrintClients();
  extern void h_GetWorkStats();
  extern void h_flushhostcps(register afs_uint32 hostaddr,
! 			   register afs_uint16 hport);
  struct Interface *MultiVerifyInterface_r();
  
  struct host *(hosttableptrs[h_MAXHOSTTABLES]);	/* Used by h_itoh */
Index: openafs/src/vol/Makefile.in
diff -c openafs/src/vol/Makefile.in:1.18.2.2 openafs/src/vol/Makefile.in:1.18.2.3
*** openafs/src/vol/Makefile.in:1.18.2.2	Tue Nov  1 11:45:44 2005
--- openafs/src/vol/Makefile.in	Thu Mar  9 01:42:27 2006
***************
*** 16,29 ****
  	${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libdir.a \
  	${TOP_LIBDIR}/liblwp.a  ${TOP_LIBDIR}/libacl.a
  
! CFLAGS = ${COMMON_CFLAGS} -D${SYS_NAME} ${FSINCLUDES} ${XCFLAGS}
  
  PUBLICHEADERS=nfs.h vnode.h viceinode.h volume.h voldefs.h partition.h\
  	fssync.h ihandle.h namei_ops.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 fstab.o
  
  OBJECTS=${VLIBOBJS} physio.o vol-salvage.o vol-info.o vol-dump.o vol-bless.o
  
--- 16,29 ----
  	${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libdir.a \
  	${TOP_LIBDIR}/liblwp.a  ${TOP_LIBDIR}/libacl.a
  
! CFLAGS = ${COMMON_CFLAGS} -D${SYS_NAME} ${FSINCLUDES} ${XCFLAGS} ${ARCHFLAGS}
  
  PUBLICHEADERS=nfs.h vnode.h viceinode.h volume.h voldefs.h partition.h\
  	fssync.h ihandle.h namei_ops.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
  
  OBJECTS=${VLIBOBJS} physio.o vol-salvage.o vol-info.o vol-dump.o vol-bless.o
  
***************
*** 163,171 ****
  			${CC} ${LDFLAGS} -o gi gi.o ${TOP_LIBDIR}/libsys.a;; \
          esac
  
! volinfo: vol-info.o physio.o ihandle.o fstab.o ${LIBS}
  	${CC} ${CFLAGS} -o volinfo vol-info.o physio.o \
! 		ihandle.o fstab.o ${LIBS} ${XLIBS}
  
  vol-bless: vol-bless.o physio.o ihandle.o ${LIBS}
  	${CC} ${CFLAGS} -o vol-bless vol-bless.o physio.o ${LIBS} ${XLIBS}
--- 163,171 ----
  			${CC} ${LDFLAGS} -o gi gi.o ${TOP_LIBDIR}/libsys.a;; \
          esac
  
! volinfo: vol-info.o physio.o ihandle.o ${LIBS}
  	${CC} ${CFLAGS} -o volinfo vol-info.o physio.o \
! 		ihandle.o ${LIBS} ${XLIBS}
  
  vol-bless: vol-bless.o physio.o ihandle.o ${LIBS}
  	${CC} ${CFLAGS} -o vol-bless vol-bless.o physio.o ${LIBS} ${XLIBS}
Index: openafs/src/vol/fstab.c
diff -c openafs/src/vol/fstab.c:1.3.2.1 openafs/src/vol/fstab.c:1.3.2.2
*** openafs/src/vol/fstab.c:1.3.2.1	Wed Aug 25 03:14:19 2004
--- openafs/src/vol/fstab.c	Thu Mar  9 01:42:27 2006
***************
*** 1,181 ****
- /*
-  * 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.
-  */
- 
- #include <afs/param.h>
- 
- #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 <errno.h>
- #include <fstab.h>
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- #include <sys/param.h>
- #include <sys/ucred.h>
- #include <sys/mount.h>
- 
- #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) */
--- 0 ----
Index: openafs/src/vol/test/Makefile.in
diff -c openafs/src/vol/test/Makefile.in:1.7 openafs/src/vol/test/Makefile.in:1.7.2.1
*** openafs/src/vol/test/Makefile.in:1.7	Tue Oct 15 23:59:28 2002
--- openafs/src/vol/test/Makefile.in	Thu Mar  9 01:42:29 2006
***************
*** 11,17 ****
  
  INCDIRS=-I. -I.. -I${TOP_INCDIR} ${FSINCLUDES}
  INSTALL = ${SRCDIR}/bin/install
! LDFLAGS = ${OPTMZ} ${PROF} ${LDIRS} ${XLDFLAGS}
  
  LIBS=${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/vlib.a \
  	${TOP_LIBDIR}/util.a \
--- 11,17 ----
  
  INCDIRS=-I. -I.. -I${TOP_INCDIR} ${FSINCLUDES}
  INSTALL = ${SRCDIR}/bin/install
! LDFLAGS = ${OPTMZ} ${PROF} ${LDIRS} ${XLDFLAGS} ${ARCHFLAGS}
  
  LIBS=${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/vlib.a \
  	${TOP_LIBDIR}/util.a \
***************
*** 20,26 ****
  
  NAMEI_LIBS=../vlib.a ${TOP_LIBDIR}/util.a ${TOP_LIBDIR}/liblwp.a
  
! CFLAGS = -D${SYS_NAME} ${OPTMZ} ${INCDIRS} ${XCFLAGS} -g
  
  PROGS = listVicepx
  
--- 20,26 ----
  
  NAMEI_LIBS=../vlib.a ${TOP_LIBDIR}/util.a ${TOP_LIBDIR}/liblwp.a
  
! CFLAGS = -D${SYS_NAME} ${OPTMZ} ${INCDIRS} ${XCFLAGS} ${ARCHFLAGS} -g
  
  PROGS = listVicepx
  
Index: openafs/src/xstat/NTMakefile
diff -c /dev/null openafs/src/xstat/NTMakefile:1.2.2.2
*** /dev/null	Fri Mar 17 19:52:21 2006
--- openafs/src/xstat/NTMakefile	Sun Mar  5 22:16:41 2006
***************
*** 0 ****
--- 1,81 ----
+ # Copyright 2000, International Business Machines Corporation and others.
+ # All Rights Reserved.
+ # 
+ # 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
+ 
+ # Makefile for the module providing the client side of the File Server
+ # and Cache Manager extended statistics gathering.
+ 
+ RELDIR=xstat
+ !INCLUDE ..\config\NTMakefile.$(SYS_NAME)
+ !INCLUDE ..\config\NTMakefile.version
+ 
+ LIBDIR = $(DESTDIR)\lib
+ INCDIR = $(DESTDIR)\include
+ BINDIR = $(DESTDIR)\bin
+ 
+ RPCINCLS=$(INCDIR)\lwp.h $(INCDIR)\rx\rx.h
+ 
+ LIBS= \
+  	$(LIBDIR)\afs\afsint.lib \
+ 	$(LIBDIR)\afs\afscmd.lib \
+ 	$(LIBDIR)\afsrx.lib \
+ 	$(LIBDIR)\afslwp.lib \
+ 	$(LIBDIR)\afs\afspioctl.lib \
+ 	$(LIBDIR)\afs\afsutil.lib \
+ 	$(LIBDIR)\afs\afsreg.lib
+ 
+ 
+ install: \
+ 	$(INCDIR)\afs\xstat_fs.h \
+ 	$(INCDIR)\afs\xstat_cm.h \
+ 	$(LIBDIR)\afs_xstat_fs.lib \
+ 	$(LIBDIR)\afs_xstat_cm.lib \
+ 	$(BINDIR)\xstat_fs_test.exe \
+ 	$(BINDIR)\xstat_cm_test.exe
+ 
+ #
+ # File Server data collection
+ #
+ FSINCLS= $(INCDIR)\xstat_fs.h $(RPCINCLS)
+ 
+ {.}.c{$(OUT)}.obj:
+     $(C2OBJ) $<
+ 
+ $(LIBDIR)\afs_xstat_fs.lib: $(OUT)\xstat_fs.obj $(OUT)\xstat_fs_callback.obj $(OUT)\AFS_component_version_number.obj
+ 	$(LIBARCH)
+ 
+ $(BINDIR)\xstat_fs_test.exe: $(OUT)\xstat_fs_test.obj $(LIBDIR)\afs_xstat_fs.lib $(LIBS)
+ 	$(EXECONLINK) rpcrt4.lib
+ 	$(_VC_MANIFEST_EMBED_EXE)
+ 	$(EXEPREP)
+ 
+ #
+ # Cache Manager data collection
+ #
+ CMINCLS=$(INCDIR)\xstat_cm.h $(RPCINCLS)
+ 
+ $(LIBDIR)\afs_xstat_cm.lib: $(OUT)\xstat_cm.obj $(OUT)\AFS_component_version_number.obj
+ 	$(LIBARCH)
+ 
+ $(BINDIR)\xstat_cm_test.exe: $(OUT)\xstat_cm_test.obj $(LIBDIR)\afs_xstat_cm.lib $(LIBS)
+ 	$(EXECONLINK) 
+ 	$(_VC_MANIFEST_EMBED_EXE)
+ 	$(EXEPREP)
+ 
+ #
+ # Misc targets
+ #
+ clean::
+ 	$(DEL) -f $(OUT)\*.obj
+ 	$(DEL) -f $(OUT)\*.pdb
+ 	$(DEL) -f $(OUT)\*.ilk
+  	$(DEL) -f $(INCDIR)\afs\xstat_fs.h
+ 	$(DEL) -f $(INCDIR)\afs\xstat_cm.h
+ 	$(DEL) -f $(LIBDIR)\afs_xstat_fs.lib
+ 	$(DEL) -f $(LIBDIR)\afs_xstat_cm.lib
+ 	$(DEL) -f $(BINDIR)\xstat_cm_test.exe
+ 	$(DEL) -f $(BINDIR)\xstat_fs_test.exe
+ 	$(DEL) -f AFS_component_version_number.c
Index: openafs/src/xstat/xstat_cm.c
diff -c openafs/src/xstat/xstat_cm.c:1.9 openafs/src/xstat/xstat_cm.c:1.9.2.1
*** openafs/src/xstat/xstat_cm.c:1.9	Tue Jul 15 19:17:52 2003
--- openafs/src/xstat/xstat_cm.c	Sun Mar  5 22:16:41 2006
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_cm.c,v 1.9 2003/07/15 23:17:52 shadow Exp $");
  
  #include "xstat_cm.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_cm.c,v 1.9.2.1 2006/03/06 03:16:41 jaltman Exp $");
  
  #include "xstat_cm.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
***************
*** 403,408 ****
--- 403,409 ----
      char *hostNameFound;	/*Ptr to returned host name */
      int conn_err;		/*Connection error? */
      int collIDBytes;		/*Num bytes in coll ID array */
+     char hoststr[16];
  
      /*
       * If we've already been called, snicker at the bozo, gently
***************
*** 528,536 ****
  	 */
  	if (xstat_cm_debug) {
  	    printf("[%s] Copying in the following socket info:\n", rn);
! 	    printf("[%s] IP addr 0x%lx, port %d\n", rn,
! 		   (a_socketArray + curr_srv)->sin_addr.s_addr,
! 		   (a_socketArray + curr_srv)->sin_port);
  	}
  	memcpy(&(curr_conn->skt), a_socketArray + curr_srv,
  	       sizeof(struct sockaddr_in));
--- 529,537 ----
  	 */
  	if (xstat_cm_debug) {
  	    printf("[%s] Copying in the following socket info:\n", rn);
! 	    printf("[%s] IP addr 0s, port %d\n", rn,
! 		   afs_inet_ntoa_r((a_socketArray + curr_srv)->sin_addr.s_addr,hoststr),
! 		   ntohs((a_socketArray + curr_srv)->sin_port));
  	}
  	memcpy(&(curr_conn->skt), a_socketArray + curr_srv,
  	       sizeof(struct sockaddr_in));
***************
*** 539,546 ****
  	    hostutil_GetNameByINet(curr_conn->skt.sin_addr.s_addr);
  	if (hostNameFound == NULL) {
  	    fprintf(stderr,
! 		    "[%s] Can't map Internet address %lu to a string name\n",
! 		    rn, curr_conn->skt.sin_addr.s_addr);
  	    curr_conn->hostName[0] = '\0';
  	} else {
  	    strcpy(curr_conn->hostName, hostNameFound);
--- 540,547 ----
  	    hostutil_GetNameByINet(curr_conn->skt.sin_addr.s_addr);
  	if (hostNameFound == NULL) {
  	    fprintf(stderr,
! 		    "[%s] Can't map Internet address %s to a string name\n",
! 		    rn, afs_inet_ntoa_r(curr_conn->skt.sin_addr.s_addr,hoststr));
  	    curr_conn->hostName[0] = '\0';
  	} else {
  	    strcpy(curr_conn->hostName, hostNameFound);
***************
*** 554,562 ****
  	 */
  	if (xstat_cm_debug)
  	    printf
! 		("[%s] Connecting to srv idx %d, IP addr 0x%lx, port %d, service 1\n",
! 		 rn, curr_srv, curr_conn->skt.sin_addr.s_addr,
! 		 curr_conn->skt.sin_port);
  	curr_conn->rxconn = rx_NewConnection(curr_conn->skt.sin_addr.s_addr,	/*Server addr */
  					     curr_conn->skt.sin_port,	/*Server port */
  					     1,	/*AFS service # */
--- 555,563 ----
  	 */
  	if (xstat_cm_debug)
  	    printf
! 		("[%s] Connecting to srv idx %d, IP addr %s, port %d, service 1\n",
! 		 rn, curr_srv, afs_inet_ntoa_r(curr_conn->skt.sin_addr.s_addr,hoststr),
! 		 ntohs(curr_conn->skt.sin_port));
  	curr_conn->rxconn = rx_NewConnection(curr_conn->skt.sin_addr.s_addr,	/*Server addr */
  					     curr_conn->skt.sin_port,	/*Server port */
  					     1,	/*AFS service # */
***************
*** 564,571 ****
  					     0);	/*# of above */
  	if (curr_conn->rxconn == (struct rx_connection *)0) {
  	    fprintf(stderr,
! 		    "[%s] Can't create Rx connection to server '%s' (%lu)\n",
! 		    rn, curr_conn->hostName, curr_conn->skt.sin_addr.s_addr);
  	    conn_err = 1;
  	}
  	if (xstat_cm_debug)
--- 565,572 ----
  					     0);	/*# of above */
  	if (curr_conn->rxconn == (struct rx_connection *)0) {
  	    fprintf(stderr,
! 		    "[%s] Can't create Rx connection to server '%s' (%s)\n",
! 		    rn, curr_conn->hostName, afs_inet_ntoa_r(curr_conn->skt.sin_addr.s_addr,hoststr));
  	    conn_err = 1;
  	}
  	if (xstat_cm_debug)
Index: openafs/src/xstat/xstat_cm.h
diff -c openafs/src/xstat/xstat_cm.h:1.3 openafs/src/xstat/xstat_cm.h:1.3.2.1
*** openafs/src/xstat/xstat_cm.h:1.3	Tue Jul 15 19:17:52 2003
--- openafs/src/xstat/xstat_cm.h	Sun Mar  5 22:16:41 2006
***************
*** 21,26 ****
--- 21,27 ----
   *------------------------------------------------------------------------*/
  
  #include <sys/types.h>		/*Basic system types */
+ #ifndef AFS_NT40_ENV
  #ifndef	IPPROTO_IP
  #include <netinet/in.h>		/*Internet definitions */
  #endif
***************
*** 34,39 ****
--- 35,41 ----
  #define _socket_h_
  #include <sys/socket.h>		/*Socket definitions */
  #endif
+ #endif /* AFS_NT40_ENV */
  
  #include <rx/rx.h>		/*Rx definitions */
  #include <afs/afscbint.h>	/*AFS CM callback interface */
Index: openafs/src/xstat/xstat_cm_test.c
diff -c openafs/src/xstat/xstat_cm_test.c:1.8.2.2 openafs/src/xstat/xstat_cm_test.c:1.8.2.3
*** openafs/src/xstat/xstat_cm_test.c:1.8.2.2	Tue Jun 21 16:13:55 2005
--- openafs/src/xstat/xstat_cm_test.c	Thu Mar  9 01:42:30 2006
***************
*** 17,23 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_cm_test.c,v 1.8.2.2 2005/06/21 20:13:55 shadow Exp $");
  
  #include "xstat_cm.h"		/*Interface for xstat_cm module */
  #include <cmd.h>		/*Command line interpreter */
--- 17,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_cm_test.c,v 1.8.2.3 2006/03/09 06:42:30 shadow Exp $");
  
  #include "xstat_cm.h"		/*Interface for xstat_cm module */
  #include <cmd.h>		/*Command line interpreter */
***************
*** 1304,1310 ****
--- 1304,1314 ----
       */
      curr_item = a_s->parms[P_CM_NAMES].items;
      for (currCM = 0; currCM < numCMs; currCM++) {
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ 	CMSktArray[currCM].sin_family = AF_INET;	/*Internet family */
+ #else
  	CMSktArray[currCM].sin_family = htons(AF_INET);	/*Internet family */
+ #endif
  	CMSktArray[currCM].sin_port = htons(7001);	/*Cache Manager port */
  	he = hostutil_GetHostByName(curr_item->data);
  	if (he == NULL) {
Index: openafs/src/xstat/xstat_fs.c
diff -c openafs/src/xstat/xstat_fs.c:1.9 openafs/src/xstat/xstat_fs.c:1.9.2.1
*** openafs/src/xstat/xstat_fs.c:1.9	Tue Jul 15 19:17:52 2003
--- openafs/src/xstat/xstat_fs.c	Sun Mar  5 22:16:41 2006
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs.c,v 1.9 2003/07/15 23:17:52 shadow Exp $");
  
  #include "xstat_fs.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs.c,v 1.9.2.1 2006/03/06 03:16:41 jaltman Exp $");
  
  #include "xstat_fs.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
***************
*** 46,51 ****
--- 46,52 ----
  extern afs_int32 SRXAFSCB_CallBack();
  extern afs_int32 SRXAFSCB_InitCallBackState3();
  extern afs_int32 SRXAFSCB_Probe();
+ extern afs_int32 SRXAFSCB_ProbeUUID();
  extern afs_int32 SRXAFSCB_GetCE();
  extern afs_int32 SRXAFSCB_GetLock();
  
***************
*** 444,449 ****
--- 445,451 ----
      int conn_err;		/*Connection error? */
      int PortToUse;		/*Callback port to use */
      int collIDBytes;		/*Num bytes in coll ID array */
+     char hoststr[16];
  
      /*
       * If we've already been called, snicker at the bozo, gently
***************
*** 594,603 ****
  	 * printable name if possible.
  	 */
  	if (xstat_fs_debug) {
  	    printf("[%s] Copying in the following socket info:\n", rn);
! 	    printf("[%s] IP addr 0x%lx, port %d\n", rn,
! 		   (a_socketArray + curr_srv)->sin_addr.s_addr,
! 		   (a_socketArray + curr_srv)->sin_port);
  	}
  	memcpy(&(curr_conn->skt), a_socketArray + curr_srv,
  	       sizeof(struct sockaddr_in));
--- 596,606 ----
  	 * printable name if possible.
  	 */
  	if (xstat_fs_debug) {
+ 	    char hoststr[16];
  	    printf("[%s] Copying in the following socket info:\n", rn);
! 	    printf("[%s] IP addr %s, port %d\n", rn,
! 		   afs_inet_ntoa_r((a_socketArray + curr_srv)->sin_addr.s_addr,hoststr),
! 		   ntohs((a_socketArray + curr_srv)->sin_port));
  	}
  	memcpy(&(curr_conn->skt), a_socketArray + curr_srv,
  	       sizeof(struct sockaddr_in));
***************
*** 606,613 ****
  	    hostutil_GetNameByINet(curr_conn->skt.sin_addr.s_addr);
  	if (hostNameFound == NULL) {
  	    fprintf(stderr,
! 		    "[%s] Can't map Internet address %lu to a string name\n",
! 		    rn, curr_conn->skt.sin_addr.s_addr);
  	    curr_conn->hostName[0] = '\0';
  	} else {
  	    strcpy(curr_conn->hostName, hostNameFound);
--- 609,616 ----
  	    hostutil_GetNameByINet(curr_conn->skt.sin_addr.s_addr);
  	if (hostNameFound == NULL) {
  	    fprintf(stderr,
! 		    "[%s] Can't map Internet address %s to a string name\n",
! 		    rn, afs_inet_ntoa_r(curr_conn->skt.sin_addr.s_addr,hoststr));
  	    curr_conn->hostName[0] = '\0';
  	} else {
  	    strcpy(curr_conn->hostName, hostNameFound);
***************
*** 621,629 ****
  	 */
  	if (xstat_fs_debug)
  	    printf
! 		("[%s] Connecting to srv idx %d, IP addr 0x%lx, port %d, service 1\n",
! 		 rn, curr_srv, curr_conn->skt.sin_addr.s_addr,
! 		 curr_conn->skt.sin_port);
  
  	curr_conn->rxconn = rx_NewConnection(curr_conn->skt.sin_addr.s_addr,	/*Server addr */
  					     curr_conn->skt.sin_port,	/*Server port */
--- 624,632 ----
  	 */
  	if (xstat_fs_debug)
  	    printf
! 		("[%s] Connecting to srv idx %d, IP addr %s, port %d, service 1\n",
! 		 rn, curr_srv, afs_inet_ntoa_r(curr_conn->skt.sin_addr.s_addr,hoststr),
! 		 ntohs(curr_conn->skt.sin_port));
  
  	curr_conn->rxconn = rx_NewConnection(curr_conn->skt.sin_addr.s_addr,	/*Server addr */
  					     curr_conn->skt.sin_port,	/*Server port */
***************
*** 632,639 ****
  					     0);	/*# of above */
  	if (curr_conn->rxconn == (struct rx_connection *)0) {
  	    fprintf(stderr,
! 		    "[%s] Can't create Rx connection to server '%s' (%lu)\n",
! 		    rn, curr_conn->hostName, curr_conn->skt.sin_addr.s_addr);
  	    conn_err = 1;
  	}
  	if (xstat_fs_debug)
--- 635,642 ----
  					     0);	/*# of above */
  	if (curr_conn->rxconn == (struct rx_connection *)0) {
  	    fprintf(stderr,
! 		    "[%s] Can't create Rx connection to server '%s' (%s)\n",
! 		    rn, curr_conn->hostName, afs_inet_ntoa_r(curr_conn->skt.sin_addr.s_addr,hoststr));
  	    conn_err = 1;
  	}
  	if (xstat_fs_debug)
Index: openafs/src/xstat/xstat_fs.h
diff -c openafs/src/xstat/xstat_fs.h:1.3 openafs/src/xstat/xstat_fs.h:1.3.2.1
*** openafs/src/xstat/xstat_fs.h:1.3	Tue Jul 15 19:17:52 2003
--- openafs/src/xstat/xstat_fs.h	Sun Mar  5 22:16:41 2006
***************
*** 21,26 ****
--- 21,27 ----
   *------------------------------------------------------------------------*/
  
  #include <sys/types.h>		/*Basic system types */
+ #ifndef AFS_NT40_ENV
  #ifndef	IPPROTO_IP
  #include <netinet/in.h>		/*Internet definitions */
  #endif
***************
*** 34,39 ****
--- 35,41 ----
  #define _socket_h_
  #include <sys/socket.h>		/*Socket definitions */
  #endif
+ #endif /* AFS_NT40_ENV */
  
  #include <rx/rx.h>		/*Rx definitions */
  #include <afs/afsint.h>		/*AFS FileServer interface */
Index: openafs/src/xstat/xstat_fs_callback.c
diff -c openafs/src/xstat/xstat_fs_callback.c:1.13 openafs/src/xstat/xstat_fs_callback.c:1.13.2.1
*** openafs/src/xstat/xstat_fs_callback.c:1.13	Tue Jul 15 19:17:52 2003
--- openafs/src/xstat/xstat_fs_callback.c	Sun Mar  5 22:16:41 2006
***************
*** 24,32 ****
  
  #include <afsconfig.h>
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs_callback.c,v 1.13 2003/07/15 23:17:52 shadow Exp $");
  
  #include <errno.h>
  #include <stdio.h>		/*Standard I/O stuff */
--- 24,36 ----
  
  #include <afsconfig.h>
  #include <afs/param.h>
+ #ifdef AFS_NT40_ENV
+ #include <windows.h>
+ #include <rpc.h>
+ #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs_callback.c,v 1.13.2.1 2006/03/06 03:16:41 jaltman Exp $");
  
  #include <errno.h>
  #include <stdio.h>		/*Standard I/O stuff */
***************
*** 54,60 ****
--- 58,68 ----
  {
      int count;
  
+ #ifdef AFS_NT40_ENV
+     UuidCreate((UUID *)&afs_cb_interface.uuid);
+ #else
      afs_uuid_create(&afs_cb_interface.uuid);
+ #endif
      count = rx_getAllAddr(&afs_cb_interface.addr_in, AFS_MAX_INTERFACE_ADDR);
      if (count <= 0)
  	afs_cb_interface.numberOfInterfaces = 0;
Index: openafs/src/xstat/xstat_fs_test.c
diff -c openafs/src/xstat/xstat_fs_test.c:1.8.2.1 openafs/src/xstat/xstat_fs_test.c:1.8.2.4
*** openafs/src/xstat/xstat_fs_test.c:1.8.2.1	Sun Jan 30 23:14:51 2005
--- openafs/src/xstat/xstat_fs_test.c	Thu Mar  9 11:29:02 2006
***************
*** 17,23 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs_test.c,v 1.8.2.1 2005/01/31 04:14:51 shadow Exp $");
  
  #include "xstat_fs.h"		/*Interface for xstat_fs module */
  #include <cmd.h>		/*Command line interpreter */
--- 17,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs_test.c,v 1.8.2.4 2006/03/09 16:29:02 shadow Exp $");
  
  #include "xstat_fs.h"		/*Interface for xstat_fs module */
  #include <cmd.h>		/*Command line interpreter */
***************
*** 83,89 ****
      "NGetVolumeInfo",
      "BulkStatus",
      "XStatsVersion",
!     "GetXStats"
  };
  
  static char *xferOpNames[] = {
--- 83,90 ----
      "NGetVolumeInfo",
      "BulkStatus",
      "XStatsVersion",
!     "GetXStats",
!     "GetCapabilities"
  };
  
  static char *xferOpNames[] = {
***************
*** 493,498 ****
--- 494,527 ----
      PrintOverallPerfInfo(perfP);
  }
  
+ static char *CbCounterStrings[] = {
+     "DeleteFiles",
+     "DeleteCallBacks",
+     "BreakCallBacks",
+     "AddCallBack",
+     "GotSomeSpaces",
+     "DeleteAllCallBacks",
+     "nFEs", "nCBs", "nblks",
+     "CBsTimedOut",
+     "nbreakers",
+     "GSS1", "GSS2", "GSS3", "GSS4", "GSS5"
+ };
+ 
+ 
+ void
+ PrintCbCounters() {
+     int numInt32s = sizeof(CbCounterStrings)/sizeof(char *);
+     int i;
+     afs_uint32 *val=xstat_fs_Results.data.AFS_CollData_val;
+ 
+     if (numInt32s > xstat_fs_Results.data.AFS_CollData_len)
+ 	numInt32s = xstat_fs_Results.data.AFS_CollData_len;
+ 
+     for (i=0; i<numInt32s; i++) {
+ 	printf("\t%10u %s\n", val[i], CbCounterStrings[i]);
+     }
+ }
+ 
  
  /*------------------------------------------------------------------------
   * FS_Handler
***************
*** 549,554 ****
--- 578,587 ----
  	PrintFullPerfInfo();
  	break;
  
+     case AFS_XSTATSCOLL_CBSTATS:
+ 	PrintCbCounters();
+ 	break;
+ 
      default:
  	printf("** Unknown collection: %d\n",
  	       xstat_fs_Results.collectionNumber);
***************
*** 687,693 ****
--- 720,730 ----
       */
      curr_item = a_s->parms[P_FS_NAMES].items;
      for (currFS = 0; currFS < numFSs; currFS++) {
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ 	FSSktArray[currFS].sin_family = AF_INET;	/*Internet family */
+ #else
  	FSSktArray[currFS].sin_family = htons(AF_INET);	/*Internet family */
+ #endif
  	FSSktArray[currFS].sin_port = htons(7000);	/*FileServer port */
  	he = hostutil_GetHostByName(curr_item->data);
  	if (he == NULL) {
