svn commit: r251473 - in user/attilio/vmobj-readlock: . bin/sh bin/sleep contrib/bmake contrib/libgnuregex contrib/llvm/lib/CodeGen/AsmPrinter gnu/lib/libregex gnu/lib/libregex/posix gnu/usr.bin/di...

Attilio Rao attilio at FreeBSD.org
Thu Jun 6 18:30:37 UTC 2013


Author: attilio
Date: Thu Jun  6 18:30:33 2013
New Revision: 251473
URL: http://svnweb.freebsd.org/changeset/base/251473

Log:
  Merge from vmcontention

Added:
  user/attilio/vmobj-readlock/contrib/libgnuregex/
     - copied from r251472, user/attilio/vmcontention/contrib/libgnuregex/
  user/attilio/vmobj-readlock/tools/regression/bin/sh/builtins/wait10.0
     - copied unchanged from r251472, user/attilio/vmcontention/tools/regression/bin/sh/builtins/wait10.0
  user/attilio/vmobj-readlock/tools/regression/bin/sh/builtins/wait8.0
     - copied unchanged from r251472, user/attilio/vmcontention/tools/regression/bin/sh/builtins/wait8.0
  user/attilio/vmobj-readlock/tools/regression/bin/sh/builtins/wait9.127
     - copied unchanged from r251472, user/attilio/vmcontention/tools/regression/bin/sh/builtins/wait9.127
Deleted:
  user/attilio/vmobj-readlock/gnu/lib/libregex/FREEBSD-upgrade
  user/attilio/vmobj-readlock/gnu/lib/libregex/posix/
  user/attilio/vmobj-readlock/gnu/lib/libregex/regcomp.c
  user/attilio/vmobj-readlock/gnu/lib/libregex/regex.c
  user/attilio/vmobj-readlock/gnu/lib/libregex/regex_internal.c
  user/attilio/vmobj-readlock/gnu/lib/libregex/regex_internal.h
  user/attilio/vmobj-readlock/gnu/lib/libregex/regexec.c
Modified:
  user/attilio/vmobj-readlock/Makefile.inc1
  user/attilio/vmobj-readlock/bin/sh/jobs.c
  user/attilio/vmobj-readlock/bin/sh/sh.1
  user/attilio/vmobj-readlock/bin/sleep/sleep.c
  user/attilio/vmobj-readlock/contrib/bmake/ChangeLog
  user/attilio/vmobj-readlock/contrib/bmake/Makefile
  user/attilio/vmobj-readlock/contrib/bmake/job.c
  user/attilio/vmobj-readlock/contrib/bmake/make.1
  user/attilio/vmobj-readlock/contrib/bmake/var.c
  user/attilio/vmobj-readlock/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  user/attilio/vmobj-readlock/gnu/lib/libregex/Makefile
  user/attilio/vmobj-readlock/gnu/lib/libregex/config.h
  user/attilio/vmobj-readlock/gnu/lib/libregex/regex.h
  user/attilio/vmobj-readlock/gnu/usr.bin/diff/Makefile
  user/attilio/vmobj-readlock/gnu/usr.bin/grep/Makefile
  user/attilio/vmobj-readlock/lib/libc/arm/gen/_setjmp.S
  user/attilio/vmobj-readlock/lib/libc/arm/gen/setjmp.S
  user/attilio/vmobj-readlock/lib/msun/Makefile
  user/attilio/vmobj-readlock/lib/msun/src/catrig.c
  user/attilio/vmobj-readlock/lib/msun/src/catrigf.c
  user/attilio/vmobj-readlock/lib/msun/src/e_log2.c
  user/attilio/vmobj-readlock/share/misc/committers-src.dot
  user/attilio/vmobj-readlock/sys/compat/linprocfs/linprocfs.c
  user/attilio/vmobj-readlock/sys/dev/ath/ath_hal/ah.c
  user/attilio/vmobj-readlock/sys/dev/ath/ath_hal/ah.h
  user/attilio/vmobj-readlock/sys/dev/ath/ath_hal/ah_desc.h
  user/attilio/vmobj-readlock/sys/dev/ath/ath_hal/ah_internal.h
  user/attilio/vmobj-readlock/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
  user/attilio/vmobj-readlock/sys/dev/ath/ath_hal/ar9002/ar9285_phy.c
  user/attilio/vmobj-readlock/sys/dev/ath/if_ath.c
  user/attilio/vmobj-readlock/sys/dev/ath/if_ath_rx.c
  user/attilio/vmobj-readlock/sys/dev/ath/if_athvar.h
  user/attilio/vmobj-readlock/sys/dev/cxgbe/t4_main.c
  user/attilio/vmobj-readlock/sys/dev/drm2/i915/i915_gem.c
  user/attilio/vmobj-readlock/sys/dev/drm2/ttm/ttm_tt.c
  user/attilio/vmobj-readlock/sys/dev/filemon/filemon.c
  user/attilio/vmobj-readlock/sys/dev/hwpmc/hwpmc_mod.c
  user/attilio/vmobj-readlock/sys/dev/mps/mps.c
  user/attilio/vmobj-readlock/sys/dev/mps/mps_user.c
  user/attilio/vmobj-readlock/sys/dev/netmap/netmap.c
  user/attilio/vmobj-readlock/sys/dev/sym/sym_hipd.c
  user/attilio/vmobj-readlock/sys/fs/procfs/procfs_map.c
  user/attilio/vmobj-readlock/sys/fs/tmpfs/tmpfs_vnops.c
  user/attilio/vmobj-readlock/sys/kern/kern_cpuset.c
  user/attilio/vmobj-readlock/sys/kern/kern_exec.c
  user/attilio/vmobj-readlock/sys/kern/vfs_bio.c
  user/attilio/vmobj-readlock/sys/net/if.c
  user/attilio/vmobj-readlock/sys/security/mac/mac_process.c
  user/attilio/vmobj-readlock/sys/vm/swap_pager.c
  user/attilio/vmobj-readlock/sys/vm/vm_glue.c
  user/attilio/vmobj-readlock/sys/vm/vm_object.c
  user/attilio/vmobj-readlock/tools/tools/ath/athstats/athstats.c
  user/attilio/vmobj-readlock/tools/tools/netmap/pkt-gen.c
  user/attilio/vmobj-readlock/usr.bin/bmake/Makefile
  user/attilio/vmobj-readlock/usr.bin/grep/Makefile
  user/attilio/vmobj-readlock/usr.bin/xinstall/install.1
  user/attilio/vmobj-readlock/usr.sbin/bsdconfig/console/include/messages.subr
  user/attilio/vmobj-readlock/usr.sbin/bsdconfig/console/saver
  user/attilio/vmobj-readlock/usr.sbin/bsdconfig/mouse/include/messages.subr
  user/attilio/vmobj-readlock/usr.sbin/bsdconfig/security/include/messages.subr
  user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/include/messages.subr
  user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/rcconf
  user/attilio/vmobj-readlock/usr.sbin/bsdconfig/startup/share/rcconf.subr
  user/attilio/vmobj-readlock/usr.sbin/gssd/gssd.8
  user/attilio/vmobj-readlock/usr.sbin/gssd/gssd.c
  user/attilio/vmobj-readlock/usr.sbin/kldxref/ef.c
  user/attilio/vmobj-readlock/usr.sbin/kldxref/ef_amd64.c
  user/attilio/vmobj-readlock/usr.sbin/kldxref/ef_i386.c
  user/attilio/vmobj-readlock/usr.sbin/kldxref/ef_obj.c
  user/attilio/vmobj-readlock/usr.sbin/kldxref/kldxref.c
