Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jan 2010 22:34:18 +0000 (UTC)
From:      Brooks Davis <brooks@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r201843 - in projects/ngroups: . bin/pkill contrib/tcp_wrappers etc etc/defaults etc/rc.d games/fortune/datfiles games/pom include lib/libc/gen lib/libc/include lib/libc/rpc lib/libc/st...
Message-ID:  <201001082234.o08MYIu7012072@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: brooks
Date: Fri Jan  8 22:34:17 2010
New Revision: 201843
URL: http://svn.freebsd.org/changeset/base/201843

Log:
  MFC at r201841

Added:
  projects/ngroups/include/semaphore.h
     - copied unchanged from r201841, head/include/semaphore.h
  projects/ngroups/lib/libc/gen/sem_new.c
     - copied unchanged from r201841, head/lib/libc/gen/sem_new.c
  projects/ngroups/sys/arm/arm/cpufunc_asm_fa526.S
     - copied unchanged from r201841, head/sys/arm/arm/cpufunc_asm_fa526.S
  projects/ngroups/sys/arm/conf/CNS11XXNAS
     - copied unchanged from r201841, head/sys/arm/conf/CNS11XXNAS
  projects/ngroups/sys/arm/econa/
     - copied from r201841, head/sys/arm/econa/
  projects/ngroups/sys/sys/_umtx.h
     - copied unchanged from r201841, head/sys/sys/_umtx.h
  projects/ngroups/tools/regression/posixsem2/
     - copied from r201841, head/tools/regression/posixsem2/
  projects/ngroups/tools/regression/usr.bin/make/syntax/directive-t0/
     - copied from r201841, head/tools/regression/usr.bin/make/syntax/directive-t0/
  projects/ngroups/tools/regression/usr.bin/make/sysmk/
     - copied from r201841, head/tools/regression/usr.bin/make/sysmk/
  projects/ngroups/usr.sbin/traceroute/findsaddr-udp.c
     - copied unchanged from r201841, head/usr.sbin/traceroute/findsaddr-udp.c
Deleted:
  projects/ngroups/sys/sys/semaphore.h
