From owner-p4-projects@FreeBSD.ORG Sat Sep 13 20:26:18 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 38FD81065675; Sat, 13 Sep 2008 20:26:18 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F08EE1065673 for ; Sat, 13 Sep 2008 20:26:17 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DC90E8FC0A for ; Sat, 13 Sep 2008 20:26:17 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m8DKQH1o024388 for ; Sat, 13 Sep 2008 20:26:17 GMT (envelope-from ed@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m8DKQG26024386 for perforce@freebsd.org; Sat, 13 Sep 2008 20:26:16 GMT (envelope-from ed@FreeBSD.org) Date: Sat, 13 Sep 2008 20:26:16 GMT Message-Id: <200809132026.m8DKQG26024386@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to ed@FreeBSD.org using -f From: Ed Schouten To: Perforce Change Reviews Cc: Subject: PERFORCE change 149724 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2008 20:26:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=149724 Change 149724 by ed@ed_dull on 2008/09/13 20:25:25 IFC. Affected files ... .. //depot/projects/mpsafetty/ObsoleteFiles.inc#10 integrate .. //depot/projects/mpsafetty/contrib/gcc/config/arm/arm.h#2 integrate .. //depot/projects/mpsafetty/contrib/telnet/arpa/telnet.h#2 integrate .. //depot/projects/mpsafetty/etc/rc.initdiskless#2 integrate .. //depot/projects/mpsafetty/include/arpa/telnet.h#2 integrate .. //depot/projects/mpsafetty/lib/libarchive/archive_platform.h#2 integrate .. //depot/projects/mpsafetty/lib/libarchive/archive_read_support_compression_program.c#2 integrate .. //depot/projects/mpsafetty/lib/libarchive/archive_write_disk.c#7 integrate .. //depot/projects/mpsafetty/lib/libarchive/config_freebsd.h#2 integrate .. //depot/projects/mpsafetty/lib/libarchive/filter_fork.c#2 integrate .. //depot/projects/mpsafetty/lib/libc/stdlib/malloc.c#7 integrate .. //depot/projects/mpsafetty/lib/libthr/thread/thr_exit.c#3 integrate .. //depot/projects/mpsafetty/share/man/man4/man4.i386/Makefile#6 integrate .. //depot/projects/mpsafetty/share/man/man4/man4.i386/sbni.4#1 branch .. //depot/projects/mpsafetty/share/man/man4/snd_hda.4#2 integrate .. //depot/projects/mpsafetty/share/man/man9/bus_dma.9#3 integrate .. //depot/projects/mpsafetty/share/man/man9/dev_clone.9#1 branch .. //depot/projects/mpsafetty/share/man/man9/devfs_set_cdevpriv.9#1 branch .. //depot/projects/mpsafetty/share/man/man9/insmntque.9#2 integrate .. //depot/projects/mpsafetty/share/man/man9/make_dev.9#2 integrate .. //depot/projects/mpsafetty/sys/amd64/amd64/vm_machdep.c#2 integrate .. //depot/projects/mpsafetty/sys/amd64/pci/pci_cfgreg.c#3 integrate .. //depot/projects/mpsafetty/sys/arm/arm/intr.c#3 integrate .. //depot/projects/mpsafetty/sys/arm/arm/nexus.c#2 integrate .. //depot/projects/mpsafetty/sys/arm/include/intr.h#2 integrate .. //depot/projects/mpsafetty/sys/arm/include/pcpu.h#3 integrate .. //depot/projects/mpsafetty/sys/arm/xscale/ixp425/ixp425.c#2 integrate .. //depot/projects/mpsafetty/sys/arm/xscale/ixp425/ixp425_qmgr.c#2 integrate .. //depot/projects/mpsafetty/sys/boot/common/dev_net.c#3 integrate .. //depot/projects/mpsafetty/sys/boot/forth/loader.conf#6 integrate .. //depot/projects/mpsafetty/sys/boot/sparc64/loader/main.c#7 integrate .. //depot/projects/mpsafetty/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#4 integrate .. //depot/projects/mpsafetty/sys/compat/linux/linux_misc.c#5 integrate .. //depot/projects/mpsafetty/sys/compat/ndis/ntoskrnl_var.h#2 integrate .. //depot/projects/mpsafetty/sys/conf/NOTES#10 integrate .. //depot/projects/mpsafetty/sys/conf/files.i386#7 integrate .. //depot/projects/mpsafetty/sys/conf/files.pc98#2 integrate .. //depot/projects/mpsafetty/sys/conf/files.sparc64#3 integrate .. //depot/projects/mpsafetty/sys/dev/aac/aac_pci.c#2 integrate .. //depot/projects/mpsafetty/sys/dev/mlx/mlx.c#2 integrate .. //depot/projects/mpsafetty/sys/dev/sbni/if_sbni.c#1 branch .. //depot/projects/mpsafetty/sys/dev/sbni/if_sbni_isa.c#1 branch .. //depot/projects/mpsafetty/sys/dev/sbni/if_sbni_pci.c#1 branch .. //depot/projects/mpsafetty/sys/dev/sbni/if_sbnireg.h#1 branch .. //depot/projects/mpsafetty/sys/dev/sbni/if_sbnivar.h#1 branch .. //depot/projects/mpsafetty/sys/dev/sound/pci/hda/hda_reg.h#2 integrate .. //depot/projects/mpsafetty/sys/dev/sound/pci/hda/hdac.c#4 integrate .. //depot/projects/mpsafetty/sys/dev/sound/pci/hda/hdac_private.h#2 integrate .. //depot/projects/mpsafetty/sys/dev/tx/if_tx.c#2 integrate .. //depot/projects/mpsafetty/sys/dev/usb/if_zyd.c#3 integrate .. //depot/projects/mpsafetty/sys/dev/usb/if_zydreg.h#2 integrate .. //depot/projects/mpsafetty/sys/dev/usb/ufoma.c#4 integrate .. //depot/projects/mpsafetty/sys/dev/usb/usb_quirks.c#3 integrate .. //depot/projects/mpsafetty/sys/dev/usb/usbdevs#9 integrate .. //depot/projects/mpsafetty/sys/fs/nullfs/null_vnops.c#2 integrate .. //depot/projects/mpsafetty/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.h#2 integrate .. //depot/projects/mpsafetty/sys/i386/conf/NOTES#6 integrate .. //depot/projects/mpsafetty/sys/i386/conf/XEN#3 integrate .. //depot/projects/mpsafetty/sys/i386/cpufreq/est.c#5 integrate .. //depot/projects/mpsafetty/sys/i386/i386/local_apic.c#4 integrate .. //depot/projects/mpsafetty/sys/i386/i386/machdep.c#6 integrate .. //depot/projects/mpsafetty/sys/i386/i386/sys_machdep.c#3 integrate .. //depot/projects/mpsafetty/sys/i386/i386/vm_machdep.c#5 integrate .. //depot/projects/mpsafetty/sys/i386/include/proc.h#2 integrate .. //depot/projects/mpsafetty/sys/i386/include/xen/xenpmap.h#4 integrate .. //depot/projects/mpsafetty/sys/i386/include/xen/xenvar.h#3 integrate .. //depot/projects/mpsafetty/sys/i386/pci/pci_cfgreg.c#5 integrate .. //depot/projects/mpsafetty/sys/i386/xen/mp_machdep.c#1 branch .. //depot/projects/mpsafetty/sys/i386/xen/mptable.c#1 branch .. //depot/projects/mpsafetty/sys/i386/xen/pmap.c#5 integrate .. //depot/projects/mpsafetty/sys/i386/xen/xen_machdep.c#7 integrate .. //depot/projects/mpsafetty/sys/kern/kern_exec.c#8 integrate .. //depot/projects/mpsafetty/sys/kern/kern_lock.c#5 integrate .. //depot/projects/mpsafetty/sys/kern/kern_mutex.c#2 integrate .. //depot/projects/mpsafetty/sys/kern/kern_rmlock.c#2 integrate .. //depot/projects/mpsafetty/sys/kern/kern_rwlock.c#2 integrate .. //depot/projects/mpsafetty/sys/kern/kern_sx.c#3 integrate .. //depot/projects/mpsafetty/sys/kern/subr_witness.c#6 integrate .. //depot/projects/mpsafetty/sys/kern/tty_ttydisc.c#21 integrate .. //depot/projects/mpsafetty/sys/mips/adm5120/admpci.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/adm5120/if_admsw.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/adm5120/if_admswvar.h#2 integrate .. //depot/projects/mpsafetty/sys/mips/adm5120/obio.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/adm5120/uart_bus_adm5120.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/adm5120/uart_cpu_adm5120.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/adm5120/uart_dev_adm5120.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/idt/idtpci.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/idt/if_kr.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/idt/obio.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/idt/uart_bus_rc32434.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/malta/gt.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/malta/gt_pci.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/malta/malta_machdep.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/malta/obio.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/malta/uart_bus_maltausart.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/malta/uart_cpu_maltausart.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/malta/yamon.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/sentry5/obio.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/sentry5/s5_machdep.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/sentry5/uart_bus_sbusart.c#2 integrate .. //depot/projects/mpsafetty/sys/mips/sentry5/uart_cpu_sbusart.c#2 integrate .. //depot/projects/mpsafetty/sys/modules/Makefile#12 integrate .. //depot/projects/mpsafetty/sys/modules/sbni/Makefile#1 branch .. //depot/projects/mpsafetty/sys/net/if_mib.c#3 integrate .. //depot/projects/mpsafetty/sys/netgraph/ng_base.c#4 integrate .. //depot/projects/mpsafetty/sys/netinet/tcp_output.c#6 integrate .. //depot/projects/mpsafetty/sys/netinet/tcp_subr.c#5 integrate .. //depot/projects/mpsafetty/sys/netinet/tcp_syncache.c#9 integrate .. //depot/projects/mpsafetty/sys/netinet6/mld6.c#4 integrate .. //depot/projects/mpsafetty/sys/nfsclient/nfs_vfsops.c#7 integrate .. //depot/projects/mpsafetty/sys/pc98/conf/NOTES#4 integrate .. //depot/projects/mpsafetty/sys/security/mac_bsdextended/mac_bsdextended.c#5 integrate .. //depot/projects/mpsafetty/sys/sparc64/sparc64/genassym.c#5 integrate .. //depot/projects/mpsafetty/sys/sparc64/sparc64/jbusppm.c#1 branch .. //depot/projects/mpsafetty/sys/sparc64/sparc64/mp_locore.S#4 integrate .. //depot/projects/mpsafetty/sys/sparc64/sparc64/schppm.c#1 branch .. //depot/projects/mpsafetty/sys/sun4v/include/asi.h#2 integrate .. //depot/projects/mpsafetty/sys/sys/lock.h#3 integrate .. //depot/projects/mpsafetty/sys/sys/param.h#9 integrate .. //depot/projects/mpsafetty/sys/sys/systm.h#2 integrate .. //depot/projects/mpsafetty/sys/sys/vnode.h#4 integrate .. //depot/projects/mpsafetty/tools/build/mk/OptionalObsoleteFiles.inc#3 integrate .. //depot/projects/mpsafetty/tools/regression/sockets/sendfile/sendfile.c#2 integrate .. //depot/projects/mpsafetty/usr.bin/top/machine.c#2 integrate .. //depot/projects/mpsafetty/usr.sbin/cxgbtool/cxgbtool.c#3 integrate .. //depot/projects/mpsafetty/usr.sbin/fwcontrol/fwcontrol.8#2 integrate .. //depot/projects/mpsafetty/usr.sbin/fwcontrol/fwcontrol.c#2 integrate .. //depot/projects/mpsafetty/usr.sbin/iostat/iostat.c#3 integrate .. //depot/projects/mpsafetty/usr.sbin/mlxcontrol/command.c#2 integrate .. //depot/projects/mpsafetty/usr.sbin/mlxcontrol/interface.c#2 integrate .. //depot/projects/mpsafetty/usr.sbin/ntp/config.h#4 integrate Differences ... ==== //depot/projects/mpsafetty/ObsoleteFiles.inc#10 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.157 2008/08/31 08:33:41 antoine Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.159 2008/09/13 17:29:49 antoine Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -53,11 +53,6 @@ # 20080704: sbsh(4) removed OLD_FILES+=usr/share/man/man4/if_sbsh.4.gz OLD_FILES+=usr/share/man/man4/sbsh.4.gz -# 20080704: sbni(4) removed -.if ${TARGET_ARCH} == "i386" -OLD_FILES+=usr/share/man/man4/i386/if_sbni.4.gz -OLD_FILES+=usr/share/man/man4/i386/sbni.4.gz -.endif # 20080704: cnw(4) removed OLD_FILES+=usr/share/man/man4/if_cnw.4.gz OLD_FILES+=usr/share/man/man4/cnw.4.gz @@ -3799,7 +3794,6 @@ OLD_FILES+=usr/games/worms OLD_FILES+=usr/games/wump OLD_FILES+=sbin/mount_reiserfs -OLD_FILES+=usr/bin/hesinfo OLD_FILES+=usr/include/c++/3.4/ext/demangle.h OLD_FILES+=usr/include/cam/cam_extend.h OLD_FILES+=usr/include/dev/wi/wi_hostap.h @@ -4209,10 +4203,8 @@ OLD_FILES+=usr/share/doc/ntp/tickadj.htm OLD_FILES+=usr/share/doc/papers/nqnfs.ascii.gz OLD_FILES+=usr/share/doc/papers/px.ascii.gz -OLD_FILES+=usr/share/man/man1/hesinfo.1.gz OLD_FILES+=usr/share/man/man3/mbrune.3.gz OLD_FILES+=usr/share/man/man3/rune.3.gz -OLD_FILES+=usr/share/man/man3/hesiod.3.gz OLD_FILES+=usr/share/man/man3/mac_is_present_np.3.gz OLD_FILES+=usr/share/man/man3/fpsetsticky.3.gz OLD_FILES+=usr/share/man/man3/gss_krb5_copy_ccache.3.gz @@ -4227,7 +4219,6 @@ OLD_FILES+=usr/share/man/man3/setinvalidrune.3.gz OLD_FILES+=usr/share/man/man3/mbrune.3.gz OLD_FILES+=usr/share/man/man3/rune.3.gz -OLD_FILES+=usr/share/man/man3/hesiod.3.gz OLD_FILES+=usr/share/man/man3/mac_is_present_np.3.gz OLD_FILES+=usr/share/man/man3/fpsetsticky.3.gz OLD_FILES+=usr/share/man/man3/gss_krb5_copy_ccache.3.gz @@ -4243,7 +4234,6 @@ OLD_FILES+=usr/share/man/man3/fungetrune.3.gz OLD_FILES+=usr/share/man/man3/fputrune.3.gz OLD_FILES+=usr/share/man/man3/fgetrune.3.gz -OLD_FILES+=usr/share/man/man5/hesiod.conf.5.gz OLD_FILES+=usr/share/man/man5/usbd.conf.5.gz .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" OLD_FILES+=usr/share/man/man8/boot_i386.8.gz ==== //depot/projects/mpsafetty/contrib/gcc/config/arm/arm.h#2 (text+ko) ==== @@ -507,7 +507,7 @@ /* wchar_t is unsigned under the AAPCS. */ #ifndef WCHAR_TYPE #define WCHAR_TYPE (TARGET_AAPCS_BASED ? "unsigned int" : "int") - +#undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD #endif ==== //depot/projects/mpsafetty/contrib/telnet/arpa/telnet.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)telnet.h 8.2 (Berkeley) 12/15/93 - * $FreeBSD: src/contrib/telnet/arpa/telnet.h,v 1.9 2003/01/18 06:10:21 billf Exp $ + * $FreeBSD: src/contrib/telnet/arpa/telnet.h,v 1.10 2008/09/13 17:46:50 antoine Exp $ */ #ifndef _ARPA_TELNET_H_ @@ -140,8 +140,8 @@ "TACACS UID", "OUTPUT MARKING", "TTYLOC", "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", - "ENCRYPT", "NEW-ENVIRON", "TN3270E", "CHARSET", "COM-PORT", - "KERMIT", + "ENCRYPT", "NEW-ENVIRON", "TN3270E", "XAUTH", "CHARSET", + "RSP", "COM-PORT", "SLE", "STARTTLS", "KERMIT", 0 }; #define TELOPT_FIRST TELOPT_BINARY ==== //depot/projects/mpsafetty/etc/rc.initdiskless#2 (text+ko) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.initdiskless,v 1.53 2008/05/15 11:00:23 bms Exp $ +# $FreeBSD: src/etc/rc.initdiskless,v 1.54 2008/09/09 18:40:50 bms Exp $ # On entry to this script the entire system consists of a read-only root # mounted via NFS. The kernel has run BOOTP and configured an interface @@ -73,6 +73,16 @@ # If this file exists, then failure to execute the mount # command contained in /conf/T/M/remount is non-fatal. # +# /conf/T/M/remount_subdir +# If this file exists, then the behaviour of /conf/T/M/remount +# changes as follows: +# 1. /conf/T/M/remount is invoked to mount the root of the +# filesystem where the configuration data exists on a +# temporary mountpoint. +# 2. /conf/T/M/remount_subdir is then invoked to mount a +# *subdirectory* of the filesystem mounted by +# /conf/T/M/remount on /conf/T/M/. +# # /conf/T/M/diskless_remount # The contents of the file points to an NFS filesystem, # possibly followed by mount_nfs options. If the server name @@ -296,10 +306,33 @@ # remount. Beware, the command is in the file itself! if [ -f $j/remount ]; then - nfspt=`/bin/cat $j/remount` - $nfspt $j - chkerr $? "$nfspt $j" - to_umount="$j ${to_umount}" # XXX hope it is really a mount! + if [ -f $j/remount_subdir ]; then + k="/conf.tmp/$i/$subdir" + [ -d $k ] || continue + + # Mount the filesystem root where the config data is + # on the temporary mount point. + nfspt=`/bin/cat $j/remount` + $nfspt $k + chkerr $? "$nfspt $k" + + # Now use a nullfs mount to get the data where we + # really want to see it. + remount_subdir=`/bin/cat $j/remount_subdir` + remount_subdir_cmd="mount -t nullfs $k/$remount_subdir" + + $remount_subdir_cmd $j + chkerr $? "$remount_subdir_cmd $j" + + # XXX check order -- we must force $k to be unmounted + # after j, as j depends on k. + to_umount="$j $k ${to_umount}" + else + nfspt=`/bin/cat $j/remount` + $nfspt $j + chkerr $? "$nfspt $j" + to_umount="$j ${to_umount}" # XXX hope it is really a mount! + fi fi # NFS remount ==== //depot/projects/mpsafetty/include/arpa/telnet.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)telnet.h 8.2 (Berkeley) 12/15/93 - * $FreeBSD: src/include/arpa/telnet.h,v 1.9 2003/01/18 06:13:57 billf Exp $ + * $FreeBSD: src/include/arpa/telnet.h,v 1.10 2008/09/13 17:46:50 antoine Exp $ */ #ifndef _ARPA_TELNET_H_ @@ -140,8 +140,8 @@ "TACACS UID", "OUTPUT MARKING", "TTYLOC", "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", - "ENCRYPT", "NEW-ENVIRON", "TN3270E", "CHARSET", "COM-PORT", - "KERMIT", + "ENCRYPT", "NEW-ENVIRON", "TN3270E", "XAUTH", "CHARSET", + "RSP", "COM-PORT", "SLE", "STARTTLS", "KERMIT", 0 }; #define TELOPT_FIRST TELOPT_BINARY ==== //depot/projects/mpsafetty/lib/libarchive/archive_platform.h#2 (text+ko) ==== @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libarchive/archive_platform.h,v 1.30 2008/05/26 17:00:22 kientzle Exp $ + * $FreeBSD: src/lib/libarchive/archive_platform.h,v 1.31 2008/09/12 04:03:34 kientzle Exp $ */ /* @@ -78,6 +78,9 @@ #if !HAVE_DECL_SIZE_MAX #define SIZE_MAX (~(size_t)0) #endif +#if !HAVE_DECL_SSIZE_MAX +#define SSIZE_MAX ((ssize_t)(SIZE_MAX >> 1)) +#endif #if !HAVE_DECL_UINT32_MAX #define UINT32_MAX (~(uint32_t)0) #endif ==== //depot/projects/mpsafetty/lib/libarchive/archive_read_support_compression_program.c#2 (text+ko) ==== @@ -24,13 +24,15 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_compression_program.c,v 1.4 2008/06/15 10:45:57 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_compression_program.c,v 1.5 2008/09/12 03:53:54 kientzle Exp $"); /* This capability is only available on POSIX systems. */ #if !defined(HAVE_PIPE) || !defined(HAVE_FCNTL) || \ !(defined(HAVE_FORK) || defined(HAVE_VFORK)) +#include "archive.h" + /* * On non-Posix systems, allow the program to build, but choke if * this function is actually invoked. ==== //depot/projects/mpsafetty/lib/libarchive/archive_write_disk.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_disk.c,v 1.36 2008/09/07 05:22:33 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_disk.c,v 1.38 2008/09/12 04:08:11 kientzle Exp $"); #ifdef HAVE_SYS_TYPES_H #include @@ -514,9 +514,15 @@ } if (a->flags & ARCHIVE_EXTRACT_SPARSE) { +#if HAVE_STRUCT_STAT_ST_BLKSIZE if ((r = _archive_write_disk_lazy_stat(a)) != ARCHIVE_OK) return (r); block_size = a->pst->st_blksize; +#else + /* XXX TODO XXX Is there a more appropriate choice here ? */ + /* This needn't match the filesystem allocation size. */ + block_size = 16*1024; +#endif } if (a->filesize >= 0 && (off_t)(offset + size) > a->filesize) @@ -631,12 +637,14 @@ /* Last write ended at exactly the filesize; we're done. */ /* Hopefully, this is the common case. */ } else { +#if HAVE_FTRUNCATE if (ftruncate(a->fd, a->filesize) == -1 && a->filesize == 0) { archive_set_error(&a->archive, errno, "File size could not be restored"); return (ARCHIVE_FAILED); } +#endif /* * Explicitly stat the file as some platforms might not * implement the XSI option to extend files via ftruncate. ==== //depot/projects/mpsafetty/lib/libarchive/config_freebsd.h#2 (text+ko) ==== @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libarchive/config_freebsd.h,v 1.11 2008/07/05 01:50:07 kientzle Exp $ + * $FreeBSD: src/lib/libarchive/config_freebsd.h,v 1.13 2008/09/12 04:08:11 kientzle Exp $ */ /* FreeBSD 5.0 and later have ACL support. */ @@ -41,6 +41,7 @@ #define HAVE_DECL_INT64_MAX 1 #define HAVE_DECL_INT64_MIN 1 #define HAVE_DECL_SIZE_MAX 1 +#define HAVE_DECL_SSIZE_MAX 1 #define HAVE_DECL_STRERROR_R 1 #define HAVE_DECL_UINT32_MAX 1 #define HAVE_DECL_UINT64_MAX 1 @@ -55,6 +56,7 @@ #define HAVE_FCNTL_H 1 #define HAVE_FSEEKO 1 #define HAVE_FSTAT 1 +#define HAVE_FTRUNCATE 1 #define HAVE_FUTIMES 1 #define HAVE_GETEUID 1 #define HAVE_GETPID 1 @@ -86,6 +88,7 @@ #define HAVE_STRINGS_H 1 #define HAVE_STRING_H 1 #define HAVE_STRRCHR 1 +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 #define HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC 1 #define HAVE_SYS_ACL_H 1 #define HAVE_SYS_IOCTL_H 1 ==== //depot/projects/mpsafetty/lib/libarchive/filter_fork.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ #if defined(HAVE_PIPE) && defined(HAVE_FCNTL) && \ (defined(HAVE_FORK) || defined(HAVE_VFORK)) -__FBSDID("$FreeBSD: src/lib/libarchive/filter_fork.c,v 1.4 2008/06/15 10:45:57 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/filter_fork.c,v 1.5 2008/09/12 05:33:00 kientzle Exp $"); #if defined(HAVE_POLL) # if defined(HAVE_POLL_H) @@ -61,7 +61,7 @@ if (pipe(stdin_pipe) == -1) goto state_allocated; - if (stdin_pipe[0] == STDOUT_FILENO) { + if (stdin_pipe[0] == 1 /* stdout */) { if ((tmp = dup(stdin_pipe[0])) == -1) goto stdin_opened; close(stdin_pipe[0]); @@ -69,7 +69,7 @@ } if (pipe(stdout_pipe) == -1) goto stdin_opened; - if (stdout_pipe[1] == STDIN_FILENO) { + if (stdout_pipe[1] == 0 /* stdin */) { if ((tmp = dup(stdout_pipe[1])) == -1) goto stdout_opened; close(stdout_pipe[1]); @@ -86,16 +86,16 @@ case 0: close(stdin_pipe[1]); close(stdout_pipe[0]); - if (dup2(stdin_pipe[0], STDIN_FILENO) == -1) + if (dup2(stdin_pipe[0], 0 /* stdin */) == -1) _exit(254); - if (stdin_pipe[0] != STDIN_FILENO) + if (stdin_pipe[0] != 0 /* stdin */) close(stdin_pipe[0]); - if (dup2(stdout_pipe[1], STDOUT_FILENO) == -1) + if (dup2(stdout_pipe[1], 1 /* stdout */) == -1) _exit(254); - if (stdout_pipe[1] != STDOUT_FILENO) + if (stdout_pipe[1] != 1 /* stdout */) close(stdout_pipe[1]); execlp(path, path, (char *)NULL); - _exit(254); + _exit(254); default: close(stdin_pipe[0]); close(stdout_pipe[1]); ==== //depot/projects/mpsafetty/lib/libc/stdlib/malloc.c#7 (text+ko) ==== @@ -156,7 +156,7 @@ #define MALLOC_DSS #include -__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.178 2008/09/06 05:26:31 marcel Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.179 2008/09/10 14:27:34 jasone Exp $"); #include "libc_private.h" #ifdef MALLOC_DEBUG @@ -174,6 +174,7 @@ #include /* Must come after several other sys/ includes. */ #include +#include #include #include @@ -213,55 +214,43 @@ #define STRERROR_BUF 64 /* - * The const_size2bin table is sized according to PAGESIZE_2POW, but for - * correctness reasons, we never assume that - * (pagesize == (1U << * PAGESIZE_2POW)). - * * Minimum alignment of allocations is 2^QUANTUM_2POW bytes. */ #ifdef __i386__ -# define PAGESIZE_2POW 12 # define QUANTUM_2POW 4 # define SIZEOF_PTR_2POW 2 # define CPU_SPINWAIT __asm__ volatile("pause") #endif #ifdef __ia64__ -# define PAGESIZE_2POW 13 # define QUANTUM_2POW 4 # define SIZEOF_PTR_2POW 3 #endif #ifdef __alpha__ -# define PAGESIZE_2POW 13 # define QUANTUM_2POW 4 # define SIZEOF_PTR_2POW 3 # define NO_TLS #endif #ifdef __sparc64__ -# define PAGESIZE_2POW 13 # define QUANTUM_2POW 4 # define SIZEOF_PTR_2POW 3 # define NO_TLS #endif #ifdef __amd64__ -# define PAGESIZE_2POW 12 # define QUANTUM_2POW 4 # define SIZEOF_PTR_2POW 3 # define CPU_SPINWAIT __asm__ volatile("pause") #endif #ifdef __arm__ -# define PAGESIZE_2POW 12 # define QUANTUM_2POW 3 # define SIZEOF_PTR_2POW 2 # define NO_TLS #endif #ifdef __mips__ -# define PAGESIZE_2POW 12 # define QUANTUM_2POW 3 # define SIZEOF_PTR_2POW 2 # define NO_TLS #endif #ifdef __powerpc__ -# define PAGESIZE_2POW 12 # define QUANTUM_2POW 4 # define SIZEOF_PTR_2POW 2 #endif @@ -361,7 +350,7 @@ #define RUN_MAX_OVRHD_RELAX 0x00001800U /* Put a cap on small object run size. This overrides RUN_MAX_OVRHD. */ -#define RUN_MAX_SMALL (12 * pagesize) +#define RUN_MAX_SMALL (12 * PAGE_SIZE) /* * Hyper-threaded CPUs may need a special instruction inside spin loops in @@ -733,7 +722,8 @@ /* * bins is used to store rings of free regions of the following sizes, - * assuming a 16-byte quantum, 4kB pagesize, and default MALLOC_OPTIONS. + * assuming a 16-byte quantum, 4kB page size, and default + * MALLOC_OPTIONS. * * bins[i] | size | * --------+------+ @@ -794,11 +784,6 @@ /* Number of CPUs. */ static unsigned ncpus; -/* VM page size. */ -static size_t pagesize; -static size_t pagesize_mask; -static size_t pagesize_2pow; - /* Various bin-related settings. */ #ifdef MALLOC_TINY /* Number of (2^n)-spaced tiny bins. */ # define ntbins ((unsigned)(QUANTUM_2POW - TINY_MIN_2POW)) @@ -835,7 +820,7 @@ #define S2B_64(i) S2B_32(i) S2B_32(i) #define S2B_128(i) S2B_64(i) S2B_64(i) #define S2B_256(i) S2B_128(i) S2B_128(i) -static const uint8_t const_size2bin[(1U << PAGESIZE_2POW) - 255] = { +static const uint8_t const_size2bin[PAGE_SIZE - 255] = { S2B_1(0xffU) /* 0 */ #if (QUANTUM_2POW == 4) /* 64-bit system ************************/ @@ -906,7 +891,7 @@ S2B_256(S2B_SMIN + 10) /* 3328 */ S2B_256(S2B_SMIN + 11) /* 3584 */ S2B_256(S2B_SMIN + 12) /* 3840 */ -#if (PAGESIZE_2POW == 13) +#if (PAGE_SHIFT == 13) S2B_256(S2B_SMIN + 13) /* 4096 */ S2B_256(S2B_SMIN + 14) /* 4352 */ S2B_256(S2B_SMIN + 15) /* 4608 */ @@ -1345,9 +1330,9 @@ #define SUBPAGE_CEILING(s) \ (((s) + SUBPAGE_MASK) & ~SUBPAGE_MASK) -/* Return the smallest pagesize multiple that is >= s. */ +/* Return the smallest PAGE_SIZE multiple that is >= s. */ #define PAGE_CEILING(s) \ - (((s) + pagesize_mask) & ~pagesize_mask) + (((s) + PAGE_MASK) & ~PAGE_MASK) #ifdef MALLOC_TINY /* Compute the smallest power of 2 that is >= x. */ @@ -1693,7 +1678,7 @@ i < ntbins + nqbins + ncbins ? "C" : "S", arena->bins[i].reg_size, arena->bins[i].nregs, - arena->bins[i].run_size >> pagesize_2pow, + arena->bins[i].run_size >> PAGE_SHIFT, #ifdef MALLOC_MAG (__isthreaded && opt_mag) ? arena->bins[i].stats.nmags : @@ -2335,8 +2320,8 @@ arena_avail_comp(arena_chunk_map_t *a, arena_chunk_map_t *b) { int ret; - size_t a_size = a->bits & ~pagesize_mask; - size_t b_size = b->bits & ~pagesize_mask; + size_t a_size = a->bits & ~PAGE_MASK; + size_t b_size = b->bits & ~PAGE_MASK; ret = (a_size > b_size) - (a_size < b_size); if (ret == 0) { @@ -2521,7 +2506,7 @@ SSIZE_INV(4), SSIZE_INV(5), SSIZE_INV(6), SSIZE_INV(7), SSIZE_INV(8), SSIZE_INV(9), SSIZE_INV(10), SSIZE_INV(11), SSIZE_INV(12), SSIZE_INV(13), SSIZE_INV(14), SSIZE_INV(15) -#if (PAGESIZE_2POW == 13) +#if (PAGE_SHIFT == 13) , SSIZE_INV(16), SSIZE_INV(17), SSIZE_INV(18), SSIZE_INV(19), SSIZE_INV(20), SSIZE_INV(21), SSIZE_INV(22), SSIZE_INV(23), @@ -2530,7 +2515,7 @@ #endif }; assert(SUBPAGE * (((sizeof(ssize_invs)) / sizeof(unsigned)) + 3) - >= (1U << PAGESIZE_2POW)); + >= PAGE_SIZE); if (size < (((sizeof(ssize_invs) / sizeof(unsigned)) + 2) << SUBPAGE_2POW)) { @@ -2562,10 +2547,10 @@ chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(run); old_ndirty = chunk->ndirty; run_ind = (unsigned)(((uintptr_t)run - (uintptr_t)chunk) - >> pagesize_2pow); - total_pages = (chunk->map[run_ind].bits & ~pagesize_mask) >> - pagesize_2pow; - need_pages = (size >> pagesize_2pow); + >> PAGE_SHIFT); + total_pages = (chunk->map[run_ind].bits & ~PAGE_MASK) >> + PAGE_SHIFT; + need_pages = (size >> PAGE_SHIFT); assert(need_pages > 0); assert(need_pages <= total_pages); rem_pages = total_pages - need_pages; @@ -2575,11 +2560,11 @@ /* Keep track of trailing unused pages for later use. */ if (rem_pages > 0) { chunk->map[run_ind+need_pages].bits = (rem_pages << - pagesize_2pow) | (chunk->map[run_ind+need_pages].bits & - pagesize_mask); + PAGE_SHIFT) | (chunk->map[run_ind+need_pages].bits & + PAGE_MASK); chunk->map[run_ind+total_pages-1].bits = (rem_pages << - pagesize_2pow) | (chunk->map[run_ind+total_pages-1].bits & - pagesize_mask); + PAGE_SHIFT) | (chunk->map[run_ind+total_pages-1].bits & + PAGE_MASK); arena_avail_tree_insert(&arena->runs_avail, &chunk->map[run_ind+need_pages]); } @@ -2590,7 +2575,7 @@ if ((chunk->map[run_ind + i].bits & CHUNK_MAP_ZEROED) == 0) { memset((void *)((uintptr_t)chunk + ((run_ind - + i) << pagesize_2pow)), 0, pagesize); + + i) << PAGE_SHIFT)), 0, PAGE_SIZE); /* CHUNK_MAP_ZEROED is cleared below. */ } } @@ -2706,7 +2691,7 @@ arena_chunk_map_t *mapelm, key; assert(size <= arena_maxclass); - assert((size & pagesize_mask) == 0); + assert((size & PAGE_MASK) == 0); /* Search the arena's chunks for the lowest best fit. */ key.bits = size | CHUNK_MAP_KEY; @@ -2717,7 +2702,7 @@ / sizeof(arena_chunk_map_t); run = (arena_run_t *)((uintptr_t)run_chunk + (pageind - << pagesize_2pow)); + << PAGE_SHIFT)); arena_run_split(arena, run, size, large, zero); return (run); } @@ -2729,7 +2714,7 @@ if (chunk == NULL) return (NULL); run = (arena_run_t *)((uintptr_t)chunk + (arena_chunk_header_npages << - pagesize_2pow)); + PAGE_SHIFT)); /* Update page map. */ arena_run_split(arena, run, size, large, zero); return (run); @@ -2781,7 +2766,7 @@ arena->ndirty -= npages; madvise((void *)((uintptr_t)chunk + (i << - pagesize_2pow)), (npages << pagesize_2pow), + PAGE_SHIFT)), (npages << PAGE_SHIFT), MADV_FREE); #ifdef MALLOC_STATS arena->stats.nmadvise++; @@ -2807,14 +2792,14 @@ chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(run); run_ind = (size_t)(((uintptr_t)run - (uintptr_t)chunk) - >> pagesize_2pow); + >> PAGE_SHIFT); assert(run_ind >= arena_chunk_header_npages); assert(run_ind < chunk_npages); if ((chunk->map[run_ind].bits & CHUNK_MAP_LARGE) != 0) - size = chunk->map[run_ind].bits & ~pagesize_mask; + size = chunk->map[run_ind].bits & ~PAGE_MASK; else size = run->bin->run_size; - run_pages = (size >> pagesize_2pow); + run_pages = (size >> PAGE_SHIFT); /* Mark pages as unallocated in the chunk map. */ if (dirty) { @@ -2841,15 +2826,15 @@ } } chunk->map[run_ind].bits = size | (chunk->map[run_ind].bits & - pagesize_mask); + PAGE_MASK); chunk->map[run_ind+run_pages-1].bits = size | - (chunk->map[run_ind+run_pages-1].bits & pagesize_mask); + (chunk->map[run_ind+run_pages-1].bits & PAGE_MASK); /* Try to coalesce forward. */ if (run_ind + run_pages < chunk_npages && (chunk->map[run_ind+run_pages].bits & CHUNK_MAP_ALLOCATED) == 0) { size_t nrun_size = chunk->map[run_ind+run_pages].bits & - ~pagesize_mask; + ~PAGE_MASK; /* * Remove successor from runs_avail; the coalesced run is @@ -2859,22 +2844,22 @@ &chunk->map[run_ind+run_pages]); size += nrun_size; - run_pages = size >> pagesize_2pow; + run_pages = size >> PAGE_SHIFT; - assert((chunk->map[run_ind+run_pages-1].bits & ~pagesize_mask) + assert((chunk->map[run_ind+run_pages-1].bits & ~PAGE_MASK) == nrun_size); chunk->map[run_ind].bits = size | (chunk->map[run_ind].bits & - pagesize_mask); + PAGE_MASK); chunk->map[run_ind+run_pages-1].bits = size | - (chunk->map[run_ind+run_pages-1].bits & pagesize_mask); + (chunk->map[run_ind+run_pages-1].bits & PAGE_MASK); } /* Try to coalesce backward. */ if (run_ind > arena_chunk_header_npages && (chunk->map[run_ind-1].bits & CHUNK_MAP_ALLOCATED) == 0) { - size_t prun_size = chunk->map[run_ind-1].bits & ~pagesize_mask; + size_t prun_size = chunk->map[run_ind-1].bits & ~PAGE_MASK; - run_ind -= prun_size >> pagesize_2pow; + run_ind -= prun_size >> PAGE_SHIFT; /* * Remove predecessor from runs_avail; the coalesced run is @@ -2884,21 +2869,21 @@ &chunk->map[run_ind]); size += prun_size; - run_pages = size >> pagesize_2pow; + run_pages = size >> PAGE_SHIFT; - assert((chunk->map[run_ind].bits & ~pagesize_mask) == + assert((chunk->map[run_ind].bits & ~PAGE_MASK) == prun_size); chunk->map[run_ind].bits = size | (chunk->map[run_ind].bits & - pagesize_mask); + PAGE_MASK); chunk->map[run_ind+run_pages-1].bits = size | - (chunk->map[run_ind+run_pages-1].bits & pagesize_mask); + (chunk->map[run_ind+run_pages-1].bits & PAGE_MASK); } /* Insert into runs_avail, now that coalescing is complete. */ arena_avail_tree_insert(&arena->runs_avail, &chunk->map[run_ind]); /* Deallocate chunk if it is now completely unused. */ - if ((chunk->map[arena_chunk_header_npages].bits & (~pagesize_mask | + if ((chunk->map[arena_chunk_header_npages].bits & (~PAGE_MASK | CHUNK_MAP_ALLOCATED)) == arena_maxclass) arena_chunk_dealloc(arena, chunk); @@ -2911,8 +2896,8 @@ arena_run_trim_head(arena_t *arena, arena_chunk_t *chunk, arena_run_t *run, size_t oldsize, size_t newsize) { - size_t pageind = ((uintptr_t)run - (uintptr_t)chunk) >> pagesize_2pow; - size_t head_npages = (oldsize - newsize) >> pagesize_2pow; + size_t pageind = ((uintptr_t)run - (uintptr_t)chunk) >> PAGE_SHIFT; + size_t head_npages = (oldsize - newsize) >> PAGE_SHIFT; assert(oldsize > newsize); @@ -2932,8 +2917,8 @@ arena_run_trim_tail(arena_t *arena, arena_chunk_t *chunk, arena_run_t *run, size_t oldsize, size_t newsize, bool dirty) { - size_t pageind = ((uintptr_t)run - (uintptr_t)chunk) >> pagesize_2pow; - size_t npages = newsize >> pagesize_2pow; + size_t pageind = ((uintptr_t)run - (uintptr_t)chunk) >> PAGE_SHIFT; + size_t npages = newsize >> PAGE_SHIFT; assert(oldsize > newsize); @@ -2962,7 +2947,7 @@ if (mapelm != NULL) { /* run is guaranteed to have available space. */ arena_run_tree_remove(&bin->runs, mapelm); - run = (arena_run_t *)(mapelm->bits & ~pagesize_mask); + run = (arena_run_t *)(mapelm->bits & ~PAGE_MASK); #ifdef MALLOC_STATS bin->stats.reruns++; #endif @@ -3053,7 +3038,7 @@ unsigned good_nregs, good_mask_nelms, good_reg0_offset; unsigned try_nregs, try_mask_nelms, try_reg0_offset; - assert(min_run_size >= pagesize); + assert(min_run_size >= PAGE_SIZE); assert(min_run_size <= arena_maxclass); assert(min_run_size <= RUN_MAX_SMALL); @@ -3089,7 +3074,7 @@ good_reg0_offset = try_reg0_offset; /* Try more aggressive settings. */ - try_run_size += pagesize; + try_run_size += PAGE_SIZE; try_nregs = ((try_run_size - sizeof(arena_run_t)) / bin->reg_size) + 1; /* Counter-act try_nregs-- in loop. */ do { @@ -3405,8 +3390,8 @@ size_t offset; arena_chunk_t *chunk; - assert((size & pagesize_mask) == 0); - assert((alignment & pagesize_mask) == 0); + assert((size & PAGE_MASK) == 0); + assert((alignment & PAGE_MASK) == 0); #ifdef MALLOC_BALANCE arena_lock_balance(arena); @@ -3422,7 +3407,7 @@ chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ret); offset = (uintptr_t)ret & (alignment - 1); - assert((offset & pagesize_mask) == 0); + assert((offset & PAGE_MASK) == 0); assert(offset < alloc_size); if (offset == 0) arena_run_trim_tail(arena, chunk, ret, alloc_size, size, false); @@ -3492,7 +3477,7 @@ return (NULL); } - if (ceil_size <= pagesize || (alignment <= pagesize + if (ceil_size <= PAGE_SIZE || (alignment <= PAGE_SIZE && ceil_size <= arena_maxclass)) ret = arena_malloc(choose_arena(), ceil_size, false); else { @@ -3506,7 +3491,7 @@ ceil_size = PAGE_CEILING(size); /* * (ceil_size < size) protects against very large sizes within - * pagesize of SIZE_T_MAX. + * PAGE_SIZE of SIZE_T_MAX. * * (ceil_size + alignment < ceil_size) protects against the * combination of maximal alignment and ceil_size large enough @@ -3526,18 +3511,18 @@ * would need to allocate in order to guarantee the alignment. */ if (ceil_size >= alignment) - run_size = ceil_size + alignment - pagesize; + run_size = ceil_size + alignment - PAGE_SIZE; else { /* * It is possible that (alignment << 1) will cause * overflow, but it doesn't matter because we also - * subtract pagesize, which in the case of overflow + * subtract PAGE_SIZE, which in the case of overflow * leaves us with a very large run_size. That causes * the first conditional below to fail, which means * that the bogus run_size value never gets used for * anything important. */ - run_size = (alignment << 1) - pagesize; + run_size = (alignment << 1) - PAGE_SIZE; } if (run_size <= arena_maxclass) { @@ -3565,15 +3550,15 @@ assert(CHUNK_ADDR2BASE(ptr) != ptr); chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(ptr); - pageind = (((uintptr_t)ptr - (uintptr_t)chunk) >> pagesize_2pow); + pageind = (((uintptr_t)ptr - (uintptr_t)chunk) >> PAGE_SHIFT); mapbits = chunk->map[pageind].bits; assert((mapbits & CHUNK_MAP_ALLOCATED) != 0); if ((mapbits & CHUNK_MAP_LARGE) == 0) { - arena_run_t *run = (arena_run_t *)(mapbits & ~pagesize_mask); + arena_run_t *run = (arena_run_t *)(mapbits & ~PAGE_MASK); assert(run->magic == ARENA_RUN_MAGIC); ret = run->bin->reg_size; } else { - ret = mapbits & ~pagesize_mask; + ret = mapbits & ~PAGE_MASK; assert(ret != 0); } @@ -3622,7 +3607,7 @@ arena_bin_t *bin; size_t size; - run = (arena_run_t *)(mapelm->bits & ~pagesize_mask); + run = (arena_run_t *)(mapelm->bits & ~PAGE_MASK); assert(run->magic == ARENA_RUN_MAGIC); bin = run->bin; size = bin->reg_size; @@ -3639,7 +3624,7 @@ bin->runcur = NULL; else if (bin->nregs != 1) { size_t run_pageind = (((uintptr_t)run - - (uintptr_t)chunk)) >> pagesize_2pow; + (uintptr_t)chunk)) >> PAGE_SHIFT; arena_chunk_map_t *run_mapelm = &chunk->map[run_pageind]; /* @@ -3670,7 +3655,7 @@ CHUNK_ADDR2BASE(bin->runcur); size_t runcur_pageind = (((uintptr_t)bin->runcur - - (uintptr_t)runcur_chunk)) >> pagesize_2pow; + (uintptr_t)runcur_chunk)) >> PAGE_SHIFT; arena_chunk_map_t *runcur_mapelm = &runcur_chunk->map[runcur_pageind]; @@ -3681,7 +3666,7 @@ bin->runcur = run; } else { size_t run_pageind = (((uintptr_t)run - - (uintptr_t)chunk)) >> pagesize_2pow; + (uintptr_t)chunk)) >> PAGE_SHIFT; arena_chunk_map_t *run_mapelm = >>> TRUNCATED FOR MAIL (1000 lines) <<<