Directory Properties:
  user/attilio/vmobj-readlock/   (props changed)
  user/attilio/vmobj-readlock/contrib/binutils/   (props changed)
  user/attilio/vmobj-readlock/contrib/bmake/   (props changed)
  user/attilio/vmobj-readlock/contrib/llvm/   (props changed)
  user/attilio/vmobj-readlock/gnu/lib/   (props changed)
  user/attilio/vmobj-readlock/lib/libc/   (props changed)
  user/attilio/vmobj-readlock/sys/   (props changed)

Modified: user/attilio/vmobj-readlock/Makefile.inc1
==============================================================================
--- user/attilio/vmobj-readlock/Makefile.inc1	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/Makefile.inc1	Thu Jun  6 18:30:33 2013	(r251473)
@@ -798,7 +798,7 @@ distributeworld installworld: installche
 	    ${IMAKEENV} rm -rf ${INSTALLTMP}
 .if make(distributeworld)
 .for dist in ${EXTRA_DISTRIBUTIONS}
-	find ${DESTDIR}/${DISTDIR}/${dist} -empty -delete
+	find ${DESTDIR}/${DISTDIR}/${dist} -mindepth 1 -empty -delete
 .endfor
 .if defined(NO_ROOT)
 .for dist in base ${EXTRA_DISTRIBUTIONS}

Modified: user/attilio/vmobj-readlock/bin/sh/jobs.c
==============================================================================
--- user/attilio/vmobj-readlock/bin/sh/jobs.c	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/bin/sh/jobs.c	Thu Jun  6 18:30:33 2013	(r251473)
@@ -95,6 +95,8 @@ static int ttyfd = -1;
 static void restartjob(struct job *);
 #endif
 static void freejob(struct job *);
+static int waitcmdloop(struct job *);
+static struct job *getjob_nonotfound(char *);
 static struct job *getjob(char *);
 pid_t getjobpgrp(char *);
 static pid_t dowait(int, struct job *);
@@ -459,15 +461,29 @@ int
 waitcmd(int argc __unused, char **argv __unused)
 {
 	struct job *job;
-	int status, retval;
-	struct job *jp;
+	int retval;
 
 	nextopt("");
-	if (*argptr != NULL) {
-		job = getjob(*argptr);
-	} else {
-		job = NULL;
-	}
+	if (*argptr == NULL)
+		return (waitcmdloop(NULL));
+
+	do {
+		job = getjob_nonotfound(*argptr);
+		if (job == NULL)
+			retval = 127;
+		else
+			retval = waitcmdloop(job);
+		argptr++;
+	} while (*argptr != NULL);
+
+	return (retval);
+}
+
+static int
+waitcmdloop(struct job *job)
+{
+	int status, retval;
+	struct job *jp;
 
 	/*
 	 * Loop until a process is terminated or stopped, or a SIGINT is
@@ -546,7 +562,7 @@ jobidcmd(int argc __unused, char **argv)
  */
 
 static struct job *
-getjob(char *name)
+getjob_nonotfound(char *name)
 {
 	int jobno;
 	struct job *found, *jp;
@@ -611,12 +627,22 @@ currentjob:	if ((jp = getcurjob(NULL)) =
 				return jp;
 		}
 	}
-	error("No such job: %s", name);
-	/*NOTREACHED*/
 	return NULL;
 }
 
 