Modified:
  projects/ngroups/Makefile
  projects/ngroups/ObsoleteFiles.inc
  projects/ngroups/bin/pkill/pkill.c
  projects/ngroups/contrib/tcp_wrappers/hosts_access.c
  projects/ngroups/etc/defaults/devfs.rules
  projects/ngroups/etc/rc.d/nsswitch
  projects/ngroups/etc/rc.firewall
  projects/ngroups/games/fortune/datfiles/fortunes
  projects/ngroups/games/fortune/datfiles/fortunes-o.real
  projects/ngroups/games/pom/pom.6
  projects/ngroups/games/pom/pom.c
  projects/ngroups/include/Makefile
  projects/ngroups/include/dirent.h
  projects/ngroups/include/strings.h
  projects/ngroups/lib/libc/gen/Makefile.inc
  projects/ngroups/lib/libc/gen/Symbol.map
  projects/ngroups/lib/libc/gen/_pthread_stubs.c
  projects/ngroups/lib/libc/gen/opendir.c
  projects/ngroups/lib/libc/gen/scandir.3
  projects/ngroups/lib/libc/gen/scandir.c
  projects/ngroups/lib/libc/gen/sem.c
  projects/ngroups/lib/libc/gen/sem_init.3
  projects/ngroups/lib/libc/include/libc_private.h
  projects/ngroups/lib/libc/rpc/getnetpath.c
  projects/ngroups/lib/libc/stdio/getc.3
  projects/ngroups/lib/libc/stdtime/localtime.c
  projects/ngroups/lib/libc/sys/sendfile.2
  projects/ngroups/lib/libthr/pthread.map
  projects/ngroups/lib/libthr/thread/thr_init.c
  projects/ngroups/lib/libthr/thread/thr_private.h
  projects/ngroups/lib/libthr/thread/thr_sem.c
  projects/ngroups/release/doc/share/misc/dev.archlist.txt
  projects/ngroups/sbin/dumpfs/dumpfs.c
  projects/ngroups/sbin/fsck_ffs/fsutil.c
  projects/ngroups/sbin/fsck_ffs/main.c
  projects/ngroups/sbin/fsck_ffs/pass1.c
  projects/ngroups/sbin/geom/class/raid3/geom_raid3.c
  projects/ngroups/sbin/geom/class/raid3/graid3.8
  projects/ngroups/sbin/geom/class/stripe/geom_stripe.c
  projects/ngroups/share/man/man4/carp.4
  projects/ngroups/share/man/man7/security.7
  projects/ngroups/share/man/man9/VFS.9
  projects/ngroups/share/man/man9/VFS_CHECKEXP.9
  projects/ngroups/share/man/man9/VFS_FHTOVP.9
  projects/ngroups/share/man/man9/vm_page_bits.9
  projects/ngroups/share/misc/committers-doc.dot
  projects/ngroups/sys/amd64/conf/DEFAULTS
  projects/ngroups/sys/amd64/conf/GENERIC
  projects/ngroups/sys/amd64/conf/Makefile
  projects/ngroups/sys/arm/arm/cpufunc.c
  projects/ngroups/sys/arm/arm/elf_trampoline.c
  projects/ngroups/sys/arm/conf/DEFAULTS
  projects/ngroups/sys/arm/include/cpuconf.h
  projects/ngroups/sys/arm/include/cpufunc.h
  projects/ngroups/sys/boot/zfs/zfsimpl.c
  projects/ngroups/sys/cam/scsi/scsi_ses.c
  projects/ngroups/sys/cam/scsi/scsi_targ_bh.c
  projects/ngroups/sys/cddl/boot/zfs/zfsimpl.h
  projects/ngroups/sys/cddl/boot/zfs/zfssubr.c
  projects/ngroups/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
  projects/ngroups/sys/compat/linux/linux_futex.c
  projects/ngroups/sys/conf/Makefile.arm
  projects/ngroups/sys/conf/makeLINT.mk
  projects/ngroups/sys/conf/options.arm
  projects/ngroups/sys/contrib/ngatm/netnatm/api/cc_conn.c
  projects/ngroups/sys/ddb/db_ps.c
  projects/ngroups/sys/dev/aac/aac.c
  projects/ngroups/sys/dev/acpi_support/acpi_ibm.c
  projects/ngroups/sys/dev/agp/agp.c
  projects/ngroups/sys/dev/amd/amd.c
  projects/ngroups/sys/dev/amr/amr.c
  projects/ngroups/sys/dev/arcmsr/arcmsr.c
  projects/ngroups/sys/dev/ata/ata-raid.c
  projects/ngroups/sys/dev/ata/chipsets/ata-ahci.c
  projects/ngroups/sys/dev/ata/chipsets/ata-siliconimage.c
  projects/ngroups/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c
  projects/ngroups/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c
  projects/ngroups/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c
  projects/ngroups/sys/dev/ath/if_ath.c
  projects/ngroups/sys/dev/bge/if_bge.c
  projects/ngroups/sys/dev/bktr/bktr_i2c.c
  projects/ngroups/sys/dev/cardbus/cardbus.c
  projects/ngroups/sys/dev/cs/if_cs.c
  projects/ngroups/sys/dev/cxgb/cxgb_sge.c
  projects/ngroups/sys/dev/dc/if_dc.c
  projects/ngroups/sys/dev/dc/if_dcreg.h
  projects/ngroups/sys/dev/de/if_de.c
  projects/ngroups/sys/dev/dpt/dpt.h
  projects/ngroups/sys/dev/dpt/dpt_scsi.c
  projects/ngroups/sys/dev/e1000/if_em.c
  projects/ngroups/sys/dev/ep/if_ep.c
  projects/ngroups/sys/dev/ex/if_ex.c
  projects/ngroups/sys/dev/exca/excareg.h
  projects/ngroups/sys/dev/fatm/if_fatm.c
  projects/ngroups/sys/dev/firewire/sbp.c
  projects/ngroups/sys/dev/hatm/if_hatm.c
  projects/ngroups/sys/dev/hptmv/entry.c
  projects/ngroups/sys/dev/if_ndis/if_ndis.c
  projects/ngroups/sys/dev/if_ndis/if_ndis_usb.c
  projects/ngroups/sys/dev/iir/iir.c
  projects/ngroups/sys/dev/iir/iir_pci.c
  projects/ngroups/sys/dev/iscsi/initiator/isc_sm.c
  projects/ngroups/sys/dev/isp/isp.c
  projects/ngroups/sys/dev/isp/isp_library.c
  projects/ngroups/sys/dev/iwn/if_iwn.c
  projects/ngroups/sys/dev/ixgbe/ixgbe.c
  projects/ngroups/sys/dev/jme/if_jme.c
  projects/ngroups/sys/dev/lmc/if_lmc.c
  projects/ngroups/sys/dev/malo/if_malo.c
  projects/ngroups/sys/dev/mge/if_mge.c
  projects/ngroups/sys/dev/mii/tdkphy.c
  projects/ngroups/sys/dev/mly/mly.c
  projects/ngroups/sys/dev/mxge/if_mxge.c
  projects/ngroups/sys/dev/patm/if_patm_intr.c
  projects/ngroups/sys/dev/pccard/card_if.m
  projects/ngroups/sys/dev/pci/pci.c
  projects/ngroups/sys/dev/pci/pci_private.h
  projects/ngroups/sys/dev/pdq/if_fea.c
  projects/ngroups/sys/dev/safe/safe.c
  projects/ngroups/sys/dev/sound/pci/maestro3.c
  projects/ngroups/sys/dev/ste/if_ste.c
  projects/ngroups/sys/dev/trm/trm.c
  projects/ngroups/sys/dev/usb/controller/musb_otg.c
  projects/ngroups/sys/dev/usb/controller/uhci.c
  projects/ngroups/sys/dev/usb/quirk/usb_quirk.c
  projects/ngroups/sys/dev/usb/serial/u3g.c
  projects/ngroups/sys/dev/usb/storage/umass.c
  projects/ngroups/sys/dev/usb/usb_device.c
  projects/ngroups/sys/dev/usb/usb_msctest.c
  projects/ngroups/sys/dev/usb/usb_msctest.h
  projects/ngroups/sys/dev/usb/usbdevs
  projects/ngroups/sys/dev/xl/if_xl.c
  projects/ngroups/sys/fs/nfsclient/nfs_clstate.c
  projects/ngroups/sys/fs/nfsserver/nfs_nfsdstate.c
  projects/ngroups/sys/fs/smbfs/smbfs_smb.c
  projects/ngroups/sys/fs/tmpfs/tmpfs_vfsops.c
  projects/ngroups/sys/geom/geom_slice.c
  projects/ngroups/sys/geom/mirror/g_mirror.c
  projects/ngroups/sys/geom/part/g_part.c
  projects/ngroups/sys/geom/raid3/g_raid3.c
  projects/ngroups/sys/geom/uzip/g_uzip.c
  projects/ngroups/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c
  projects/ngroups/sys/i386/conf/DEFAULTS
  projects/ngroups/sys/i386/conf/GENERIC
  projects/ngroups/sys/i386/conf/Makefile
  projects/ngroups/sys/i386/conf/PAE
  projects/ngroups/sys/i386/i386/locore.s
  projects/ngroups/sys/i386/i386/pmap.c
  projects/ngroups/sys/i386/include/pmap.h
  projects/ngroups/sys/i386/xen/locore.s
  projects/ngroups/sys/i386/xen/pmap.c
  projects/ngroups/sys/ia64/conf/DEFAULTS
  projects/ngroups/sys/ia64/conf/GENERIC
  projects/ngroups/sys/ia64/conf/Makefile
  projects/ngroups/sys/isa/pnp.c
  projects/ngroups/sys/kern/kern_fail.c
  projects/ngroups/sys/kern/kern_lock.c
  projects/ngroups/sys/kern/kern_umtx.c
  projects/ngroups/sys/kern/sched_4bsd.c
  projects/ngroups/sys/kern/subr_acl_nfs4.c
  projects/ngroups/sys/kern/subr_firmware.c
  projects/ngroups/sys/kern/tty.c
  projects/ngroups/sys/kern/tty_compat.c
  projects/ngroups/sys/kern/tty_pts.c
  projects/ngroups/sys/kern/uipc_sem.c
  projects/ngroups/sys/mips/adm5120/if_admsw.c
  projects/ngroups/sys/mips/conf/DEFAULTS
  projects/ngroups/sys/mips/mips/elf_machdep.c
  projects/ngroups/sys/modules/crypto/Makefile
  projects/ngroups/sys/net/flowtable.c
  projects/ngroups/sys/net/if_bridge.c
  projects/ngroups/sys/net/if_ethersubr.c
  projects/ngroups/sys/net/if_lagg.c
  projects/ngroups/sys/net80211/ieee80211_node.c
  projects/ngroups/sys/net80211/ieee80211_var.h
  projects/ngroups/sys/netgraph/ng_ipfw.c
  projects/ngroups/sys/netinet/if_ether.c
  projects/ngroups/sys/netinet/in.c
  projects/ngroups/sys/netinet/ip_carp.c
  projects/ngroups/sys/netinet/ip_divert.c
  projects/ngroups/sys/netinet/ip_divert.h
  projects/ngroups/sys/netinet/ip_dummynet.h
  projects/ngroups/sys/netinet/ip_var.h
  projects/ngroups/sys/netinet/ipfw/ip_dummynet.c
  projects/ngroups/sys/netinet/ipfw/ip_fw2.c
  projects/ngroups/sys/netinet/ipfw/ip_fw_dynamic.c
  projects/ngroups/sys/netinet/ipfw/ip_fw_log.c
  projects/ngroups/sys/netinet/ipfw/ip_fw_nat.c
  projects/ngroups/sys/netinet/ipfw/ip_fw_pfil.c
  projects/ngroups/sys/netinet/ipfw/ip_fw_private.h
  projects/ngroups/sys/netinet/ipfw/ip_fw_sockopt.c
  projects/ngroups/sys/netinet/ipfw/ip_fw_table.c
  projects/ngroups/sys/netinet/libalias/alias_db.c
  projects/ngroups/sys/netinet/libalias/alias_mod.c
  projects/ngroups/sys/netinet/raw_ip.c
  projects/ngroups/sys/netinet/sctp_asconf.c
  projects/ngroups/sys/netinet/sctp_pcb.c
  projects/ngroups/sys/netinet/sctputil.c
  projects/ngroups/sys/netinet6/icmp6.c
  projects/ngroups/sys/netinet6/ip6_input.c
  projects/ngroups/sys/netinet6/nd6_rtr.c
  projects/ngroups/sys/nfsclient/bootp_subr.c
  projects/ngroups/sys/pc98/conf/DEFAULTS
  projects/ngroups/sys/pc98/conf/GENERIC
  projects/ngroups/sys/pc98/conf/Makefile
  projects/ngroups/sys/pci/ncr.c
  projects/ngroups/sys/powerpc/aim/mmu_oea.c
  projects/ngroups/sys/powerpc/aim/mmu_oea64.c
  projects/ngroups/sys/powerpc/booke/pmap.c
  projects/ngroups/sys/powerpc/conf/DEFAULTS
  projects/ngroups/sys/powerpc/conf/GENERIC
  projects/ngroups/sys/powerpc/conf/Makefile
  projects/ngroups/sys/rpc/clnt_dg.c
  projects/ngroups/sys/security/mac_lomac/mac_lomac.c
  projects/ngroups/sys/sparc64/conf/DEFAULTS
  projects/ngroups/sys/sparc64/conf/GENERIC
  projects/ngroups/sys/sparc64/conf/Makefile
  projects/ngroups/sys/sun4v/conf/DEFAULTS
  projects/ngroups/sys/sun4v/conf/GENERIC
  projects/ngroups/sys/sun4v/conf/Makefile
  projects/ngroups/sys/sys/_semaphore.h
  projects/ngroups/sys/sys/param.h
  projects/ngroups/sys/sys/proc.h
  projects/ngroups/sys/sys/tty.h
  projects/ngroups/sys/sys/umtx.h
  projects/ngroups/sys/ufs/ffs/ffs_snapshot.c
  projects/ngroups/sys/ufs/ufs/ufs_dirhash.c
  projects/ngroups/sys/xen/xenbus/xenbus_probe.c
  projects/ngroups/tools/regression/acct/regress.t
  projects/ngroups/tools/regression/usr.bin/Makefile
  projects/ngroups/tools/regression/usr.bin/calendar/regress.sh
  projects/ngroups/tools/regression/usr.bin/lastcomm/values.sh
  projects/ngroups/tools/regression/usr.bin/make/common.sh
  projects/ngroups/tools/regression/usr.bin/pkill/pgrep-t.t
  projects/ngroups/tools/regression/usr.bin/pkill/pkill-t.t
  projects/ngroups/tools/regression/usr.bin/sed/multitest.t
  projects/ngroups/usr.bin/catman/catman.c
  projects/ngroups/usr.bin/ctags/Makefile
  projects/ngroups/usr.bin/ctags/ctags.c
  projects/ngroups/usr.bin/ctags/fortran.c
  projects/ngroups/usr.bin/make/dir.c
  projects/ngroups/usr.bin/make/dir.h
  projects/ngroups/usr.bin/make/main.c
  projects/ngroups/usr.bin/make/make.1
  projects/ngroups/usr.bin/make/parse.c
  projects/ngroups/usr.bin/makewhatis/makewhatis.c
  projects/ngroups/usr.bin/tcopy/tcopy.c
  projects/ngroups/usr.bin/unzip/unzip.c
  projects/ngroups/usr.bin/w/Makefile
  projects/ngroups/usr.bin/w/w.c
  projects/ngroups/usr.bin/xlint/xlint/Makefile
  projects/ngroups/usr.bin/xlint/xlint/xlint.c
  projects/ngroups/usr.sbin/bootparamd/bootparamd/bootparamd.c
  projects/ngroups/usr.sbin/cdcontrol/Makefile
  projects/ngroups/usr.sbin/cdcontrol/cdcontrol.c
  projects/ngroups/usr.sbin/lpr/common_source/lp.h
  projects/ngroups/usr.sbin/lpr/common_source/rmjob.c
  projects/ngroups/usr.sbin/mergemaster/mergemaster.8
  projects/ngroups/usr.sbin/mergemaster/mergemaster.sh
  projects/ngroups/usr.sbin/nscd/nscd.conf.5
  projects/ngroups/usr.sbin/ntp/doc/Makefile
  projects/ngroups/usr.sbin/rtsold/probe.c
  projects/ngroups/usr.sbin/traceroute/Makefile
  projects/ngroups/usr.sbin/usbconfig/dump.c
  projects/ngroups/usr.sbin/usbconfig/dump.h
  projects/ngroups/usr.sbin/usbconfig/usbconfig.8
  projects/ngroups/usr.sbin/usbconfig/usbconfig.c
