PERFORCE change 146765 for review
Ed Schouten
ed at FreeBSD.org
Wed Aug 6 11:31:25 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=146765
Change 146765 by ed at ed_flippo on 2008/08/06 11:30:29
IFC.
Affected files ...
.. //depot/projects/mpsafetty/bin/echo/echo.c#2 integrate
.. //depot/projects/mpsafetty/bin/sh/mknodes.c#2 integrate
.. //depot/projects/mpsafetty/bin/stty/gfmt.c#2 integrate
.. //depot/projects/mpsafetty/contrib/ipfilter/ip_fil.c#3 integrate
.. //depot/projects/mpsafetty/etc/rc.firewall#3 integrate
.. //depot/projects/mpsafetty/lib/libarchive/archive_private.h#2 integrate
.. //depot/projects/mpsafetty/lib/libc/gen/arc4random.c#4 integrate
.. //depot/projects/mpsafetty/lib/libc/gen/getbsize.c#2 integrate
.. //depot/projects/mpsafetty/lib/libc/stdio/vfwprintf.c#2 integrate
.. //depot/projects/mpsafetty/lib/libc/stdlib/getenv.c#3 integrate
.. //depot/projects/mpsafetty/lib/libc/sys/jail.2#2 integrate
.. //depot/projects/mpsafetty/lib/libc/sys/socket.2#2 integrate
.. //depot/projects/mpsafetty/lib/libthread_db/Makefile#3 integrate
.. //depot/projects/mpsafetty/lib/libthread_db/arch/arm/libpthread_md.c#3 integrate
.. //depot/projects/mpsafetty/lib/libthread_db/arch/ia64/libpthread_md.c#3 integrate
.. //depot/projects/mpsafetty/lib/libthread_db/arch/powerpc/libpthread_md.c#3 integrate
.. //depot/projects/mpsafetty/lib/libthread_db/arch/sparc64/libpthread_md.c#3 integrate
.. //depot/projects/mpsafetty/lib/libthread_db/libpthread_db.c#4 integrate
.. //depot/projects/mpsafetty/lib/libthread_db/libthr_db.c#3 integrate
.. //depot/projects/mpsafetty/lib/msun/src/e_acosf.c#3 integrate
.. //depot/projects/mpsafetty/lib/msun/src/e_asin.c#3 integrate
.. //depot/projects/mpsafetty/lib/msun/src/e_asinf.c#3 integrate
.. //depot/projects/mpsafetty/lib/msun/src/e_asinl.c#2 integrate
.. //depot/projects/mpsafetty/lib/msun/src/e_atan2f.c#4 integrate
.. //depot/projects/mpsafetty/libexec/fingerd/fingerd.c#2 integrate
.. //depot/projects/mpsafetty/sbin/ddb/ddb.8#2 integrate
.. //depot/projects/mpsafetty/share/man/man4/ddb.4#5 integrate
.. //depot/projects/mpsafetty/share/man/man4/if_bridge.4#2 integrate
.. //depot/projects/mpsafetty/share/man/man4/textdump.4#2 integrate
.. //depot/projects/mpsafetty/sys/amd64/amd64/pmap.c#9 integrate
.. //depot/projects/mpsafetty/sys/amd64/include/pmap.h#4 integrate
.. //depot/projects/mpsafetty/sys/arm/arm/db_interface.c#3 integrate
.. //depot/projects/mpsafetty/sys/arm/arm/elf_trampoline.c#2 integrate
.. //depot/projects/mpsafetty/sys/arm/arm/intr.c#2 integrate
.. //depot/projects/mpsafetty/sys/arm/arm/vm_machdep.c#2 integrate
.. //depot/projects/mpsafetty/sys/arm/at91/at91_twi.c#2 integrate
.. //depot/projects/mpsafetty/sys/arm/include/db_machdep.h#3 integrate
.. //depot/projects/mpsafetty/sys/arm/xscale/ixp425/ixp425_iic.c#2 integrate
.. //depot/projects/mpsafetty/sys/boot/common/misc.c#2 integrate
.. //depot/projects/mpsafetty/sys/boot/forth/loader.conf#3 integrate
.. //depot/projects/mpsafetty/sys/boot/i386/libi386/devicename.c#2 integrate
.. //depot/projects/mpsafetty/sys/conf/Makefile.arm#2 integrate
.. //depot/projects/mpsafetty/sys/contrib/pf/net/pf.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/acpica/acpi.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/bktr/bktr_i2c.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/iicbus/ad7418.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/iicbus/ds1339.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/iicbus/icee.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/iicbus/if_ic.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/iicbus/iic.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/iicbus/iicbb.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/iicbus/iicbus.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/iicbus/iicbus.h#2 integrate
.. //depot/projects/mpsafetty/sys/dev/iicbus/iiconf.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/iicbus/iicsmb.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/mii/rgephy.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/pccard/pccard.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/pccard/pccardvar.h#2 integrate
.. //depot/projects/mpsafetty/sys/dev/pcf/envctrl.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/pcf/pcf.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/pcf/pcf_ebus.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/pcf/pcf_isa.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/pcf/pcfvar.h#2 integrate
.. //depot/projects/mpsafetty/sys/dev/pci/pci.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/ppbus/lpbb.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/re/if_re.c#3 integrate
.. //depot/projects/mpsafetty/sys/dev/snc/dp83932.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/snc/dp83932var.h#2 integrate
.. //depot/projects/mpsafetty/sys/dev/snc/if_snc.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/snc/if_snc_cbus.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/snc/if_snc_pccard.c#2 integrate
.. //depot/projects/mpsafetty/sys/dev/syscons/syscons.c#2 integrate
.. //depot/projects/mpsafetty/sys/i386/i386/pmap.c#4 integrate
.. //depot/projects/mpsafetty/sys/i386/include/pmap.h#2 integrate
.. //depot/projects/mpsafetty/sys/kern/kern_condvar.c#2 integrate
.. //depot/projects/mpsafetty/sys/kern/kern_kthread.c#2 integrate
.. //depot/projects/mpsafetty/sys/kern/kern_lock.c#3 integrate
.. //depot/projects/mpsafetty/sys/kern/kern_sig.c#2 integrate
.. //depot/projects/mpsafetty/sys/kern/kern_sx.c#2 integrate
.. //depot/projects/mpsafetty/sys/kern/kern_synch.c#3 integrate
.. //depot/projects/mpsafetty/sys/kern/kern_thread.c#2 integrate
.. //depot/projects/mpsafetty/sys/kern/link_elf.c#4 integrate
.. //depot/projects/mpsafetty/sys/kern/link_elf_obj.c#4 integrate
.. //depot/projects/mpsafetty/sys/kern/subr_sleepqueue.c#3 integrate
.. //depot/projects/mpsafetty/sys/kern/vfs_vnops.c#2 integrate
.. //depot/projects/mpsafetty/sys/mips/mips/machdep.c#2 integrate
.. //depot/projects/mpsafetty/sys/mips/mips/tick.c#2 integrate
.. //depot/projects/mpsafetty/sys/netinet/tcp_syncache.c#4 integrate
.. //depot/projects/mpsafetty/sys/netipsec/key.c#2 integrate
.. //depot/projects/mpsafetty/sys/pci/if_rlreg.h#3 integrate
.. //depot/projects/mpsafetty/sys/pci/viapm.c#2 integrate
.. //depot/projects/mpsafetty/sys/sys/proc.h#4 integrate
.. //depot/projects/mpsafetty/sys/sys/sleepqueue.h#2 integrate
.. //depot/projects/mpsafetty/sys/ufs/ufs/quota.h#2 integrate
.. //depot/projects/mpsafetty/sys/ufs/ufs/ufs_quota.c#2 integrate
.. //depot/projects/mpsafetty/sys/ufs/ufs/ufsmount.h#2 integrate
.. //depot/projects/mpsafetty/sys/vm/vm_glue.c#2 integrate
.. //depot/projects/mpsafetty/sys/vm/vm_mmap.c#2 integrate
.. //depot/projects/mpsafetty/sys/vm/vm_object.c#3 integrate
.. //depot/projects/mpsafetty/sys/vm/vm_pageout.c#2 integrate
.. //depot/projects/mpsafetty/sys/vm/vm_zeroidle.c#2 integrate
.. //depot/projects/mpsafetty/usr.bin/calendar/calendar.c#2 integrate
.. //depot/projects/mpsafetty/usr.bin/calendar/calendar.h#2 integrate
.. //depot/projects/mpsafetty/usr.bin/calendar/day.c#2 integrate
.. //depot/projects/mpsafetty/usr.bin/calendar/io.c#2 integrate
.. //depot/projects/mpsafetty/usr.bin/calendar/ostern.c#2 integrate
.. //depot/projects/mpsafetty/usr.bin/calendar/paskha.c#2 integrate
.. //depot/projects/mpsafetty/usr.bin/cpio/cpio.h#3 integrate
.. //depot/projects/mpsafetty/usr.bin/gzip/gzip.c#3 integrate
.. //depot/projects/mpsafetty/usr.bin/lex/flex.skl#2 integrate
.. //depot/projects/mpsafetty/usr.bin/quota/quota.c#2 integrate
.. //depot/projects/mpsafetty/usr.bin/rs/rs.c#2 integrate
.. //depot/projects/mpsafetty/usr.bin/tar/bsdtar.h#2 integrate
.. //depot/projects/mpsafetty/usr.bin/truncate/truncate.c#2 integrate
.. //depot/projects/mpsafetty/usr.bin/yacc/closure.c#2 integrate
.. //depot/projects/mpsafetty/usr.bin/yacc/defs.h#2 integrate
.. //depot/projects/mpsafetty/usr.sbin/Makefile#3 integrate
.. //depot/projects/mpsafetty/usr.sbin/crashinfo/Makefile#1 branch
.. //depot/projects/mpsafetty/usr.sbin/crashinfo/crashinfo.8#1 branch
.. //depot/projects/mpsafetty/usr.sbin/crashinfo/crashinfo.sh#1 branch
Differences ...
==== //depot/projects/mpsafetty/bin/echo/echo.c#2 (text+ko) ====
@@ -39,7 +39,7 @@
#endif /* not lint */
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/echo/echo.c,v 1.18 2005/01/10 08:39:22 imp Exp $");
+__FBSDID("$FreeBSD: src/bin/echo/echo.c,v 1.19 2008/08/04 01:25:48 cperciva Exp $");
#include <sys/types.h>
#include <sys/uio.h>
@@ -55,7 +55,7 @@
* Report an error and exit.
* Use it instead of err(3) to avoid linking-in stdio.
*/
-static void
+static __dead2 void
errexit(const char *prog, const char *reason)
{
char *errstr = strerror(errno);
==== //depot/projects/mpsafetty/bin/sh/mknodes.c#2 (text+ko) ====
@@ -42,7 +42,7 @@
#endif /* not lint */
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/sh/mknodes.c,v 1.17 2004/04/06 20:06:51 markm Exp $");
+__FBSDID("$FreeBSD: src/bin/sh/mknodes.c,v 1.18 2008/08/04 01:25:48 cperciva Exp $");
/*
* This program reads the nodetypes file and nodes.c.pat file. It generates
@@ -103,7 +103,7 @@
static int nextfield(char *);
static void skipbl(void);
static int readline(void);
-static void error(const char *, ...) __printf0like(1, 2);
+static void error(const char *, ...) __printf0like(1, 2) __dead2;
static char *savestr(const char *);
==== //depot/projects/mpsafetty/bin/stty/gfmt.c#2 (text+ko) ====
@@ -33,7 +33,7 @@
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/stty/gfmt.c,v 1.20 2004/04/06 20:06:53 markm Exp $");
+__FBSDID("$FreeBSD: src/bin/stty/gfmt.c,v 1.21 2008/08/04 01:25:48 cperciva Exp $");
#include <sys/types.h>
@@ -44,7 +44,7 @@
#include "stty.h"
#include "extern.h"
-static void gerr(const char *s);
+static void gerr(const char *s) __dead2;
static void
gerr(const char *s)
==== //depot/projects/mpsafetty/contrib/ipfilter/ip_fil.c#3 (text+ko) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/contrib/ipfilter/ip_fil.c,v 1.7 2008/07/24 12:35:05 darrenr Exp $ */
+/* $FreeBSD: src/contrib/ipfilter/ip_fil.c,v 1.8 2008/08/04 22:45:27 mlaier Exp $ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
@@ -803,6 +803,7 @@
}
+#ifndef ipf_random
u_32_t ipf_random()
{
static int seeded = 0;
@@ -816,3 +817,4 @@
}
return rand();
}
+#endif
==== //depot/projects/mpsafetty/etc/rc.firewall#3 (text+ko) ====
@@ -23,7 +23,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $FreeBSD: src/etc/rc.firewall,v 1.56 2008/07/17 20:00:18 danger Exp $
+# $FreeBSD: src/etc/rc.firewall,v 1.57 2008/08/03 19:01:07 danger Exp $
#
#
@@ -194,7 +194,6 @@
${fwcmd} add deny tcp from any to any setup
# Allow DNS queries out in the world
- ${fwcmd} add pass tcp from me to any 53 setup keep-state
${fwcmd} add pass udp from me to any 53 keep-state
# Allow NTP queries out in the world
@@ -295,7 +294,6 @@
${fwcmd} add pass tcp from any to any setup
# Allow DNS queries out in the world
- ${fwcmd} add pass tcp from ${oip} to any 53 setup keep-state
${fwcmd} add pass udp from ${oip} to any 53 keep-state
# Allow NTP queries out in the world
==== //depot/projects/mpsafetty/lib/libarchive/archive_private.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_private.h,v 1.29 2007/04/02 00:15:45 kientzle Exp $
+ * $FreeBSD: src/lib/libarchive/archive_private.h,v 1.30 2008/08/04 01:25:48 cperciva Exp $
*/
#ifndef ARCHIVE_PRIVATE_H_INCLUDED
@@ -92,7 +92,7 @@
void __archive_check_magic(struct archive *, unsigned int magic,
unsigned int state, const char *func);
-void __archive_errx(int retvalue, const char *msg);
+void __archive_errx(int retvalue, const char *msg) __dead2;
#define err_combine(a,b) ((a) < (b) ? (a) : (b))
==== //depot/projects/mpsafetty/lib/libc/gen/arc4random.c#4 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/gen/arc4random.c,v 1.23 2008/07/25 15:42:22 ache Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/gen/arc4random.c,v 1.24 2008/08/03 20:15:22 ache Exp $");
#include "namespace.h"
#include <sys/types.h>
@@ -55,6 +55,7 @@
static pthread_mutex_t arc4random_mtx = PTHREAD_MUTEX_INITIALIZER;
#define RANDOMDEV "/dev/urandom"
+#define KEYSIZE 128
#define THREAD_LOCK() \
do { \
if (__isthreaded) \
@@ -106,24 +107,27 @@
static void
arc4_stir(void)
{
- int fd, n;
+ int done, fd, n;
struct {
- struct timeval tv;
- pid_t pid;
- u_int8_t rnd[128 - sizeof(struct timeval) - sizeof(pid_t)];
- } rdat;
+ struct timeval tv;
+ pid_t pid;
+ u_int8_t rnd[KEYSIZE];
+ } rdat;
- gettimeofday(&rdat.tv, NULL);
- rdat.pid = getpid();
fd = _open(RANDOMDEV, O_RDONLY, 0);
+ done = 0;
if (fd >= 0) {
- (void) _read(fd, rdat.rnd, sizeof(rdat.rnd));
- _close(fd);
+ if (_read(fd, &rdat, KEYSIZE) == KEYSIZE)
+ done = 1;
+ (void)_close(fd);
}
- /* fd < 0? Ah, what the heck. We'll just take whatever was on the
- * stack... */
+ if (!done) {
+ (void)gettimeofday(&rdat.tv, NULL);
+ rdat.pid = getpid();
+ /* We'll just take whatever was on the stack too... */
+ }
- arc4_addrandom((void *) &rdat, sizeof(rdat));
+ arc4_addrandom((u_char *)&rdat, KEYSIZE);
/*
* Throw away the first N bytes of output, as suggested in the
==== //depot/projects/mpsafetty/lib/libc/gen/getbsize.c#2 (text+ko) ====
@@ -31,7 +31,7 @@
static char sccsid[] = "@(#)getbsize.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/gen/getbsize.c,v 1.8 2007/01/09 00:27:53 imp Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/gen/getbsize.c,v 1.9 2008/08/04 06:53:13 cperciva Exp $");
#include <err.h>
#include <stdio.h>
@@ -83,6 +83,7 @@
default:
fmterr: warnx("%s: unknown blocksize", p);
n = 512;
+ max = MAXB;
mul = 1;
break;
}
==== //depot/projects/mpsafetty/lib/libc/stdio/vfwprintf.c#2 (text+ko) ====
@@ -36,7 +36,7 @@
#endif /* LIBC_SCCS and not lint */
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.32 2008/06/29 22:54:26 das Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdio/vfwprintf.c,v 1.33 2008/08/04 06:55:42 cperciva Exp $");
/*
* Actual wprintf innards.
@@ -333,8 +333,10 @@
}
if (nconv == (size_t)-1 || nconv == (size_t)-2)
return (NULL);
- } else
+ } else {
insize = strlen(mbsarg);
+ nconv = 0;
+ }
/*
* Allocate buffer for the result and perform the conversion,
==== //depot/projects/mpsafetty/lib/libc/stdlib/getenv.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdlib/getenv.c,v 1.14 2008/08/02 02:34:35 scf Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdlib/getenv.c,v 1.15 2008/08/03 22:47:23 scf Exp $");
#include "namespace.h"
@@ -190,10 +190,6 @@
{
int envNdx;
- /* Check for non-existant environment. */
- if (environ == NULL)
- return (NULL);
-
/* Find variable within environ. */
for (envNdx = 0; environ[envNdx] != NULL; envNdx++)
if (strncmpeq(environ[envNdx], name, nameLen))
@@ -430,14 +426,18 @@
}
/*
- * Find environment variable via environ if no changes have been made
- * via a *env() call or environ has been replaced or cleared by a
- * running program, otherwise, use the rebuilt environment.
+ * An empty environment (environ or its first value) regardless if
+ * environ has been copied before will return a NULL.
+ *
+ * If the environment is not empty, find an environment variable via
+ * environ if environ has not been copied via an *env() call or been
+ * replaced by a running program, otherwise, use the rebuilt
+ * environment.
*/
- if (envVars == NULL || environ != intEnviron)
+ if (environ == NULL || environ[0] == NULL)
+ return (NULL);
+ else if (envVars == NULL || environ != intEnviron)
return (__findenv_environ(name, nameLen));
- else if (environ[0] == NULL)
- return (NULL);
else {
envNdx = envVarsTotal - 1;
return (__findenv(name, nameLen, &envNdx, true));
@@ -537,10 +537,12 @@
char *equals;
/*
- * Internally-built environ has been replaced or cleared. clean up
- * everything.
+ * Internally-built environ has been replaced or cleared (detected by
+ * using the count of active variables against a NULL as the first value
+ * in environ). Clean up everything.
*/
- if (envVarsTotal > 0 && (environ != intEnviron || environ[0] == NULL)) {
+ if (intEnviron != NULL && (environ != intEnviron || (envActive > 0 &&
+ environ[0] == NULL))) {
/* Deactivate all environment variables. */
if (envActive > 0) {
origEnviron = NULL;
==== //depot/projects/mpsafetty/lib/libc/sys/jail.2#2 (text+ko) ====
@@ -6,9 +6,9 @@
.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
.\" ----------------------------------------------------------------------------
.\"
-.\" $FreeBSD: src/lib/libc/sys/jail.2,v 1.28 2005/02/09 18:03:14 ru Exp $
+.\" $FreeBSD: src/lib/libc/sys/jail.2,v 1.29 2008/08/03 21:56:58 trhodes Exp $
.\"
-.Dd April 8, 2003
+.Dd August 3, 2008
.Dt JAIL 2
.Os
.Sh NAME
@@ -111,6 +111,8 @@
.Bl -tag -width Er
.It Bq Er EINVAL
The version number of the argument is not correct.
+.It Bq Er EAGAIN
+No free JID could be found.
.El
.Pp
Further
==== //depot/projects/mpsafetty/lib/libc/sys/socket.2#2 (text+ko) ====
@@ -26,9 +26,9 @@
.\" SUCH DAMAGE.
.\"
.\" From: @(#)socket.2 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/sys/socket.2,v 1.32 2008/06/29 17:17:14 das Exp $
+.\" $FreeBSD: src/lib/libc/sys/socket.2,v 1.33 2008/08/04 22:22:17 trhodes Exp $
.\"
-.Dd November 24, 1997
+.Dd August 4, 2008
.Dt SOCKET 2
.Os
.Sh NAME
@@ -256,6 +256,8 @@
.It Bq Er ENOBUFS
Insufficient buffer space is available.
The socket cannot be created until sufficient resources are freed.
+.It Bq Er EPERM
+User has insufficient privileges to carry out the requested operation.
.El
.Sh SEE ALSO
.Xr accept 2 ,
==== //depot/projects/mpsafetty/lib/libthread_db/Makefile#3 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/lib/libthread_db/Makefile,v 1.14 2008/07/31 16:26:58 marcel Exp $
+# $FreeBSD: src/lib/libthread_db/Makefile,v 1.15 2008/08/06 03:14:18 marcel Exp $
.PATH: ${.CURDIR}/arch/${MACHINE_ARCH}
@@ -9,7 +9,7 @@
SRCS+= libpthread_db.c
SRCS+= libthr_db.c
INCS= thread_db.h
-WARNS?= 3
+WARNS?= 6
CFLAGS+=-I. -I${.CURDIR}
SYM_MAPS+=${.CURDIR}/Symbol.map
==== //depot/projects/mpsafetty/lib/libthread_db/arch/arm/libpthread_md.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libthread_db/arch/arm/libpthread_md.c,v 1.3 2008/07/31 16:26:58 marcel Exp $");
+__FBSDID("$FreeBSD: src/lib/libthread_db/arch/arm/libpthread_md.c,v 1.4 2008/08/06 03:14:18 marcel Exp $");
#include <sys/types.h>
#include <string.h>
@@ -85,7 +85,7 @@
}
void
-pt_fpreg_to_ucontext(const struct fpreg *r, ucontext_t *uc)
+pt_fpreg_to_ucontext(const struct fpreg *r __unused, ucontext_t *uc)
{
mcontext_t *mc = &uc->uc_mcontext;
@@ -94,7 +94,7 @@
}
void
-pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r)
+pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r)
{
/* XXX */
@@ -107,7 +107,7 @@
}
int
-pt_reg_sstep(struct reg *reg, int step)
+pt_reg_sstep(struct reg *reg __unused, int step __unused)
{
/* XXX */
==== //depot/projects/mpsafetty/lib/libthread_db/arch/ia64/libpthread_md.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libthread_db/arch/ia64/libpthread_md.c,v 1.4 2008/07/31 16:26:58 marcel Exp $");
+__FBSDID("$FreeBSD: src/lib/libthread_db/arch/ia64/libpthread_md.c,v 1.5 2008/08/06 03:14:18 marcel Exp $");
#include <sys/procfs.h>
#include <thread_db.h>
@@ -34,22 +34,22 @@
#include "libpthread_db.h"
void
-pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc)
+pt_reg_to_ucontext(const struct reg *r __unused, ucontext_t *uc __unused)
{
}
void
-pt_ucontext_to_reg(const ucontext_t *uc, struct reg *r)
+pt_ucontext_to_reg(const ucontext_t *uc __unused, struct reg *r __unused)
{
}
void
-pt_fpreg_to_ucontext(const struct fpreg* r, ucontext_t *uc)
+pt_fpreg_to_ucontext(const struct fpreg* r __unused, ucontext_t *uc __unused)
{
}
void
-pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r)
+pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r __unused)
{
}
@@ -59,7 +59,7 @@
}
int
-pt_reg_sstep(struct reg *reg, int step)
+pt_reg_sstep(struct reg *reg __unused, int step __unused)
{
return (0);
}
==== //depot/projects/mpsafetty/lib/libthread_db/arch/powerpc/libpthread_md.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libthread_db/arch/powerpc/libpthread_md.c,v 1.4 2008/07/31 16:26:58 marcel Exp $");
+__FBSDID("$FreeBSD: src/lib/libthread_db/arch/powerpc/libpthread_md.c,v 1.5 2008/08/06 03:14:18 marcel Exp $");
#include <sys/types.h>
#include <string.h>
@@ -75,7 +75,7 @@
}
int
-pt_reg_sstep(struct reg *reg, int step)
+pt_reg_sstep(struct reg *reg __unused, int step __unused)
{
/* XXX */
==== //depot/projects/mpsafetty/lib/libthread_db/arch/sparc64/libpthread_md.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libthread_db/arch/sparc64/libpthread_md.c,v 1.4 2008/07/31 16:26:58 marcel Exp $");
+__FBSDID("$FreeBSD: src/lib/libthread_db/arch/sparc64/libpthread_md.c,v 1.5 2008/08/06 03:14:18 marcel Exp $");
#include <sys/procfs.h>
#include <thread_db.h>
@@ -34,22 +34,22 @@
#include "libpthread_db.h"
void
-pt_reg_to_ucontext(const struct reg *r, ucontext_t *uc)
+pt_reg_to_ucontext(const struct reg *r __unused, ucontext_t *uc __unused)
{
}
void
-pt_ucontext_to_reg(const ucontext_t *uc, struct reg *r)
+pt_ucontext_to_reg(const ucontext_t *uc __unused, struct reg *r __unused)
{
}
void
-pt_fpreg_to_ucontext(const struct fpreg* r, ucontext_t *uc)
+pt_fpreg_to_ucontext(const struct fpreg* r __unused, ucontext_t *uc __unused)
{
}
void
-pt_ucontext_to_fpreg(const ucontext_t *uc, struct fpreg *r)
+pt_ucontext_to_fpreg(const ucontext_t *uc __unused, struct fpreg *r __unused)
{
}
@@ -59,7 +59,7 @@
}
int
-pt_reg_sstep(struct reg *reg, int step)
+pt_reg_sstep(struct reg *reg __unused, int step __unused)
{
return (0);
}
==== //depot/projects/mpsafetty/lib/libthread_db/libpthread_db.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libthread_db/libpthread_db.c,v 1.18 2008/07/31 16:26:58 marcel Exp $");
+__FBSDID("$FreeBSD: src/lib/libthread_db/libpthread_db.c,v 1.19 2008/08/06 03:14:18 marcel Exp $");
#include <stddef.h>
#include <stdlib.h>
@@ -346,11 +346,9 @@
}
static td_err_e
-pt_ta_thr_iter(const td_thragent_t *ta,
- td_thr_iter_f *callback, void *cbdata_p,
- td_thr_state_e state, int ti_pri,
- sigset_t *ti_sigmask_p,
- unsigned int ti_user_flags)
+pt_ta_thr_iter(const td_thragent_t *ta, td_thr_iter_f *callback,
+ void *cbdata_p, td_thr_state_e state __unused, int ti_pri __unused,
+ sigset_t *ti_sigmask_p __unused, unsigned int ti_user_flags __unused)
{
TAILQ_HEAD(, pthread) thread_list;
td_thrhandle_t th;
@@ -394,7 +392,7 @@
static td_err_e
pt_ta_tsd_iter(const td_thragent_t *ta, td_key_iter_f *ki, void *arg)
{
- char *keytable;
+ void *keytable;
void *destructor;
int i, ret, allocated;
@@ -410,10 +408,10 @@
return (P2T(ret));
}
for (i = 0; i < ta->thread_max_keys; i++) {
- allocated = *(int *)(keytable + i * ta->thread_size_key +
- ta->thread_off_key_allocated);
- destructor = *(void **)(keytable + i * ta->thread_size_key +
- ta->thread_off_key_destructor);
+ allocated = *(int *)(void *)((uintptr_t)keytable +
+ i * ta->thread_size_key + ta->thread_off_key_allocated);
+ destructor = *(void **)(void *)((uintptr_t)keytable +
+ i * ta->thread_size_key + ta->thread_off_key_destructor);
if (allocated) {
ret = (ki)(i, destructor, arg);
if (ret != 0) {
@@ -427,28 +425,32 @@
}
static td_err_e
-pt_ta_event_addr(const td_thragent_t *ta, td_event_e event, td_notify_t *ptr)
+pt_ta_event_addr(const td_thragent_t *ta __unused, td_event_e event __unused,
+ td_notify_t *ptr __unused)
{
TDBG_FUNC();
return (TD_ERR);
}
static td_err_e
-pt_ta_set_event(const td_thragent_t *ta, td_thr_events_t *events)
+pt_ta_set_event(const td_thragent_t *ta __unused,
+ td_thr_events_t *events __unused)
{
TDBG_FUNC();
return (0);
}
static td_err_e
-pt_ta_clear_event(const td_thragent_t *ta, td_thr_events_t *events)
+pt_ta_clear_event(const td_thragent_t *ta __unused,
+ td_thr_events_t *events __unused)
{
TDBG_FUNC();
return (0);
}
static td_err_e
-pt_ta_event_getmsg(const td_thragent_t *ta, td_event_msg_t *msg)
+pt_ta_event_getmsg(const td_thragent_t *ta __unused,
+ td_event_msg_t *msg __unused)
{
TDBG_FUNC();
return (TD_NOMSG);
@@ -457,7 +459,7 @@
static td_err_e
pt_dbsuspend(const td_thrhandle_t *th, int suspend)
{
- td_thragent_t *ta = (td_thragent_t *)th->th_ta;
+ const td_thragent_t *ta = th->th_ta;
psaddr_t tcb_addr, tmbx_addr, ptr;
lwpid_t lwp;
uint32_t dflags;
@@ -951,28 +953,31 @@
}
static td_err_e
-pt_thr_event_enable(const td_thrhandle_t *th, int en)
+pt_thr_event_enable(const td_thrhandle_t *th __unused, int en __unused)
{
TDBG_FUNC();
return (0);
}
static td_err_e
-pt_thr_set_event(const td_thrhandle_t *th, td_thr_events_t *setp)
+pt_thr_set_event(const td_thrhandle_t *th __unused,
+ td_thr_events_t *setp __unused)
{
TDBG_FUNC();
return (0);
}
static td_err_e
-pt_thr_clear_event(const td_thrhandle_t *th, td_thr_events_t *setp)
+pt_thr_clear_event(const td_thrhandle_t *th __unused,
+ td_thr_events_t *setp __unused)
{
TDBG_FUNC();
return (0);
}
static td_err_e
-pt_thr_event_getmsg(const td_thrhandle_t *th, td_event_msg_t *msg)
+pt_thr_event_getmsg(const td_thrhandle_t *th __unused,
+ td_event_msg_t *msg __unused)
{
TDBG_FUNC();
return (TD_NOMSG);
==== //depot/projects/mpsafetty/lib/libthread_db/libthr_db.c#3 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libthread_db/libthr_db.c,v 1.14 2008/07/30 00:59:19 marcel Exp $");
+__FBSDID("$FreeBSD: src/lib/libthread_db/libthr_db.c,v 1.15 2008/08/06 03:14:18 marcel Exp $");
#include <proc_service.h>
#include <stddef.h>
@@ -245,11 +245,9 @@
}
static td_err_e
-pt_ta_thr_iter(const td_thragent_t *ta,
- td_thr_iter_f *callback, void *cbdata_p,
- td_thr_state_e state, int ti_pri,
- sigset_t *ti_sigmask_p,
- unsigned int ti_user_flags)
+pt_ta_thr_iter(const td_thragent_t *ta, td_thr_iter_f *callback,
+ void *cbdata_p, td_thr_state_e state __unused, int ti_pri __unused,
+ sigset_t *ti_sigmask_p __unused, unsigned int ti_user_flags __unused)
{
TAILQ_HEAD(, pthread) thread_list;
td_thrhandle_t th;
@@ -288,7 +286,7 @@
static td_err_e
pt_ta_tsd_iter(const td_thragent_t *ta, td_key_iter_f *ki, void *arg)
{
- char *keytable;
+ void *keytable;
void *destructor;
int i, ret, allocated;
@@ -304,10 +302,10 @@
return (P2T(ret));
}
for (i = 0; i < ta->thread_max_keys; i++) {
- allocated = *(int *)(keytable + i * ta->thread_size_key +
- ta->thread_off_key_allocated);
- destructor = *(void **)(keytable + i * ta->thread_size_key +
- ta->thread_off_key_destructor);
+ allocated = *(int *)(void *)((uintptr_t)keytable +
+ i * ta->thread_size_key + ta->thread_off_key_allocated);
+ destructor = *(void **)(void *)((uintptr_t)keytable +
+ i * ta->thread_size_key + ta->thread_off_key_destructor);
if (allocated) {
ret = (ki)(i, destructor, arg);
if (ret != 0) {
@@ -422,7 +420,7 @@
static td_err_e
pt_dbsuspend(const td_thrhandle_t *th, int suspend)
{
- td_thragent_t *ta = (td_thragent_t *)th->th_ta;
+ const td_thragent_t *ta = th->th_ta;
int ret;
TDBG_FUNC();
@@ -662,7 +660,7 @@
pt_thr_event_getmsg(const td_thrhandle_t *th, td_event_msg_t *msg)
{
static td_thrhandle_t handle;
- td_thragent_t *ta = (td_thragent_t *)th->th_ta;
+ const td_thragent_t *ta = th->th_ta;
psaddr_t pt, pt_temp;
long lwp;
int ret;
@@ -703,7 +701,7 @@
}
static td_err_e
-pt_thr_sstep(const td_thrhandle_t *th, int step)
+pt_thr_sstep(const td_thrhandle_t *th, int step __unused)
{
TDBG_FUNC();
==== //depot/projects/mpsafetty/lib/msun/src/e_acosf.c#3 (text+ko) ====
@@ -14,7 +14,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/msun/src/e_acosf.c,v 1.10 2008/08/01 01:24:25 das Exp $");
+__FBSDID("$FreeBSD: src/lib/msun/src/e_acosf.c,v 1.11 2008/08/03 17:39:54 das Exp $");
#include "math.h"
#include "math_private.h"
@@ -38,10 +38,11 @@
int32_t hx,ix;
GET_FLOAT_WORD(hx,x);
ix = hx&0x7fffffff;
- if(ix==0x3f800000) { /* |x|==1 */
- if(hx>0) return 0.0; /* acos(1) = 0 */
- else return pi+(float)2.0*pio2_lo; /* acos(-1)= pi */
- } else if(ix>0x3f800000) { /* |x| >= 1 */
+ if(ix>=0x3f800000) { /* |x| >= 1 */
+ if(ix==0x3f800000) { /* |x| == 1 */
+ if(hx>0) return 0.0; /* acos(1) = 0 */
+ else return pi+(float)2.0*pio2_lo; /* acos(-1)= pi */
+ }
return (x-x)/(x-x); /* acos(|x|>1) is NaN */
}
if(ix<0x3f000000) { /* |x| < 0.5 */
@@ -55,14 +56,14 @@
z = (one+x)*(float)0.5;
p = z*(pS0+z*(pS1+z*pS2));
q = one+z*qS1;
- s = __ieee754_sqrtf(z);
+ s = sqrtf(z);
r = p/q;
w = r*s-pio2_lo;
return pi - (float)2.0*(s+w);
} else { /* x > 0.5 */
int32_t idf;
z = (one-x)*(float)0.5;
- s = __ieee754_sqrtf(z);
+ s = sqrtf(z);
df = s;
GET_FLOAT_WORD(idf,df);
SET_FLOAT_WORD(df,idf&0xfffff000);
==== //depot/projects/mpsafetty/lib/msun/src/e_asin.c#3 (text+ko) ====
@@ -12,7 +12,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/msun/src/e_asin.c,v 1.13 2008/07/31 22:41:26 das Exp $");
+__FBSDID("$FreeBSD: src/lib/msun/src/e_asin.c,v 1.14 2008/08/03 17:49:05 das Exp $");
/* __ieee754_asin(x)
* Method :
@@ -84,12 +84,12 @@
} else if (ix<0x3fe00000) { /* |x|<0.5 */
if(ix<0x3e400000) { /* if |x| < 2**-27 */
if(huge+x>one) return x;/* return x with inexact if x!=0*/
- } else
- t = x*x;
- p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
- q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
- w = p/q;
- return x+x*w;
+ }
+ t = x*x;
+ p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
+ q = one+t*(qS1+t*(qS2+t*(qS3+t*qS4)));
+ w = p/q;
+ return x+x*w;
}
/* 1> |x|>= 0.5 */
w = one-fabs(x);
==== //depot/projects/mpsafetty/lib/msun/src/e_asinf.c#3 (text+ko) ====
@@ -14,7 +14,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/msun/src/e_asinf.c,v 1.11 2008/08/01 01:24:25 das Exp $");
+__FBSDID("$FreeBSD: src/lib/msun/src/e_asinf.c,v 1.12 2008/08/03 17:39:54 das Exp $");
#include "math.h"
#include "math_private.h"
@@ -35,31 +35,30 @@
__ieee754_asinf(float x)
{
double s;
- float t=0.0,w,p,q,c,r;
+ float t,w,p,q,c,r;
int32_t hx,ix;
GET_FLOAT_WORD(hx,x);
ix = hx&0x7fffffff;
- if(ix==0x3f800000) {
- /* asin(1)=+-pi/2 with inexact */
- return x*pio2;
- } else if(ix> 0x3f800000) { /* |x|>= 1 */
+ if(ix>=0x3f800000) { /* |x| >= 1 */
+ if(ix==0x3f800000) /* |x| == 1 */
+ return x*pio2; /* asin(+-1) = +-pi/2 with inexact */
return (x-x)/(x-x); /* asin(|x|>1) is NaN */
} else if (ix<0x3f000000) { /* |x|<0.5 */
- if(ix<0x39800000) { /* if |x| < 2**-12 */
+ if(ix<0x39800000) { /* |x| < 2**-12 */
if(huge+x>one) return x;/* return x with inexact if x!=0*/
- } else
- t = x*x;
- p = t*(pS0+t*(pS1+t*pS2));
- q = one+t*qS1;
- w = p/q;
- return x+x*w;
+ }
+ t = x*x;
+ p = t*(pS0+t*(pS1+t*pS2));
+ q = one+t*qS1;
+ w = p/q;
+ return x+x*w;
}
/* 1> |x|>= 0.5 */
w = one-fabsf(x);
t = w*(float)0.5;
p = t*(pS0+t*(pS1+t*pS2));
q = one+t*qS1;
- s = __ieee754_sqrt(t);
+ s = sqrt(t);
w = p/q;
t = pio2-2.0*(s+s*w);
if(hx>0) return t; else return -t;
==== //depot/projects/mpsafetty/lib/msun/src/e_asinl.c#2 (text+ko) ====
@@ -13,7 +13,7 @@
*/
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list