+static struct job *
+getjob(char *name)
+{
+	struct job *jp;
+
+	jp = getjob_nonotfound(name);
+	if (jp == NULL)
+		error("No such job: %s", name);
+	return (jp);
+}
+
+
 pid_t
 getjobpgrp(char *name)
 {

Modified: user/attilio/vmobj-readlock/bin/sh/sh.1
==============================================================================
--- user/attilio/vmobj-readlock/bin/sh/sh.1	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/bin/sh/sh.1	Thu Jun  6 18:30:33 2013	(r251473)
@@ -32,7 +32,7 @@
 .\"	from: @(#)sh.1	8.6 (Berkeley) 5/4/95
 .\" $FreeBSD$
 .\"
-.Dd May 3, 2013
+.Dd June 5, 2013
 .Dt SH 1
 .Os
 .Sh NAME
@@ -2642,12 +2642,17 @@ If the
 option is specified, the
 .Ar name
 arguments are treated as function names.
-.It Ic wait Op Ar job
-Wait for the specified
+.It Ic wait Op Ar job ...
+Wait for each specified
 .Ar job
 to complete and return the exit status of the last process in the
+last specified
 .Ar job .
-If the argument is omitted, wait for all jobs to complete
+If any
+.Ar job
+specified is unknown to the shell, it is treated as if it
+were a known job that exited with exit status 127.
+If no operands are given, wait for all jobs to complete
 and return an exit status of zero.
 .El
 .Ss Commandline Editing

Modified: user/attilio/vmobj-readlock/bin/sleep/sleep.c
==============================================================================
--- user/attilio/vmobj-readlock/bin/sleep/sleep.c	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/bin/sleep/sleep.c	Thu Jun  6 18:30:33 2013	(r251473)
@@ -82,6 +82,12 @@ main(int argc, char *argv[])
 	time_to_sleep.tv_nsec = 1e9 * (d - time_to_sleep.tv_sec);
 
 	signal(SIGINFO, report_request);
+
+	/*
+	 * Note: [EINTR] is supposed to happen only when a signal was handled
+	 * but the kernel also returns it when a ptrace-based debugger
+	 * attaches. This is a bug but it is hard to fix.
+	 */
 	while (nanosleep(&time_to_sleep, &time_to_sleep) != 0) {
 		if (report_requested) {
 			/* Reporting does not bother with nanoseconds. */

Modified: user/attilio/vmobj-readlock/contrib/bmake/ChangeLog
==============================================================================
--- user/attilio/vmobj-readlock/contrib/bmake/ChangeLog	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/contrib/bmake/ChangeLog	Thu Jun  6 18:30:33 2013	(r251473)
@@ -1,3 +1,16 @@
+2013-06-04  Simon J. Gerraty  <sjg at bad.crufty.net>
+
+	* Makefile (MAKE_VERSION): 20130604
+	  Merge with NetBSD make, pick up
+	  o job.c: JobCreatePipe: do fcntl() after any tweaking of fd's
+	    to avoid leaking descriptors.
+
+2013-05-28  Simon J. Gerraty  <sjg at bad.crufty.net>
+
+	* Makefile (MAKE_VERSION): 20130528
+	  Merge with NetBSD make, pick up
+	  o var.c: cleanup some left-overs in VarHash()
+
 2013-05-20  Simon J. Gerraty  <sjg at bad.crufty.net>
 
 	* Makefile (MAKE_VERSION): 20130520

Modified: user/attilio/vmobj-readlock/contrib/bmake/Makefile
==============================================================================
--- user/attilio/vmobj-readlock/contrib/bmake/Makefile	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/contrib/bmake/Makefile	Thu Jun  6 18:30:33 2013	(r251473)
@@ -1,7 +1,7 @@
-#	$Id: Makefile,v 1.12 2013/05/20 16:05:10 sjg Exp $
+#	$Id: Makefile,v 1.14 2013/06/05 04:03:22 sjg Exp $
 
 # Base version on src date
-MAKE_VERSION= 20130520
+MAKE_VERSION= 20130604
 
 PROG=	bmake
 

Modified: user/attilio/vmobj-readlock/contrib/bmake/job.c
==============================================================================
--- user/attilio/vmobj-readlock/contrib/bmake/job.c	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/contrib/bmake/job.c	Thu Jun  6 18:30:33 2013	(r251473)
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.172 2013/03/05 22:01:43 christos Exp $	*/
+/*	$NetBSD: job.c,v 1.173 2013/06/05 03:59:43 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.172 2013/03/05 22:01:43 christos Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.173 2013/06/05 03:59:43 sjg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)job.c	8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: job.c,v 1.172 2013/03/05 22:01:43 christos Exp $");
+__RCSID("$NetBSD: job.c,v 1.173 2013/06/05 03:59:43 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -414,6 +414,15 @@ JobCreatePipe(Job *job, int minfd)
     if (pipe(job->jobPipe) == -1)
 	Punt("Cannot create pipe: %s", strerror(errno));
 
+    for (i = 0; i < 2; i++) {
+       /* Avoid using low numbered fds */
+       fd = fcntl(job->jobPipe[i], F_DUPFD, minfd);
+       if (fd != -1) {
+	   close(job->jobPipe[i]);
+	   job->jobPipe[i] = fd;
+       }
+    }
+    
     /* Set close-on-exec flag for both */
     (void)fcntl(job->jobPipe[0], F_SETFD, 1);
     (void)fcntl(job->jobPipe[1], F_SETFD, 1);
@@ -426,15 +435,6 @@ JobCreatePipe(Job *job, int minfd)
      */
     fcntl(job->jobPipe[0], F_SETFL, 
 	fcntl(job->jobPipe[0], F_GETFL, 0) | O_NONBLOCK);
-
-    for (i = 0; i < 2; i++) {
-       /* Avoid using low numbered fds */
-       fd = fcntl(job->jobPipe[i], F_DUPFD, minfd);
-       if (fd != -1) {
-	   close(job->jobPipe[i]);
-	   job->jobPipe[i] = fd;
-       }
-    }
 }
 
 /*-
@@ -2828,6 +2828,8 @@ Job_ServerStart(int max_tokens, int jp_0
 	/* Pipe passed in from parent */
 	tokenWaitJob.inPipe = jp_0;
 	tokenWaitJob.outPipe = jp_1;
+	(void)fcntl(jp_0, F_SETFD, 1);
+	(void)fcntl(jp_1, F_SETFD, 1);
 	return;
     }
 

Modified: user/attilio/vmobj-readlock/contrib/bmake/make.1
==============================================================================
--- user/attilio/vmobj-readlock/contrib/bmake/make.1	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/contrib/bmake/make.1	Thu Jun  6 18:30:33 2013	(r251473)
@@ -1,4 +1,4 @@
-.\"	$NetBSD: make.1,v 1.213 2013/03/31 05:49:51 sjg Exp $
+.\"	$NetBSD: make.1,v 1.215 2013/05/22 19:35:11 christos Exp $
 .\"
 .\" Copyright (c) 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	from: @(#)make.1	8.4 (Berkeley) 3/19/94
 .\"
-.Dd March 30, 2013
+.Dd May 22, 2013
 .Dt MAKE 1
 .Os
 .Sh NAME
@@ -2110,6 +2110,13 @@ for Sprite at Berkeley.
 It was designed to be a parallel distributed make running jobs on different
 machines using a daemon called
 .Dq customs .
+.Pp
+Historically the target/dependency
+.Dq FRC
+has been used to FoRCe rebuilding (since the target/dependency
+does not exist... unless someone creates an 
+.Dq FRC
+file).
 .Sh BUGS
 The
 .Nm