Directory Properties:
  projects/ngroups/   (props changed)
  projects/ngroups/cddl/contrib/opensolaris/   (props changed)
  projects/ngroups/contrib/ee/   (props changed)
  projects/ngroups/contrib/expat/   (props changed)
  projects/ngroups/contrib/less/   (props changed)
  projects/ngroups/contrib/tcsh/   (props changed)
  projects/ngroups/sys/cddl/contrib/opensolaris/   (props changed)
  projects/ngroups/sys/cddl/contrib/opensolaris/uts/common/rpc/   (props changed)
  projects/ngroups/sys/contrib/dev/acpica/   (props changed)
  projects/ngroups/sys/dev/xen/xenpci/   (props changed)
  projects/ngroups/tools/regression/usr.bin/lastcomm/regress.t   (props changed)
  projects/ngroups/tools/regression/usr.sbin/sa/regress.t   (props changed)

Modified: projects/ngroups/Makefile
==============================================================================
--- projects/ngroups/Makefile	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/Makefile	Fri Jan  8 22:34:17 2010	(r201843)
@@ -278,7 +278,7 @@ tinderbox:
 # with a reasonable chance of success, regardless of how old your
 # existing system is.
 #
-.if make(universe) || make(tinderbox)
+.if make(universe) || make(universe_kernels) || make(tinderbox)
 TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v
 
 .if defined(DOING_TINDERBOX)
@@ -297,10 +297,6 @@ universe_prologue:
 	rm -f ${FAILFILE}
 .endif
 .for target in ${TARGETS}
-KERNCONFS!=	cd ${.CURDIR}/sys/${target}/conf && \
-		find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \
-		! -name DEFAULTS ! -name LINT
-KERNCONFS:=	${KERNCONFS:S/^NOTES$/LINT/}
 universe: universe_${target}
 .ORDER: universe_prologue universe_${target} universe_epilogue
 universe_${target}:
@@ -320,16 +316,25 @@ universe_${target}:
 	    (echo "${target} 'make LINT' failed," \
 	    "check _.${target}.makeLINT for details"| ${MAKEFAIL}))
 .endif
+	@cd ${.CURDIR} && ${MAKE} ${.MAKEFLAGS} TARGET=${target} \
+	    universe_kernels
+	@echo ">> ${target} completed on `LC_ALL=C date`"
+.endfor
+universe_kernels: universe_kernconfs
+BUILD_ARCH!=	uname -p
+TARGET?=	${BUILD_ARCH}
+KERNCONFS!=	cd ${.CURDIR}/sys/${TARGET}/conf && \
+		find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \
+		! -name DEFAULTS ! -name NOTES
+universe_kernconfs:
 .for kernel in ${KERNCONFS}
 	@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
 	    ${MAKE} ${JFLAG} buildkernel \
-	    TARGET=${target} \
+	    TARGET=${TARGET} \
 	    KERNCONF=${kernel} \
-	    > _.${target}.${kernel} 2>&1 || \
-	    (echo "${target} ${kernel} kernel failed," \
-	    "check _.${target}.${kernel} for details"| ${MAKEFAIL}))
-.endfor
-	@echo ">> ${target} completed on `LC_ALL=C date`"
+	    > _.${TARGET}.${kernel} 2>&1 || \
+	    (echo "${TARGET} ${kernel} kernel failed," \
+	    "check _.${TARGET}.${kernel} for details"| ${MAKEFAIL}))
 .endfor
 universe: universe_epilogue
 universe_epilogue:

Modified: projects/ngroups/ObsoleteFiles.inc
==============================================================================
--- projects/ngroups/ObsoleteFiles.inc	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/ObsoleteFiles.inc	Fri Jan  8 22:34:17 2010	(r201843)
@@ -14,6 +14,11 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20100105: new userland semaphore implementation
+OLD_FILES+=usr/include/sys/semaphore.h
+# 20100103: ntptrace(8) removed
+OLD_FILES+=usr/sbin/ntptrace
+OLD_FILES+=usr/share/man/man8/ntptrace.8.gz
 # 20091229: remove no longer relevant examples
 OLD_FILES+=usr/share/examples/pppd/auth-down.sample
 OLD_FILES+=usr/share/examples/pppd/auth-up.sample

Modified: projects/ngroups/bin/pkill/pkill.c
==============================================================================
--- projects/ngroups/bin/pkill/pkill.c	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/bin/pkill/pkill.c	Fri Jan  8 22:34:17 2010	(r201843)
@@ -671,8 +671,19 @@ makelist(struct listhead *head, enum lis
 					li->li_number = -1;	/* any jail */
 				break;
 			case LT_TTY:
-				usage();
-				/* NOTREACHED */
+				if (li->li_number < 0)
+					errx(STATUS_BADUSAGE,
+					     "Negative /dev/pts tty `%s'", sp);
+				snprintf(buf, sizeof(buf), _PATH_DEV "pts/%s",
+				    sp);
+				if (stat(buf, &st) != -1)
+					goto foundtty;
+				if (errno == ENOENT)
+					errx(STATUS_BADUSAGE, "No such tty: `"
+					    _PATH_DEV "pts/%s'", sp);
+				err(STATUS_ERROR, "Cannot access `"
+				    _PATH_DEV "pts/%s'", sp);
+				break;
 			default:
 				break;
 			}

Modified: projects/ngroups/contrib/tcp_wrappers/hosts_access.c
==============================================================================
--- projects/ngroups/contrib/tcp_wrappers/hosts_access.c	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/contrib/tcp_wrappers/hosts_access.c	Fri Jan  8 22:34:17 2010	(r201843)
@@ -148,6 +148,7 @@ struct request_info *request;
     char   *sh_cmd;			/* becomes optional shell command */
     int     match = NO;
     struct tcpd_context saved_context;
+    char   *cp;
 
     saved_context = tcpd_context;		/* stupid compilers */
 
@@ -164,7 +165,16 @@ struct request_info *request;
 		tcpd_warn("missing newline or line too long");
 		continue;
 	    }
-	    if (sv_list[0] == '#' || sv_list[strspn(sv_list, " \t\r\n")] == 0)
+	    /* Ignore anything after unescaped # character */
+	    for (cp = strchr(sv_list, '#'); cp != NULL;) {
+		if (cp > sv_list && cp[-1] == '\\') {
+		    cp = strchr(cp + 1, '#');
+		    continue;
+		}
+		*cp = '\0';
+		break;
+	    }
+	    if (sv_list[strspn(sv_list, " \t\r\n")] == 0)
 		continue;
 	    if ((cl_list = split_at(sv_list, ':')) == 0) {
 		tcpd_warn("missing \":\" separator");

Modified: projects/ngroups/etc/defaults/devfs.rules
==============================================================================
--- projects/ngroups/etc/defaults/devfs.rules	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/etc/defaults/devfs.rules	Fri Jan  8 22:34:17 2010	(r201843)
@@ -44,6 +44,14 @@ add path 'ptyP*' unhide
 add path 'ptyQ*' unhide
 add path 'ptyR*' unhide
 add path 'ptyS*' unhide
+add path 'ptyl*' unhide
+add path 'ptym*' unhide
+add path 'ptyn*' unhide
+add path 'ptyo*' unhide
+add path 'ptyL*' unhide
+add path 'ptyM*' unhide
+add path 'ptyN*' unhide
+add path 'ptyO*' unhide
 add path 'ttyp*' unhide
 add path 'ttyq*' unhide
 add path 'ttyr*' unhide
@@ -52,6 +60,14 @@ add path 'ttyP*' unhide
 add path 'ttyQ*' unhide
 add path 'ttyR*' unhide
 add path 'ttyS*' unhide
+add path 'ttyl*' unhide
+add path 'ttym*' unhide
+add path 'ttyn*' unhide
+add path 'ttyo*' unhide
+add path 'ttyL*' unhide
+add path 'ttyM*' unhide
+add path 'ttyN*' unhide
+add path 'ttyO*' unhide
 add path ptmx unhide
 add path pts unhide
 add path 'pts/*' unhide

Modified: projects/ngroups/etc/rc.d/nsswitch
==============================================================================
--- projects/ngroups/etc/rc.d/nsswitch	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/etc/rc.d/nsswitch	Fri Jan  8 22:34:17 2010	(r201843)
@@ -77,10 +77,10 @@ generate_host_conf()
 	nis)
 		echo "nis" >> $host_conf
 		;;
-	*=*)
+	cache | *=*)
 		;;
 	*)
-		printf "Warning: unrecognized source [%s]", $_s > "/dev/stderr"
+		printf "Warning: unrecognized source [%s]\n" $_s >&2
 		;;
 	esac
     done

Modified: projects/ngroups/etc/rc.firewall
==============================================================================
--- projects/ngroups/etc/rc.firewall	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/etc/rc.firewall	Fri Jan  8 22:34:17 2010	(r201843)
@@ -505,7 +505,10 @@ case ${firewall_type} in
 
 	# Allow "mandatory" ICMP in.
 	${fwcmd} add pass icmp from any to any icmptype 3,4,11
-	
+	if [ $ipv6_available -eq 0 ]; then
+		${fwcmd} add pass ipv6-icmp from any to any icmp6type 3
+	fi
+
 	# Add permits for this workstations published services below
 	# Only IPs and nets in firewall_allowservices is allowed in.
 	# If you really wish to let anyone use services on your 

Modified: projects/ngroups/games/fortune/datfiles/fortunes
==============================================================================
--- projects/ngroups/games/fortune/datfiles/fortunes	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/games/fortune/datfiles/fortunes	Fri Jan  8 22:34:17 2010	(r201843)
@@ -1696,14 +1696,6 @@ the Cat.
 	"Then it doesn't matter which way you go," said the Cat.
 		-- Lewis Carroll
 %
-	COMMENT
-
-Oh, life is a glorious cycle of song,
-A medley of extemporanea;
-And love is thing that can never go wrong;
-And I am Marie of Roumania.
-		-- Dorothy Parker
-%
 	Concerning the war in Vietnam, Senator George Aiken of Vermont noted
 in January, 1966, "I'm not very keen for doves or hawks.  I think we need more
 owls."
@@ -1923,22 +1915,6 @@ Christmas tree.  The piano is missing.
 you rent your home and own Firearms, in which case you can go to level
 4.  The best way to get to level 3 is egg-nog.
 %
-	FIGHTING WORDS
-
-Say my love is easy had,
-	Say I'm bitten raw with pride,
-Say I am too often sad --
-	Still behold me at your side.
-
-Say I'm neither brave nor young,
-	Say I woo and coddle care,
-Say the devil touched my tongue --
-	Still you have my heart to wear.
-
-But say my verses do not scan,
-	And I get me another man!
-		-- Dorothy Parker
-%
 	"For I perceive that behind this seemingly unrelated sequence
 of events, there lurks a singular, sinister attitude of mind."
 
@@ -2210,20 +2186,6 @@ full of money before."
 	"Didn't you see it?"
 	"Damn kid had it under his coat."
 %