Modified: user/attilio/vmobj-readlock/contrib/bmake/var.c
==============================================================================
--- user/attilio/vmobj-readlock/contrib/bmake/var.c	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/contrib/bmake/var.c	Thu Jun  6 18:30:33 2013	(r251473)
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.174 2013/05/18 13:12:45 sjg Exp $	*/
+/*	$NetBSD: var.c,v 1.175 2013/05/29 00:23:31 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.174 2013/05/18 13:12:45 sjg Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.175 2013/05/29 00:23:31 sjg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)var.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: var.c,v 1.174 2013/05/18 13:12:45 sjg Exp $");
+__RCSID("$NetBSD: var.c,v 1.175 2013/05/29 00:23:31 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -2326,9 +2326,7 @@ VarHash(char *str)
     size_t         len, len2;
     unsigned char  *ustr = (unsigned char *)str;
     uint32_t       h, k, c1, c2;
-    int            done;
 
-    done = 1;
     h  = 0x971e137bU;
     c1 = 0x95543787U;
     c2 = 0x2ad7eb25U;
@@ -2358,7 +2356,7 @@ VarHash(char *str)
 	h = (h << 13) ^ (h >> 19);
 	h = h * 5 + 0x52dce729U;
 	h ^= k;
-   } while (!done);
+   }
    h ^= len2;
    h *= 0x85ebca6b;
    h ^= h >> 13;

Modified: user/attilio/vmobj-readlock/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
==============================================================================
--- user/attilio/vmobj-readlock/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp	Thu Jun  6 18:30:33 2013	(r251473)
@@ -1538,9 +1538,37 @@ void DwarfDebug::beginFunction(const Mac
 }
 
 void DwarfDebug::addScopeVariable(LexicalScope *LS, DbgVariable *Var) {
-//  SmallVector<DbgVariable *, 8> &Vars = ScopeVariables.lookup(LS);
-  ScopeVariables[LS].push_back(Var);
-//  Vars.push_back(Var);
+  SmallVectorImpl<DbgVariable *> &Vars = ScopeVariables[LS];
+  DIVariable DV = Var->getVariable();
+  if (DV.getTag() == dwarf::DW_TAG_arg_variable) {
+    DISubprogram Ctxt(DV.getContext());
+    DIArray Variables = Ctxt.getVariables();
+    // If the variable is a parameter (arg_variable) and this is an optimized
+    // build (the subprogram has a 'variables' list) make sure we keep the
+    // parameters in order. Otherwise we would produce an incorrect function
+    // type with parameters out of order if function parameters were used out of
+    // order or unused (see the call to addScopeVariable in endFunction where
+    // the remaining unused variables (including parameters) are added).
+    if (unsigned NumVariables = Variables.getNumElements()) {
+      // Keep the parameters at the start of the variables list. Search through
+      // current variable list (Vars) and the full function variable list in
+      // lock-step looking for this parameter in the full list to find the
+      // insertion point.
+      SmallVectorImpl<DbgVariable *>::iterator I = Vars.begin();
+      unsigned j = 0;
+      while (I != Vars.end() && j != NumVariables &&
+             Variables.getElement(j) != DV &&
+             (*I)->getVariable().getTag() == dwarf::DW_TAG_arg_variable) {
+        if (Variables.getElement(j) == (*I)->getVariable())
+          ++I;
+        ++j;
+      }
+      Vars.insert(I, Var);
+      return;
+    }
+  }
+
+  Vars.push_back(Var);
 }
 
 // Gather and emit post-function debug information.

Modified: user/attilio/vmobj-readlock/gnu/lib/libregex/Makefile
==============================================================================
--- user/attilio/vmobj-readlock/gnu/lib/libregex/Makefile	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/gnu/lib/libregex/Makefile	Thu Jun  6 18:30:33 2013	(r251473)
@@ -5,16 +5,20 @@ SUBDIR=		doc
 LIB=		gnuregex
 SHLIB_MAJOR=	5
 
+REGEXDIR=	${.CURDIR}/../../../contrib/libgnuregex
+.PATH:		${REGEXDIR}
+
 SRCS=		gnuregex.c
 INCSGROUPS=	INCS WRINCS PXINCS
 INCS=		regex.h.patched
 INCSNAME=	regex.h
 INCSDIR=	${INCLUDEDIR}/gnu
 WRINCS=		gnuregex.h
-PXINCS=		posix/regex.h
+PXINCS=		${REGEXDIR}/regex.h
 PXINCSDIR=	${INCSDIR}/posix
 
-CFLAGS+=-DHAVE_CONFIG_H -I${.CURDIR}
+CFLAGS+=	-D__attribute_warn_unused_result__=""
+CFLAGS+=	-DHAVE_CONFIG_H -I${.CURDIR} -I${REGEXDIR}
 
 CLEANFILES=	regex.h.patched gnuregex.c
 regex.h.patched: regex.h

Modified: user/attilio/vmobj-readlock/gnu/lib/libregex/config.h
==============================================================================
--- user/attilio/vmobj-readlock/gnu/lib/libregex/config.h	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/gnu/lib/libregex/config.h	Thu Jun  6 18:30:33 2013	(r251473)
@@ -10,3 +10,6 @@
 #define	HAVE_WCRTOMB	1
 #define	HAVE_MBRTOWC	1
 #define	HAVE_WCSCOLL	1
+#define	HAVE_ALLOCA	1
+#define	HAVE_STDBOOL_H	1
+#define	HAVE_STDINT_H	1

Modified: user/attilio/vmobj-readlock/gnu/lib/libregex/regex.h
==============================================================================
--- user/attilio/vmobj-readlock/gnu/lib/libregex/regex.h	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/gnu/lib/libregex/regex.h	Thu Jun  6 18:30:33 2013	(r251473)
@@ -1,47 +1,54 @@
 /* $FreeBSD$ */
 #ifndef _REGEX_H
+
+#ifndef __USE_GNU
+#define	__USE_GNU
+#endif
+
 #include <posix/regex.h>
 
 /* Document internal interfaces.  */
-extern reg_syntax_t __re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
+extern reg_syntax_t __re_set_syntax (reg_syntax_t __syntax);
 
-extern const char *__re_compile_pattern
-  _RE_ARGS ((const char *pattern, size_t length,
-             struct re_pattern_buffer *buffer));
+extern const char *__re_compile_pattern (const char *__pattern, size_t __length,
+					struct re_pattern_buffer *__buffer);
 
-extern int __re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
+extern int __re_compile_fastmap (struct re_pattern_buffer *__buffer);
 
-extern int __re_search
-  _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
-            int length, int start, int range, struct re_registers *regs));
+extern int __re_search (struct re_pattern_buffer *__buffer, const char *__string,
+		       int __length, int __start, int __range,
+		       struct re_registers *__regs);
 
-extern int __re_search_2
-  _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
-             int length1, const char *string2, int length2,
-             int start, int range, struct re_registers *regs, int stop));
+extern int __re_search_2 (struct re_pattern_buffer *__buffer,
+			 const char *__string1, int __length1,
+			 const char *__string2, int __length2, int __start,
+			 int __range, struct re_registers *__regs, int __stop);
 