-	Hug O' War
-
-I will not play at tug o' war.
-I'd rather play at hug o' war,
-Where everyone hugs
-Instead of tugs,
-Where everyone giggles
-And rolls on the rug,
-Where everyone kisses,
-And everyone grins,
-And everyone cuddles,
-And everyone wins.
-		-- Shel Silverstein
-%
 	Human thinking can skip over a great deal, leap over small
 misunderstandings, can contain ifs and buts in untroubled corners of
 the mind. But the machine has no corners. Despite all the attempts to
@@ -2677,33 +2639,6 @@ right any day."
 life-style otherwise."
 		-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
 %
-	Insofar as I may be heard by anything, which may or may not care
-what I say, I ask, if it matters, that you be forgiven for anything you
-may have done or failed to do which requires forgiveness.  Conversely, if
-not forgiveness but something else may be required to insure any possible
-benefit for which you may be eligible after the destruction of your body,
-I ask this, whatever it may be, be granted or withheld, as the case may be,
-in such a manner as to insure your receiving said benefit.  I ask this in my
-capacity as your elected intermediary between yourself and that which may
-not be yourself, but which may have an interest in the matter of your
-receiving as much as it is possible for you to receive of this thing, and
-which may in some way be influenced by this ceremony.
-	Amen.
-		-- Roger Zelazny, "Creatures of Light and Darkness", 1969
-%
-	INVENTORY
-Four be the things I am wiser to know:
-Idleness, sorrow, a friend, and a foe.
-
-Four be the things I'd been better without:
-Love, curiosity, freckles, and doubt.
-
-Three be the things I shall never attain:
-Envy, content, and sufficient champagne.
-
-Three be the things I shall have till I die:
-Laughter and hope and a sock in the eye.
-%
 	"Is there any point to which you would wish to draw my attention?"
 	"To the curious incident of the dog in the night-time."
 	"The dog did nothing in the night-time."
@@ -3983,28 +3918,6 @@ almost succeeded in getting a VAX to thi
 organization say that each time the machine fails to think it ceases to
 exist.
 %
-	THE LESSER-KNOWN PROGRAMMING LANGUAGES #5: VALGOL
-From its modest beginnings in Southern California's San Fernando Valley,
-VALGOL is enjoying a dramatic surge of popularity across the industry.
-
-Here is a sample program:
-	LIKE, Y*KNOW(I MEAN)START
-	IF PIZZA = LIKE BITCHEN AND GUY = LIKE TUBULAR AND
-	   VALLEY GIRL = LIKE GRODY**MAX(FERSURE)**2 THEN
-		FOR I = LIKE 1 TO OH*MAYBE 100
-			DO*WAH - (DITTY**2)
-			BARF(I)=TOTALLY GROSS(OUT)
-		SURE
-	LIKE BAG THIS PROGRAM
-	REALLY
-	LIKE TOTALLY (Y*KNOW)
-	IM*SURE
-	GOTO THE MALL
-
-When the user makes a syntax error, the interpreter displays the message:
-
-	GAG ME WITH A SPOON!!
-%
 	THE LESSER-KNOWN PROGRAMMING LANGUAGES #8: LAIDBACK
 
 This language was developed at the Marin County Center for T'ai Chi,
@@ -5335,9 +5248,6 @@ that he didn't force you down on the ask
 -- A plethora of individuals wither expertise in culinary techniques vitiated
 	the potable concoction produced by steeping certain coupestibles.
 -- Eleemosynary deeds have their initial incidence intramurally.
--- Male cadavers are incapable of yielding testimony.
--- Individuals who make their abode in vitreous edifices would be well
-	advised to refrain from catapulting projectiles.
 %
 =============== ALL FRESHMEN PLEASE NOTE ===============
 
@@ -11076,9 +10986,6 @@ Armstrong's Collection Law:
 	If the check is truly in the mail,
 	it is surely made out to someone else.
 %
-Arnold's Addendum:
-	Anything not fitting into these categories causes cancer in rats.
-%
 Arnold's Laws of Documentation:
 	1.) If it should exist, it doesn't.
 	2.) If it does exist, it's out of date.
@@ -12654,7 +12561,7 @@ Boren's Laws:
 	(2) When in trouble, delegate.
 	(3) When in doubt, mumble.
 %
-boss, n:
+Boss, n:
 	According to the Oxford English Dictionary, in the Middle Ages the
 	words "boss" and "botch" were largely synonymous, except that boss,
 	in addition to meaning "a supervisor of workers" also meant "an
@@ -12935,7 +12842,7 @@ wrote the program.
 Fortunately, the second-to-last bug has just been fixed.
 		-- Ray Simard
 %
-bug, n:
+Bug, n:
 	An elusive creature living in a program that makes it incorrect.
 	The activity of "debugging", or removing bugs from a program, ends
 	when people get tired of doing it, not when the bugs are removed.
@@ -13524,14 +13431,14 @@ only robust persons doing this thing is 
 others who have tried it.
 		-- Ambrose Bierce, "The Devil's Dictionary"
 %
-
-Certain passages in several laws have always defied interpretation and the
-most inexplicable must be a matter of opinion.  A judge of the Court of
-Session of Scotland has sent the editors of this book his candidate which
-reads, "In the Nuts (unground), (other than ground nuts) Order, the expression
-nuts shall have reference to such nuts, other than ground nuts, as would
-but for this amending Order not qualify as nuts (unground) (other than ground
-nuts) by reason of their being nuts (unground)."
+Certain passages in several laws have always defied interpretation and
+the most inexplicable must be a matter of opinion.  A judge of the Court
+of Session of Scotland has sent the editors of this book his candidate
+which reads, "In the Nuts (unground), (other than ground nuts) Order,
+the expression nuts shall have reference to such nuts, other than ground
+nuts, as would but for this amending Order not qualify as nuts
+(unground) (other than ground nuts) by reason of their being nuts
+(unground)."
 		-- Guinness Book of World Records, 1973
 %
 Certainly the game is rigged.
@@ -15057,17 +14964,6 @@ letter, or even 25 cents on a stamp!
 so post it as many places as you can.
 		-- Emily Postnews Answers Your Questions on Netiquette
 %
-Dear Sir,
-	I am firmly opposed to the spread of microchips either to the home or
-to the office.  We have more than enough of them foisted upon us in public
-places.  They are a disgusting Americanism, and can only result in the farmers
-being forced to grow smaller potatoes, which in turn will cause massive un-
-employment in the already severely depressed agricultural industry.
-	Yours faithfully,
-	Capt. Quinton D'Arcy, J.P.
-	Sevenoaks
-		-- Letters To The Editor, The Times of London
-%
 Death before dishonor.
 But neither before breakfast.
 %
@@ -17838,9 +17734,6 @@ Finagle's Eleventh Law:
 	it happened according to his pet theory.
 %
 Finagle's First Law:
-	If an experiment works, something has gone wrong.
-%
-Finagle's First Law:
 	To study a subject best, understand it thoroughly before you start.
 
 Finagle's Second Law:
@@ -18173,9 +18066,6 @@ For children with short attention spans:
 For courage mounteth with occasion.
 		-- William Shakespeare, "King John"
 %
-For every action, there is an equal and opposite criticism.
-		-- Harrison
-%
 For every bloke who makes his mark,
 there's half a dozen waiting to rub it out.
 		-- Andy Capp
@@ -19520,17 +19410,6 @@ Your butt is on the menu
 And the check is in the mail.
 		-- The Piranha Club Anthem, to the tune of "De Camptown Races"
 %