-extern int __re_match
-  _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
-             int length, int start, struct re_registers *regs));
+extern int __re_match (struct re_pattern_buffer *__buffer, const char *__string,
+		      int __length, int __start, struct re_registers *__regs);
 
-extern int __re_match_2
-  _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
-             int length1, const char *string2, int length2,
-             int start, struct re_registers *regs, int stop));
+extern int __re_match_2 (struct re_pattern_buffer *__buffer,
+			const char *__string1, int __length1,
+			const char *__string2, int __length2, int __start,
+			struct re_registers *__regs, int __stop);
 
-extern void __re_set_registers
-  _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
-             unsigned num_regs, regoff_t *starts, regoff_t *ends));
+extern void __re_set_registers (struct re_pattern_buffer *__buffer,
+			       struct re_registers *__regs,
+			       unsigned int __num_regs,
+			       regoff_t *__starts, regoff_t *__ends);
 
-extern int __regcomp _RE_ARGS ((regex_t *__preg, const char *__pattern,
-				int __cflags));
+extern int __regcomp (regex_t *__restrict __preg,
+		     const char *__restrict __pattern,
+		     int __cflags);
 
-extern int __regexec _RE_ARGS ((const regex_t *__preg,
-				const char *__string, size_t __nmatch,
-				regmatch_t __pmatch[], int __eflags));
+extern int __regexec (const regex_t *__restrict __preg,
+		     const char *__restrict __string, size_t __nmatch,
+		     regmatch_t __pmatch[__restrict_arr],
+		     int __eflags);
 
-extern size_t __regerror _RE_ARGS ((int __errcode, const regex_t *__preg,
-				    char *__errbuf, size_t __errbuf_size));
+extern size_t __regerror (int __errcode, const regex_t *__restrict __preg,
+			 char *__restrict __errbuf, size_t __errbuf_size);
 
-extern void __regfree _RE_ARGS ((regex_t *__preg));
-#endif
+extern void __regfree (regex_t *__preg);
+
+#endif	/* _REGEX_H */

Modified: user/attilio/vmobj-readlock/gnu/usr.bin/diff/Makefile
==============================================================================
--- user/attilio/vmobj-readlock/gnu/usr.bin/diff/Makefile	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/gnu/usr.bin/diff/Makefile	Thu Jun  6 18:30:33 2013	(r251473)
@@ -20,7 +20,7 @@ CFLAGS+=-DPR_PROGRAM=\"/usr/bin/pr\"
 CFLAGS+=-I${.CURDIR}/../../../contrib/diff
 CFLAGS+=-I${.CURDIR}/../../../contrib/diff/src
 CFLAGS+=-I${.CURDIR}/../../../contrib/diff/lib
-CFLAGS+=-I${.CURDIR}/../../lib/libregex
+CFLAGS+=-I${DESTDIR}/usr/include/gnu
 
 SUBDIR+=doc
 

Modified: user/attilio/vmobj-readlock/gnu/usr.bin/grep/Makefile
==============================================================================
--- user/attilio/vmobj-readlock/gnu/usr.bin/grep/Makefile	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/gnu/usr.bin/grep/Makefile	Thu Jun  6 18:30:33 2013	(r251473)
@@ -13,7 +13,7 @@ SRCS=	closeout.c dfa.c error.c exclude.c
 	isdir.c kwset.c obstack.c quotearg.c savedir.c search.c xmalloc.c \
 	xstrtoumax.c
 
-CFLAGS+=-I${.CURDIR} -I${.CURDIR}/../../lib/libregex -DHAVE_CONFIG_H
+CFLAGS+=-I${.CURDIR} -I${DESTDIR}/usr/include/gnu -DHAVE_CONFIG_H
 
 .if ${MK_BSD_GREP} != "yes"
 LINKS+=	${BINDIR}/grep ${BINDIR}/egrep \

Modified: user/attilio/vmobj-readlock/lib/libc/arm/gen/_setjmp.S
==============================================================================
--- user/attilio/vmobj-readlock/lib/libc/arm/gen/_setjmp.S	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/lib/libc/arm/gen/_setjmp.S	Thu Jun  6 18:30:33 2013	(r251473)
@@ -1,4 +1,4 @@
-/*	$NetBSD: _setjmp.S,v 1.5 2003/04/05 23:08:51 bjh21 Exp $	*/
+/*	$NetBSD: _setjmp.S,v 1.12 2013/04/19 13:45:45 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Mark Brinicombe
@@ -32,7 +32,17 @@
  * SUCH DAMAGE.
  */
 
+#if !defined(__SOFTFP__) && !defined(__VFP_FP__) && !defined(__ARM_PCS)
+#error FPA is not supported anymore
+#endif
+
+#ifdef __ARM_EABI__
+	.fpu	vfp
+#endif
+
 #include <machine/asm.h>
+#include <machine/setjmp.h>
+
 __FBSDID("$FreeBSD$");
 
 /*
@@ -45,21 +55,15 @@ __FBSDID("$FreeBSD$");
  * The previous signal state is NOT restored.
  *
  * Note: r0 is the return value
- *       r1-r3 are scratch registers in functions
+ *       r1-r3,ip are scratch registers in functions
  */
 
 ENTRY(_setjmp)
 	ldr	r1, .L_setjmp_magic
-	str	r1, [r0], #4
-#ifdef __SOFTFP__
-	add	r0, r0, #52
-#else
-	/* Store fp registers */
-	sfm	f4, 4, [r0], #48
-	/* Store fpsr */
-	rfs	r1
-	str	r1, [r0], #0x0004
-#endif	/* __SOFTFP__ */
+
+	str	r1, [r0]
+
+	add	r0, r0, #(_JB_REG_R4 * 4)
 	/* Store integer registers */
         stmia	r0, {r4-r14}
 
@@ -71,20 +75,12 @@ ENTRY(_setjmp)
 
 WEAK_ALIAS(___longjmp, _longjmp)
 ENTRY(_longjmp)
-	ldr	r2, .L_setjmp_magic
-	ldr	r3, [r0], #4
-	teq	r2, r3
-	bne	botch
+	ldr	r2, [r0]			/* get magic from jmp_buf */
+	ldr	ip, .L_setjmp_magic		/* load magic */
+	teq	ip, r2				/* magic correct? */
+	bne	botch				/*   no, botch */
 
-#ifdef __SOFTFP__
-	add	r0, r0, #52
-#else
-	/* Restore fp registers */
-	lfm	f4, 4, [r0], #48
-	/* Restore fpsr */
-	ldr	r4, [r0], #0x0004
-	wfs	r4
-#endif	/* __SOFTFP__ */
+	add	r0, r0, #(_JB_REG_R4 * 4)
        	/* Restore integer registers */
         ldmia	r0, {r4-r14}
 
@@ -94,8 +90,7 @@ ENTRY(_longjmp)
 	beq	botch
 
 	/* Set return value */
-	mov	r0, r1
-	teq	r0, #0x00000000
+	movs	r0, r1
 	moveq	r0, #0x00000001
 	RET
 

Modified: user/attilio/vmobj-readlock/lib/libc/arm/gen/setjmp.S
==============================================================================
--- user/attilio/vmobj-readlock/lib/libc/arm/gen/setjmp.S	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/lib/libc/arm/gen/setjmp.S	Thu Jun  6 18:30:33 2013	(r251473)
@@ -1,4 +1,4 @@
-/*	$NetBSD: setjmp.S,v 1.5 2003/04/05 23:08:51 bjh21 Exp $	*/
+/*	$NetBSD: setjmp.S,v 1.14 2013/04/19 13:45:45 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Mark Brinicombe
@@ -32,8 +32,15 @@
  * SUCH DAMAGE.
  */
 
+#if !defined(__SOFTFP__) && !defined(__VFP_FP__) && !defined(__ARM_PCS)
+#error FPA is not supported anymore
+#endif
+
 #include <machine/asm.h>
+#include <machine/setjmp.h>
+
 __FBSDID("$FreeBSD$");
+
 /*
  * C library -- setjmp, longjmp
  *
@@ -47,27 +54,17 @@ __FBSDID("$FreeBSD$");
 ENTRY(setjmp)
 	/* Block all signals and retrieve the old signal mask */
 	stmfd	sp!, {r0, r14}
-	add	r2, r0, #(25 * 4) /* oset */
-	mov	r0, #0x00000001 /* SIG_BLOCK */
-	mov	r1, #0 /* set */
-
+	add	r2, r0, #(_JB_SIGMASK * 4)	/* oset */
+	mov	r1, #0x00000000			/* set */
+	mov	r0, #0x00000001			/* SIG_BLOCK */
 	bl	PIC_SYM(_C_LABEL(sigprocmask), PLT)
-
 	ldmfd	sp!, {r0, r14}
 
 	ldr	r1, .Lsetjmp_magic
-	str	r1, [r0], #4
+	str	r1, [r0]		/* store magic */
 
-#ifdef __SOFTFP__
-	add	r0, r0, #52
-#else
-	/* Store fp registers */
-	sfm	f4, 4, [r0], #48
-	/* Store fpsr */
-	rfs	r1
-	str	r1, [r0], #0x0004
-#endif	/* __SOFTFP__ */
 	/* Store integer registers */
+	add	r0, r0, #(_JB_REG_R4 * 4)
         stmia	r0, {r4-r14}
         mov	r0, #0x00000000
 	RET
@@ -79,51 +76,35 @@ ENTRY(setjmp)
 .weak _C_LABEL(longjmp)
 .set _C_LABEL(longjmp), _C_LABEL(__longjmp)
 ENTRY(__longjmp)
-	ldr	r2, .Lsetjmp_magic
-	ldr	r3, [r0]
-	teq	r2, r3
-	bne	botch
-
-
-	/* Set signal mask */
-	stmfd	sp!, {r0, r1, r14}
-	sub	sp, sp, #4	/* align the stack */
-
-	add	r1, r0, #(25 * 4) /* Signal mask */
-	mov	r0, #3 /* SIG_SETMASK */
-	mov	r2, #0
+	ldr	r2, [r0]
+	ldr	ip, .Lsetjmp_magic
+	teq	r2, ip
+	bne	.Lbotch
+
+	/* Restore the signal mask. */
+	stmfd	sp!, {r0-r2, r14}
+	mov	r2, #0x00000000
+	add	r1, r0, #(_JB_SIGMASK * 4)	/* Signal mask */
+	mov	r0, #3				/* SIG_SETMASK */
 	bl	PIC_SYM(_C_LABEL(sigprocmask), PLT)
+	ldmfd	sp!, {r0-r2, r14}
 
-	add	sp, sp, #4	/* unalign the stack */
-	ldmfd	sp!, {r0, r1, r14} 
-
-	add	r0, r0, #4
-#ifdef __SOFTFP__
-	add	r0, r0, #52
-#else
-	/* Restore fp registers */
-	lfm	f4, 4, [r0], #48
-	/* Restore FPSR */
-	ldr	r4, [r0], #0x0004
-	wfs	r4
-#endif	/* __SOFTFP__ */
+	add	r0, r0, #(_JB_REG_R4 * 4)
 	/* Restore integer registers */
         ldmia	r0, {r4-r14}
 
 	/* Validate sp and r14 */
 	teq	sp, #0
 	teqne	r14, #0
-	beq	botch
+	beq	.Lbotch
 
 	/* Set return value */
-
-	mov	r0, r1
-	teq	r0, #0x00000000
+	movs	r0, r1
 	moveq	r0, #0x00000001
 	RET
 
 	/* validation failed, die die die. */
-botch:
+.Lbotch:
 	bl	PIC_SYM(_C_LABEL(longjmperror), PLT)
 	bl	PIC_SYM(_C_LABEL(abort), PLT)
 	b	. - 8		/* Cannot get here */

Modified: user/attilio/vmobj-readlock/lib/msun/Makefile
==============================================================================
--- user/attilio/vmobj-readlock/lib/msun/Makefile	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/lib/msun/Makefile	Thu Jun  6 18:30:33 2013	(r251473)
@@ -21,6 +21,10 @@ ARCH_SUBDIR= ${MACHINE_CPUARCH}
 .include "${ARCH_SUBDIR}/Makefile.inc"
 
 .PATH:	${.CURDIR}/${ARCH_SUBDIR}
+.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
+.PATH:	${.CURDIR}/x86
+CFLAGS+=	-I${.CURDIR}/x86
+.endif
 
 # long double format
 .if ${LDBL_PREC} == 64