-From the "Guinness Book of World Records", 1973:
-
-Certain passages in several laws have always defied interpretation and
-the most inexplicable must be a matter of opinion.  A judge of the
-Court of Session of Scotland has sent the editors of this book his
-candidate which reads, "In the Nuts (unground), (other than ground
-nuts) Order, the expression nuts shall have reference to such nuts,
-other than ground nuts, as would but for this amending Order not
-qualify as nuts (unground)(other than ground nuts) by reason of their
-being nuts (unground)."
-%
 From the moment I picked your book up until I put it down I was
 convulsed with laughter.  Some day I intend reading it.
 		-- Groucho Marx, from "The Book of Insults"
@@ -24035,21 +23914,6 @@ I may not be totally perfect, but parts 
 I met a wonderful new man.  He's fictional, but you can't have everything.
 		-- Cecelia, "The Purple Rose of Cairo"
 %
-I met him in a swamp down in Dagobah
-Where it bubbles all the time like a giant cabinet soda
-	S-O-D-A soda
-I saw the little runt sitting there on a log
-I asked him his name and in a raspy voice he said Yoda
-	Y-O-D-A Yoda, Yo-Yo-Yo-Yo Yoda
-
-Well I've been around but I ain't never seen
-A guy who looks like a Muppet but he's wrinkled and green
-	Oh my Yoda, Yo-Yo-Yo-Yo Yoda
-Well I'm not dumb but I can't understand
-How he can raise me in the air just by raising his hand
-	Oh my Yoda, Yo-Yo-Yo-Yo Yoda, Yo-Yo-Yo-Yo Yoda
-		-- The STAR WARS Song, to "Lola", by the Kinks
-%
 I met my latest girl friend in a department store.  She was looking at
 clothes, and I was putting Slinkys on the escalators.
 		-- Steven Wright
@@ -24524,10 +24388,6 @@ are worth considering, to wit:
 	"When paying tolls, remember that it is necessary to release the
 	quarter a full 3 seconds before passing the basket if you are
 	traveling more than 60 MPH."
-
-[110.13]:
-	"When traveling on a one-way street, stay to the right, so as not
-	to interfere with oncoming traffic."
 %
 I suppose some of the variation between Boston drivers and the rest of the
 country is due to the progressive Massachusetts Driver Education Manual which
@@ -24621,12 +24481,6 @@ I think that I shall never see
 A billboard lovely as a tree.
 Indeed, unless the billboards fall
 I'll never see a tree at all.
-		-- Nash
-%
-I think that I shall never see
-A billboard lovely as a tree.
-Perhaps, unless the billboards fall
-I'll never see a tree at all.
 		-- Ogden Nash
 %
 I think that I shall never see
@@ -25892,21 +25746,6 @@ this is the case, then programmers stand
 software engineers dig each other's graves.
 		-- Unknown
 %
-If I have seen farther than others, it is because I was standing on the
-shoulders of giants.
-		-- Isaac Newton
-
-In the sciences, we are now uniquely privileged to sit side by side
-with the giants on whose shoulders we stand.
-		-- Gerald Holton
-
-If I have not seen as far as others, it is because giants were standing
-on my shoulders.
-		-- Hal Abelson
-
-In computer science, we stand on each other's feet.
-		-- Brian K. Reid
-%
 If I have to lay an egg for my country, I'll do it.
 		-- Bob Hope
 %
@@ -37634,7 +37473,7 @@ Pardo's First Postulate:
 fattening.
 
 Arnold's Addendum:
-	Everything else causes cancer in rats.
+	Anything not fitting into these categories causes cancer in rats.
 %
 Parents often talk about the younger generation as if they
 didn't have much of anything to do with it.
@@ -39431,10 +39270,6 @@ A:	A dope ring.
 
 Q:	Why do blondes put their hair in ponytails?
 A:	To cover up the valve stem.
-
-Q:	Why did the blonde get so excited after she finished her jigsaw
-	puzzle in only 6 months?
-A:	Because on the box it said "From 2-4 years".
 %
 Q:	What do you call a blind pre-historic animal?
 A:	Diyathinkhesaurus.
@@ -41467,25 +41302,6 @@ Spock:	Affirmative.
 Kirk:	Mr. Sulu, go to pass two.
 Sulu:	Aye aye, sir, going to pass two.
 %
-Scratch the disks, dump the core,	Shut it down, pull the plug
-Roll the tapes across the floor,	Give the core an extra tug
-And the system is going to crash.	And the system is going to crash.
-Teletypes smashed to bits.		Mem'ry cards, one and all,
-Give the scopes some nasty hits		Toss out halfway down the hall
-And the system is going to crash.	And the system is going to crash.
-And we've also found			Just flip one switch
-When you turn the power down,		And the lights will cease to twitch
-You turn the disk readers into trash.	And the tape drives will crumble
-Oh, it's so much fun,				in a flash.
-Now the CPU won't run			 When the CPU
-And the system is going to crash.	Can print nothing out but "foo,"
-					The system is going to crash.
-		-- To The Caissons Go Rolling Along
-%
-Scratch the disks!
-Drop the core!
-Roll the tapes across the floor!
-%
 Screw up your courage!  You've screwed up everything else.
 %
 Scribline, n.:
@@ -46662,7 +46478,8 @@ often turn to a related (but infinitely 
 %
 THE LESSER-KNOWN PROGRAMMING LANGUAGES #14 -- VALGOL
 
-	VALGOL is enjoying a dramatic surge of popularity across the
+	From its modest beginnings in Southern California's San Fernando
+Valley VALGOL is enjoying a dramatic surge of popularity across the
 industry.  VALGOL commands include REALLY, LIKE, WELL, and Y*KNOW.
 Variables are assigned with the =LIKE and =TOTALLY operators.  Other
 operators include the "California booleans", AX and NOWAY.  Loops are
@@ -48369,9 +48186,6 @@ and peculiar sort of voluntary thinking.
 The solution of this problem is trivial
 and is left as an exercise for the reader.
 %
-The solution to a problem changes the nature of the problem.
-		-- Peer
-%
 The somewhat old and crusty vicar was taking a well-earned retirement from
 his rather old and crusty parish.  As is usual in these cases, a locum was
 sent to cover the transition period.  This particular man was young and
@@ -52040,7 +51854,7 @@ yourself and that which may have an inte
 as much as it is possible for you to receive of this thing, and which may
 in some way be influenced by this ceremony.
 	Amen.
-		-- Roger Zelazny, "Creatures of Light and Darkness"
+		-- Roger Zelazny, "Creatures of Light and Darkness", 1969
 %
 To understand a program you must become both the machine and the program.
 %
@@ -56789,22 +56603,6 @@ I'd LOVE to, but...
 	-- I'm teaching my ferret to yodel.
 	-- My crayons all melted together.
 %
-Why I Can't Go Out With You:
-
-I'd LOVE to, but ...
-	-- I have to floss my cat.
-	-- I've dedicated my life to linguini.
-	-- I need to spend more time with my blender.
-	-- it wouldn't be fair to the other Beautiful People.
-	-- it's my night to pet the dog/ferret/goldfish.
-	-- I'm going downtown to try on some gloves.
-	-- I have to check the freshness dates on my dairy products.
-	-- I'm going down to the bakery to watch the buns rise.
-	-- I have an appointment with a cuticle specialist.
-	-- I have some really hard words to look up.
-	-- I've got a Friends of the Lowly Rutabaga meeting.
-	-- I promised to help a friend fold road maps.
-%
 Why is it called a funny bone when it hurts so much?
 %
 Why is it taking so long for her to bring out all the good in you?
@@ -57859,9 +57657,6 @@ a private eye.
 Yeah, there are more important things in life than money,
 but they won't go out with you if you don't have any.
 %
-YEAR:
-	A period of three hundred and sixty-five disappointments.
-%
 Year  Name				James Bond	Book
 ----  --------------------------------	--------------	----
 50's  James Bond TV Series		Barry Nelson

Modified: projects/ngroups/games/fortune/datfiles/fortunes-o.real
==============================================================================
--- projects/ngroups/games/fortune/datfiles/fortunes-o.real	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/games/fortune/datfiles/fortunes-o.real	Fri Jan  8 22:34:17 2010	(r201843)
@@ -663,6 +663,13 @@ posh hotel.
 	"Why, yes, young man," said the gentleman.  "Would you bring me
 a postcard?"
 %
+	As we know, there are known knowns.  There are things we know we
+know.  We also know there are known unknowns.  That is to say, we know
+there are some things we do not know.  But there are also unknown
+unknowns; the ones we don't know we don't know.
+		-- United States Secretary of Defense Donald Rumsfeld
+		   12 February 2002, Regarding the US invasion of Iraq
+%
 	"Are pirates an ethnic group?  Or are they just people who burn
 illegal cds?"
 	"Arrrr!  We prefer to be called Buccaneer-Americans."
@@ -12873,6 +12880,14 @@ Contraception", has been withdrawn after
 pull it out at the last minute.
 		-- Not the Nine O'Clock News
 %
+The investment community feels very putupon.  They feel there is no
+reason why they shouldn't earn $1 million to $200 million a year,
+and they don't want to be held responsible for the global financial
+meltdown.
+		-- Daniel Fass, Chairman of United States President
+		   Barack Obama's financial-industry fundraising party
+		   20 October 2009
+%
 The king arranged a regal marriage for his daughter -- a bond that would unite
 two great kingdoms.  Yet, because the young couple seemed so formal to each
 other, he posted a spy outside the royal wedding chamber and demanded a full

Modified: projects/ngroups/games/pom/pom.6
==============================================================================
--- projects/ngroups/games/pom/pom.6	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/games/pom/pom.6	Fri Jan  8 22:34:17 2010	(r201843)
@@ -32,15 +32,34 @@
 .\"	@(#)pom.6	8.1 (Berkeley) 5/31/93
 .\" $FreeBSD$
 .\"
-.TH POM 6 "May 31, 1993"
+.Dd May 31, 1993
+.Dt POM 6
 .UC 7
-.SH NAME
-pom \- display the phase of the moon
-.SH SYNOPSIS
-.B pom
-.SH DESCRIPTION
+.Sh NAME
+.Nm pom
+.Nd display the phase of the moon
+.Sh SYNOPSIS
+.Nm 
+.Op Fl d Ar yyyy.mm.dd
+.Op Fl t Ar hh:mm:ss
+.Sh DESCRIPTION
 The
-.I pom
+.Nm
 utility displays the current phase of the moon.
 Useful for selecting software completion target dates and predicting
 managerial behavior.
+.Pp
+Use the arguments
+.Fl d
+and
+.Fl o
+to specify a specific date and time for which the phase of the moon
+has to be calculated.
+If
+.Fl d
+but not
+.Fl t
+has been specified, it will calculate the phase of the moon on that
+day at midnight.
+.Sh SEE ALSO
+`Practical Astronomy with Your Calculator' by Duffett-Smith.

Modified: projects/ngroups/games/pom/pom.c
==============================================================================
--- projects/ngroups/games/pom/pom.c	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/games/pom/pom.c	Fri Jan  8 22:34:17 2010	(r201843)
@@ -57,9 +57,13 @@ __FBSDID("$FreeBSD$");
  *
  */
 
-#include <time.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <math.h>
+#include <string.h>
+#include <sysexits.h>
+#include <time.h>
+#include <unistd.h> 
 
 #ifndef	PI
 #define	PI	  3.14159265358979323846
@@ -76,20 +80,62 @@ __FBSDID("$FreeBSD$");
 static void	adj360(double *);
 static double	dtor(double);
 static double	potm(double);
+static void	usage(char *progname);
 
 int
-main(void)
+main(int argc, char **argv)
 {
 	time_t tt;
-	struct tm *GMT;
+	struct tm GMT, tmd;
 	double days, today, tomorrow;
-	int cnt;
+	int ch, cnt;
+	char *odate = NULL, *otime = NULL;
+
+	while ((ch = getopt(argc, argv, "d:t:")) != -1)
+		switch (ch) {
+		case 'd':
+			odate = optarg;
+			break;
+		case 't':
+			otime = optarg;
+			break;
+		default:
+			usage(argv[0]);
+		}
+
+        argc -= optind;
+	argv += optind;
+
+	if (argc)
+		usage(argv[0]);
 
-	(void) time(&tt);
-	GMT = gmtime(&tt);
-	days = (GMT->tm_yday + 1) + ((GMT->tm_hour +
-	    (GMT->tm_min / 60.0) + (GMT->tm_sec / 3600.0)) / 24.0);
-	for (cnt = EPOCH; cnt < GMT->tm_year; ++cnt)
+	/* Adjust based on users preferences */
+	time(&tt);
+	if (otime != NULL || odate != NULL) {
+		/* Save today in case -d isn't specified */
+		localtime_r(&tt, &tmd);
+
+		if (odate != NULL) {
+			tmd.tm_year = strtol(odate, NULL, 10) - 1900;
+			tmd.tm_mon = strtol(odate + 5, NULL, 10) - 1;
+			tmd.tm_mday = strtol(odate + 8, NULL, 10);
+			/* Use midnight as the middle of the night */
+			tmd.tm_hour = 0;
+			tmd.tm_min = 0;
+			tmd.tm_sec = 0;
+		}
+		if (otime != NULL) {
+			tmd.tm_hour = strtol(otime, NULL, 10);
+			tmd.tm_min = strtol(otime + 3, NULL, 10);
+			tmd.tm_sec = strtol(otime + 6, NULL, 10);
+		}
+		tt = mktime(&tmd);
+	}
+
+	gmtime_r(&tt, &GMT);
+	days = (GMT.tm_yday + 1) + ((GMT.tm_hour +
+	    (GMT.tm_min / 60.0) + (GMT.tm_sec / 3600.0)) / 24.0);
+	for (cnt = EPOCH; cnt < GMT.tm_year; ++cnt)
 		days += isleap(1900 + cnt) ? 366 : 365;
 	today = potm(days) + .5;
 	(void)printf("The Moon is ");
@@ -160,6 +206,7 @@ potm(double days)
 static double
 dtor(double deg)
 {
+
 	return(deg * PI / 180);
 }
 
@@ -170,6 +217,7 @@ dtor(double deg)
 static void
 adj360(double *deg)
 {
+
 	for (;;)
 		if (*deg < 0)
 			*deg += 360;
@@ -178,3 +226,11 @@ adj360(double *deg)
 		else
 			break;
 }
+
+static void
+usage(char *progname)
+{
+
+	fprintf(stderr, "Usage: %s [-d yyyy.mm.dd] [-t hh:mm:ss]\n", progname);
+	exit(EX_USAGE);
+}

Modified: projects/ngroups/include/Makefile
==============================================================================
--- projects/ngroups/include/Makefile	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/include/Makefile	Fri Jan  8 22:34:17 2010	(r201843)
@@ -18,7 +18,7 @@ INCS=	a.out.h ar.h assert.h bitstring.h 
 	netdb.h nl_types.h nlist.h nss.h nsswitch.h paths.h \
 	printf.h proc_service.h pthread.h \
 	pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h regexp.h \
-	res_update.h resolv.h runetype.h search.h setjmp.h \
+	res_update.h resolv.h runetype.h search.h semaphore.h setjmp.h \
 	signal.h spawn.h stab.h \
 	stdbool.h stddef.h stdio.h stdlib.h string.h stringlist.h \
 	strings.h sysexits.h tar.h termios.h tgmath.h \
@@ -28,7 +28,7 @@ INCS=	a.out.h ar.h assert.h bitstring.h 
 
 MHDRS=	float.h floatingpoint.h stdarg.h
 
-PHDRS=	sched.h semaphore.h _semaphore.h
+PHDRS=	sched.h _semaphore.h
 
 LHDRS=	aio.h errno.h fcntl.h linker_set.h poll.h stdint.h syslog.h \
 	ucontext.h

Modified: projects/ngroups/include/dirent.h
==============================================================================
--- projects/ngroups/include/dirent.h	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/include/dirent.h	Fri Jan  8 22:34:17 2010	(r201843)
@@ -93,9 +93,11 @@ typedef	void *	DIR;
 #ifndef _KERNEL
 
 __BEGIN_DECLS
+#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 700
+int	 alphasort(const struct dirent **, const struct dirent **);
+#endif
 #if __BSD_VISIBLE
 DIR	*__opendir2(const char *, int);
-int	 alphasort(const void *, const void *);
 int	 getdents(int, char *, int);
 int	 getdirentries(int, char *, int, long *);
 #endif
@@ -107,9 +109,10 @@ struct dirent *
 int	 readdir_r(DIR *, struct dirent *, struct dirent **);
 #endif
 void	 rewinddir(DIR *);
-#if __BSD_VISIBLE
+#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >= 700
 int	 scandir(const char *, struct dirent ***,
-	    int (*)(struct dirent *), int (*)(const void *, const void *));
+	    int (*)(const struct dirent *), int (*)(const struct dirent **,
+	    const struct dirent **));
 #endif
 #if __XSI_VISIBLE
 void	 seekdir(DIR *, long);

Copied: projects/ngroups/include/semaphore.h (from r201841, head/include/semaphore.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/ngroups/include/semaphore.h	Fri Jan  8 22:34:17 2010	(r201843, copy of r201841, head/include/semaphore.h)
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2010 David Xu <davidxu@freebsd.org>
+ *
+ * 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 unmodified, 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+/* semaphore.h: POSIX 1003.1b semaphores */
+
+#ifndef _SEMAPHORE_H_
+#define _SEMAPHORE_H_
+
+#include <sys/cdefs.h>
+#include <sys/_types.h>
+#include <sys/_umtx.h>
+
+struct _sem {
+	__uint32_t	_magic;
+	struct _usem	_kern;
+};
+
+typedef	struct _sem	sem_t;
+
+#define	SEM_FAILED	((sem_t *)0)
+#define	SEM_VALUE_MAX	__INT_MAX
+
+struct timespec;
+
+__BEGIN_DECLS
+int	 sem_close(sem_t *);
+int	 sem_destroy(sem_t *);
+int	 sem_getvalue(sem_t * __restrict, int * __restrict);
+int	 sem_init(sem_t *, int, unsigned int);
+sem_t	*sem_open(const char *, int, ...);
+int	 sem_post(sem_t *);
+int	 sem_timedwait(sem_t * __restrict, const struct timespec * __restrict);
+int	 sem_trywait(sem_t *);
+int	 sem_unlink(const char *);
+int	 sem_wait(sem_t *);
+__END_DECLS
+
+#endif /* !_SEMAPHORE_H_ */

Modified: projects/ngroups/include/strings.h
==============================================================================
--- projects/ngroups/include/strings.h	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/include/strings.h	Fri Jan  8 22:34:17 2010	(r201843)
@@ -46,7 +46,7 @@ void	 bzero(void *, size_t);					/* LEGA
 #if __XSI_VISIBLE
 int	 ffs(int) __pure2;
 #endif
-#ifdef __BSD_VISIBLE
+#if __BSD_VISIBLE
 int	 ffsl(long) __pure2;
 int	 ffsll(long long) __pure2;
 int	 fls(int) __pure2;

Modified: projects/ngroups/lib/libc/gen/Makefile.inc
==============================================================================
--- projects/ngroups/lib/libc/gen/Makefile.inc	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/lib/libc/gen/Makefile.inc	Fri Jan  8 22:34:17 2010	(r201843)
@@ -25,7 +25,7 @@ SRCS+=  __getosreldate.c __xuname.c \
 	pause.c pmadvise.c popen.c posix_spawn.c \
 	psignal.c pw_scan.c pwcache.c \
 	raise.c readdir.c readpassphrase.c rewinddir.c \
-	scandir.c seed48.c seekdir.c sem.c semctl.c \
+	scandir.c seed48.c seekdir.c sem.c sem_new.c semctl.c \
 	setdomainname.c sethostname.c setjmperr.c setmode.c \
 	setproctitle.c setprogname.c siginterrupt.c siglist.c signal.c \
 	sigsetops.c sleep.c srand48.c statvfs.c stringlist.c strtofflags.c \

Modified: projects/ngroups/lib/libc/gen/Symbol.map
==============================================================================
--- projects/ngroups/lib/libc/gen/Symbol.map	Fri Jan  8 22:31:42 2010	(r201842)
+++ projects/ngroups/lib/libc/gen/Symbol.map	Fri Jan  8 22:34:17 2010	(r201843)
@@ -236,16 +236,6 @@ FBSD_1.0 {
 	seekdir;
 	user_from_uid;
 	group_from_gid;
-	sem_init;
-	sem_destroy;
-	sem_open;
-	sem_close;
-	sem_unlink;
-	sem_wait;
-	sem_trywait;
-	sem_timedwait;
-	sem_post;
-	sem_getvalue;
 	setdomainname;
 	sethostname;
 	longjmperror;
@@ -363,11 +353,23 @@ FBSD_1.1 {
 	semctl;
 	tcgetsid;
 	tcsetsid;
+	__pthread_cleanup_pop_imp;
+	__pthread_cleanup_push_imp;
 };
 
 FBSD_1.2 {
 	basename_r;
 	getpagesizes;
+	sem_close;
+	sem_destroy;
+	sem_getvalue;
+	sem_init;
+	sem_open;
+	sem_timedwait;
+	sem_trywait;
+	sem_post;
+	sem_wait;
+	sem_unlink;
 };
 
 FBSDprivate_1.0 {
@@ -456,16 +458,6 @@ FBSDprivate_1.0 {
 	__pw_scan;	/* Used by (at least) libutil */
 	__raise;
 	_raise;
-	__sem_init;
-	__sem_destroy;
-	__sem_open;
-	__sem_close;
-	__sem_unlink;
-	__sem_wait;
-	__sem_trywait;
-	__sem_timedwait;
-	__sem_post;
-	__sem_getvalue;
 	__sleep;
 	_sleep;
 	_rtld_allocate_tls;
@@ -482,4 +474,15 @@ FBSDprivate_1.0 {
 	_wait;
 	__waitpid;
 	_waitpid;
+
+	_libc_sem_init_compat;
+	_libc_sem_destroy_compat;
+	_libc_sem_open_compat;
+	_libc_sem_close_compat;
+	_libc_sem_unlink_compat;
+	_libc_sem_wait_compat;
+	_libc_sem_trywait_compat;
+	_libc_sem_timedwait_compat;
+	_libc_sem_post_compat;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001082234.o08MYIu7012072>