@@ -35,10 +39,6 @@ CFLAGS+=	-I${.CURDIR}/ld128
 .PATH:	${.CURDIR}/src
 .PATH:	${.CURDIR}/man
 
-.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
-.PATH:	${.CURDIR}/x86
-.endif
-
 LIB=	m
 SHLIBDIR?= /lib
 SHLIB_MAJOR= 5
@@ -187,8 +187,9 @@ MLINKS+=j0.3 j1.3 j0.3 jn.3 j0.3 y0.3 j0
 MLINKS+=j0.3 j0f.3 j0.3 j1f.3 j0.3 jnf.3 j0.3 y0f.3 j0.3 ynf.3
 MLINKS+=lgamma.3 gamma.3 lgamma.3 gammaf.3 lgamma.3 lgammaf.3 \
 	lgamma.3 tgamma.3 lgamma.3 tgammaf.3
-MLINKS+=log.3 log10.3 log.3 log10f.3 log.3 log10l.3 log.3 \
-	log1p.3 log.3 log1pf.3 log.3 log1pl.3 log.3 logf.3 log.3 logl.3 \
+MLINKS+=log.3 log10.3 log.3 log10f.3 log.3 log10l.3 \
+	log.3 log1p.3 log.3 log1pf.3 log.3 log1pl.3 \
+	log.3 logf.3 log.3 logl.3 \
 	log.3 log2.3 log.3 log2f.3 log.3 log2l.3
 MLINKS+=lrint.3 llrint.3 lrint.3 llrintf.3 lrint.3 llrintl.3 \
 	lrint.3 lrintf.3 lrint.3 lrintl.3

Modified: user/attilio/vmobj-readlock/lib/msun/src/catrig.c
==============================================================================
--- user/attilio/vmobj-readlock/lib/msun/src/catrig.c	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/lib/msun/src/catrig.c	Thu Jun  6 18:30:33 2013	(r251473)
@@ -151,13 +151,13 @@ f(double a, double b, double hypot_a_b)
  */
 static inline void
 do_hard_work(double x, double y, double *rx, int *B_is_usable, double *B,
-	     double *sqrt_A2my2, double *new_y)
+    double *sqrt_A2my2, double *new_y)
 {
 	double R, S, A; /* A, B, R, and S are as in Hull et al. */
 	double Am1, Amy; /* A-1, A-y. */
 
-	R = hypot(x, y + 1); /* |z+I| */
-	S = hypot(x, y - 1); /* |z-I| */
+	R = hypot(x, y + 1);		/* |z+I| */
+	S = hypot(x, y - 1);		/* |z-I| */
 
 	/* A = (|z+I| + |z-I|) / 2 */
 	A = (R + S) / 2;
@@ -174,7 +174,7 @@ do_hard_work(double x, double y, double 
 		 * Am1 = fp + fm, where fp = f(x, 1+y), and fm = f(x, 1-y).
 		 * rx = log1p(Am1 + sqrt(Am1*(A+1)))
 		 */
-		if (y == 1 && x < DBL_EPSILON*DBL_EPSILON / 128) {
+		if (y == 1 && x < DBL_EPSILON * DBL_EPSILON / 128) {
 			/*
 			 * fp is of order x^2, and fm = x/2.
 			 * A = 1 (inexactly).
@@ -193,7 +193,7 @@ do_hard_work(double x, double y, double 
 			 * A = 1 (inexactly).
 			 */
 			*rx = x / sqrt((1 - y) * (1 + y));
-		} else /* if (y > 1) */ {
+		} else {		/* if (y > 1) */
 			/*
 			 * A-1 = y-1 (inexactly).
 			 */
@@ -251,9 +251,9 @@ do_hard_work(double x, double y, double 
 			 * scaling should avoid any underflow problems.
 			 */
 			*sqrt_A2my2 = x * (4 / DBL_EPSILON / DBL_EPSILON) * y /
-				sqrt((y + 1) * (y - 1));
+			    sqrt((y + 1) * (y - 1));
 			*new_y = y * (4 / DBL_EPSILON / DBL_EPSILON);
-		} else /* if (y < 1) */ {
+		} else {		/* if (y < 1) */
 			/*
 			 * fm = 1-y >= DBL_EPSILON, fp is of order x^2, and
 			 * A = 1 (inexactly).
@@ -298,7 +298,6 @@ casinh(double complex z)
 		 * C99 leaves it optional whether to raise invalid if one of
 		 * the arguments is not NaN, so we opt not to raise it.
 		 */
-		/* Bruce Evans tells me this is the way to do this: */
 		return (cpack(x + 0.0L + (y + 0), x + 0.0L + (y + 0)));
 	}
 
@@ -337,6 +336,7 @@ double complex
 casin(double complex z)
 {
 	double complex w = casinh(cpack(cimag(z), creal(z)));
+
 	return (cpack(cimag(w), creal(w)));
 }
 
@@ -402,17 +402,17 @@ cacos(double complex z)
 	/* All remaining cases are inexact. */
 	raise_inexact();
 
-	if (ax < SQRT_6_EPSILON / 4 && ay < SQRT_6_EPSILON/4)
+	if (ax < SQRT_6_EPSILON / 4 && ay < SQRT_6_EPSILON / 4)
 		return (cpack(pio2_hi - (x - pio2_lo), -y));
 
 	do_hard_work(ay, ax, &ry, &B_is_usable, &B, &sqrt_A2mx2, &new_x);
 	if (B_is_usable) {
-		if (sx==0)
+		if (sx == 0)
 			rx = acos(B);
 		else
 			rx = acos(-B);
 	} else {
-		if (sx==0)
+		if (sx == 0)
 			rx = atan2(sqrt_A2mx2, new_x);
 		else
 			rx = atan2(sqrt_A2mx2, -new_x);
@@ -488,10 +488,6 @@ clog_for_large_values(double complex z)
 }
 
 /*
- *=============================================================================
- */
-
-/*
  *				=================
  *				| catanh, catan |
  *				=================
@@ -511,6 +507,7 @@ sum_squares(double x, double y)
 	/* Avoid underflow when y is small. */
 	if (y < SQRT_MIN)
 		return (x * x);
+
 	return (x * x + y * y);
 }
 
@@ -578,7 +575,7 @@ catanh(double complex z)
 
 	/* This helps handle many cases. */
 	if (y == 0 && ax <= 1)
-		return (cpack(atanh(x), y)); 
+		return (cpack(atanh(x), y));
 
 	/* To ensure the same accuracy as atan(), and to filter out z = 0. */
 	if (x == 0)
@@ -589,10 +586,9 @@ catanh(double complex z)
 		if (isinf(x))
 			return (cpack(copysign(0, x), y + y));
 		/* catanh(NaN + I*+-Inf) = sign(NaN)0 + I*+-PI/2 */
-		if (isinf(y)) {
+		if (isinf(y))
 			return (cpack(copysign(0, x),
-				      copysign(pio2_hi + pio2_lo, y)));
-		}
+			    copysign(pio2_hi + pio2_lo, y)));
 		/*
 		 * All other cases involving NaN return NaN + I*NaN.
 		 * C99 leaves it optional whether to raise invalid if one of
@@ -601,10 +597,9 @@ catanh(double complex z)
 		return (cpack(x + 0.0L + (y + 0), x + 0.0L + (y + 0)));
 	}
 
-	if (ax > RECIP_EPSILON || ay > RECIP_EPSILON) {
+	if (ax > RECIP_EPSILON || ay > RECIP_EPSILON)
 		return (cpack(real_part_reciprocal(x, y),
-			      copysign(pio2_hi + pio2_lo, y)));
-	}
+		    copysign(pio2_hi + pio2_lo, y)));
 
 	if (ax < SQRT_3_EPSILON / 2 && ay < SQRT_3_EPSILON / 2) {
 		/*
@@ -617,7 +612,7 @@ catanh(double complex z)
 	}
 
 	if (ax == 1 && ay < DBL_EPSILON)
-		rx = (log(ay) - m_ln2) / -2;
+		rx = (m_ln2 - log(ay)) / 2;
 	else
 		rx = log1p(4 * ax / sum_squares(ax - 1, ay)) / 4;
 
@@ -639,5 +634,6 @@ double complex
 catan(double complex z)
 {
 	double complex w = catanh(cpack(cimag(z), creal(z)));
+
 	return (cpack(cimag(w), creal(w)));
 }

Modified: user/attilio/vmobj-readlock/lib/msun/src/catrigf.c
==============================================================================
--- user/attilio/vmobj-readlock/lib/msun/src/catrigf.c	Thu Jun  6 18:25:48 2013	(r251472)
+++ user/attilio/vmobj-readlock/lib/msun/src/catrigf.c	Thu Jun  6 18:30:33 2013	(r251473)
@@ -31,7 +31,11 @@
  * Mathematical Software, Volume 23 Issue 3, 1997, Pages 299-335,
  * http://dl.acm.org/citation.cfm?id=275324.
  *
- * The code for catrig.c contains complete comments.
+ * See catrig.c for complete comments.
+ *
+ * XXX comments were removed automatically, and even short ones on the right
+ * of statements were removed (all of them), contrary to normal style.  Only
+ * a few comments on the right of declarations remain.
  */
 
 #include <sys/cdefs.h>
@@ -82,7 +86,7 @@ f(float a, float b, float hypot_a_b)
 
 static inline void
 do_hard_work(float x, float y, float *rx, int *B_is_usable, float *B,
-	     float *sqrt_A2my2, float *new_y)
+    float *sqrt_A2my2, float *new_y)
 {
 	float R, S, A;
 	float Am1, Amy;
@@ -101,7 +105,7 @@ do_hard_work(float x, float y, float *rx
 			Am1 = f(x, 1 + y, R) + f(x, 1 - y, S);
 			*rx = log1pf(Am1 + sqrtf(Am1 * (A + 1)));
 		} else if (y < 1) {
-			*rx = x / sqrtf((1 - y)*(1 + y));
+			*rx = x / sqrtf((1 - y) * (1 + y));
 		} else {
 			*rx = log1pf((y - 1) + sqrtf((y - 1) * (y + 1)));
 		}
@@ -130,7 +134,7 @@ do_hard_work(float x, float y, float *rx
 			*sqrt_A2my2 = sqrtf(Amy * (A + y));
 		} else if (y > 1) {
 			*sqrt_A2my2 = x * (4 / FLT_EPSILON / FLT_EPSILON) * y /
-				sqrtf((y + 1) * (y - 1));
+			    sqrtf((y + 1) * (y - 1));
 			*new_y = y * (4 / FLT_EPSILON / FLT_EPSILON);
 		} else {
 			*sqrt_A2my2 = sqrtf((1 - y) * (1 + y));
@@ -166,7 +170,7 @@ casinhf(float complex z)
 		else
 			w = clog_for_large_values(-z) + m_ln2;
 		return (cpackf(copysignf(crealf(w), x),
-			       copysignf(cimagf(w), y)));
+		    copysignf(cimagf(w), y)));
 	}
 
 	if (x == 0 && y == 0)
@@ -189,6 +193,7 @@ float complex
 casinf(float complex z)
 {
 	float complex w = casinhf(cpackf(cimagf(z), crealf(z)));
+
 	return (cpackf(cimagf(w), crealf(w)));
 }
 
@@ -212,7 +217,8 @@ cacosf(float complex z)
 			return (cpackf(y + y, -INFINITY));
 		if (isinf(y))
 			return (cpackf(x + x, -y));
-		if (x == 0) return (cpackf(pio2_hi + pio2_lo, y + y));
+		if (x == 0)
+			return (cpackf(pio2_hi + pio2_lo, y + y));
 		return (cpackf(x + 0.0L + (y + 0), x + 0.0L + (y + 0)));
 	}
 
@@ -235,17 +241,17 @@ cacosf(float complex z)
 
 	do_hard_work(ay, ax, &ry, &B_is_usable, &B, &sqrt_A2mx2, &new_x);
 	if (B_is_usable) {
-		if (sx==0)
+		if (sx == 0)
 			rx = acosf(B);
 		else
 			rx = acosf(-B);
 	} else {
-		if (sx==0)
+		if (sx == 0)
 			rx = atan2f(sqrt_A2mx2, new_x);
 		else
 			rx = atan2f(sqrt_A2mx2, -new_x);
 	}
-	if (sy==0)
+	if (sy == 0)
 		ry = -ry;
 	return (cpackf(rx, ry));
 }
@@ -284,10 +290,9 @@ clog_for_large_values(float complex z)
 		ay = t;
 	}
 
-	if (ax > FLT_MAX / 2) {
+	if (ax > FLT_MAX / 2)

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


More information about the svn-src-user mailing list