svn commit: r226381 - in head/sys: dev/esp sparc64/sbus

2011-10-15 Thread Marius Strobl
Author: marius
Date: Sat Oct 15 09:29:43 2011
New Revision: 226381
URL: http://svn.freebsd.org/changeset/base/226381

Log:
  Merge from NetBSD:
  - Remove clause 3 and 4 from TNF licenses.
  - Fix memset usage.
  - Various cleanup.
  - Kill caddr_t.

Modified:
  head/sys/dev/esp/esp_sbus.c
  head/sys/dev/esp/ncr53c9x.c
  head/sys/dev/esp/ncr53c9xreg.h
  head/sys/dev/esp/ncr53c9xvar.h
  head/sys/sparc64/sbus/lsi64854.c
  head/sys/sparc64/sbus/lsi64854var.h

Modified: head/sys/dev/esp/esp_sbus.c
==
--- head/sys/dev/esp/esp_sbus.c Sat Oct 15 07:00:28 2011(r226380)
+++ head/sys/dev/esp/esp_sbus.c Sat Oct 15 09:29:43 2011(r226381)
@@ -26,7 +26,7 @@
  *
  */
 
-/* $NetBSD: esp_sbus.c,v 1.31 2005/02/27 00:27:48 perry Exp $  */
+/* $NetBSD: esp_sbus.c,v 1.51 2009/09/17 16:28:12 tsutsui Exp $*/
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -44,13 +44,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *contributors may be used to endorse or promote products derived
- *from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
@@ -158,12 +151,12 @@ MODULE_DEPEND(esp, sbus, 1, 1, 1);
 /*
  * Functions and the switch for the MI code
  */
-static u_char  esp_read_reg(struct ncr53c9x_softc *sc, int reg);
-static voidesp_write_reg(struct ncr53c9x_softc *sc, int reg, u_char v);
+static uint8_t esp_read_reg(struct ncr53c9x_softc *sc, int reg);
+static voidesp_write_reg(struct ncr53c9x_softc *sc, int reg, uint8_t v);
 static int esp_dma_isintr(struct ncr53c9x_softc *sc);
 static voidesp_dma_reset(struct ncr53c9x_softc *sc);
 static int esp_dma_intr(struct ncr53c9x_softc *sc);
-static int esp_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr,
+static int esp_dma_setup(struct ncr53c9x_softc *sc, void **addr,
size_t *len, int datain, size_t *dmasize);
 static voidesp_dma_go(struct ncr53c9x_softc *sc);
 static voidesp_dma_stop(struct ncr53c9x_softc *sc);
@@ -172,7 +165,7 @@ static int  espattach(struct esp_softc *e
const struct ncr53c9x_glue *gluep);
 static int espdetach(struct esp_softc *esc);
 
-static const struct ncr53c9x_glue esp_sbus_glue = {
+static const struct ncr53c9x_glue const esp_sbus_glue = {
esp_read_reg,
esp_write_reg,
esp_dma_isintr,
@@ -718,9 +711,9 @@ espdetach(struct esp_softc *esc)
 static int esp_sbus_debug = 0;
 
 static const struct {
-   char *r_name;
-   int   r_flag;
-} esp__read_regnames [] = {
+   const char *r_name;
+   int r_flag;
+} const esp__read_regnames [] = {
{ TCL, 0},/* 0/00 */
{ TCM, 0},/* 1/04 */
{ FIFO, 0},   /* 2/08 */
@@ -739,10 +732,10 @@ static const struct {
{ TCX, 1},/* f/3c */
 };
 
-static const struct {
-   char *r_name;
-   int   r_flag;
-} esp__write_regnames[] = {
+static const const struct {
+   const char *r_name;
+   int r_flag;
+} const esp__write_regnames[] = {
{ TCL, 1},/* 0/00 */
{ TCM, 1},/* 1/04 */
{ FIFO, 0},   /* 2/08 */
@@ -762,11 +755,11 @@ static const struct {
 };
 #endif
 
-static u_char
+static uint8_t
 esp_read_reg(struct ncr53c9x_softc *sc, int reg)
 {
struct esp_softc *esc = (struct esp_softc *)sc;
-   u_char v;
+   uint8_t v;
 
v = bus_read_1(esc-sc_res, reg * 4);
 
@@ -780,7 +773,7 @@ esp_read_reg(struct ncr53c9x_softc *sc, 
 }
 
 static void
-esp_write_reg(struct ncr53c9x_softc *sc, int reg, u_char v)
+esp_write_reg(struct ncr53c9x_softc *sc, int reg, uint8_t v)
 {
struct esp_softc *esc = (struct esp_softc *)sc;
 
@@ -818,8 +811,8 @@ esp_dma_intr(struct ncr53c9x_softc *sc)
 }
 
 static int
-esp_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr, size_t *len,
- int datain, size_t *dmasize)
+esp_dma_setup(struct ncr53c9x_softc *sc, void **addr, size_t *len,
+int datain, size_t *dmasize)
 {
struct esp_softc *esc = (struct esp_softc *)sc;
 

Modified: head/sys/dev/esp/ncr53c9x.c
==
--- head/sys/dev/esp/ncr53c9x.c Sat Oct 15 07:00:28 

Re: svn commit: r226375 - head/lib/msun/src

2011-10-15 Thread Bruce Evans

On Sat, 15 Oct 2011, David Schultz wrote:


Log:
 Style fixes and updates to comments.

 Submitted by:  bde


Thanks for all the libm commits.

Bruce
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226388 - in head/sys: compat/freebsd32 kern sys vm

2011-10-15 Thread Konstantin Belousov
Author: kib
Date: Sat Oct 15 12:35:18 2011
New Revision: 226388
URL: http://svn.freebsd.org/changeset/base/226388

Log:
  Control the execution permission of the readable segments for
  i386 binaries on the amd64 and ia64 with the sysctl, instead of
  unconditionally enabling it.
  
  Reviewed by:  marcel

Modified:
  head/sys/compat/freebsd32/freebsd32_misc.c
  head/sys/kern/imgact_elf.c
  head/sys/sys/sysent.h
  head/sys/vm/vm_unix.c

Modified: head/sys/compat/freebsd32/freebsd32_misc.c
==
--- head/sys/compat/freebsd32/freebsd32_misc.c  Sat Oct 15 12:33:24 2011
(r226387)
+++ head/sys/compat/freebsd32/freebsd32_misc.c  Sat Oct 15 12:35:18 2011
(r226388)
@@ -445,7 +445,7 @@ freebsd32_mprotect(struct thread *td, st
ap.len = uap-len;
ap.prot = uap-prot;
 #if defined(__amd64__) || defined(__ia64__)
-   if (ap.prot  PROT_READ)
+   if (i386_read_exec  (ap.prot  PROT_READ) != 0)
ap.prot |= PROT_EXEC;
 #endif
return (sys_mprotect(td, ap));
@@ -536,7 +536,7 @@ freebsd32_mmap(struct thread *td, struct
 #endif
 
 #if defined(__amd64__) || defined(__ia64__)
-   if (prot  PROT_READ)
+   if (i386_read_exec  (prot  PROT_READ))
prot |= PROT_EXEC;
 #endif
 

Modified: head/sys/kern/imgact_elf.c
==
--- head/sys/kern/imgact_elf.c  Sat Oct 15 12:33:24 2011(r226387)
+++ head/sys/kern/imgact_elf.c  Sat Oct 15 12:35:18 2011(r226388)
@@ -123,6 +123,14 @@ SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WOR
 nxstack, CTLFLAG_RW, __elfN(nxstack), 0,
 __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) : enable non-executable stack);
 
+#if __ELF_WORD_SIZE == 32
+#if defined(__amd64__) || defined(__ia64__)
+int i386_read_exec = 0;
+SYSCTL_INT(_kern_elf32, OID_AUTO, read_exec, CTLFLAG_RW, i386_read_exec, 0,
+enable execution from readable segments);
+#endif
+#endif
+
 static Elf_Brandinfo *elf_brand_list[MAX_BRANDS];
 
 #definetrunc_page_ps(va, ps)   ((va)  ~(ps - 1))
@@ -1666,7 +1674,7 @@ __elfN(trans_prot)(Elf_Word flags)
prot |= VM_PROT_READ;
 #if __ELF_WORD_SIZE == 32
 #if defined(__amd64__) || defined(__ia64__)
-   if (flags  PF_R)
+   if (i386_read_exec  (flags  PF_R))
prot |= VM_PROT_EXECUTE;
 #endif
 #endif

Modified: head/sys/sys/sysent.h
==
--- head/sys/sys/sysent.h   Sat Oct 15 12:33:24 2011(r226387)
+++ head/sys/sys/sysent.h   Sat Oct 15 12:35:18 2011(r226388)
@@ -151,6 +151,10 @@ extern struct sysentvec null_sysvec;
 extern struct sysent sysent[];
 extern const char *syscallnames[];
 
+#if defined(__amd64__) || defined(__ia64__)
+extern int i386_read_exec;
+#endif
+
 #defineNO_SYSCALL (-1)
 
 struct module;

Modified: head/sys/vm/vm_unix.c
==
--- head/sys/vm/vm_unix.c   Sat Oct 15 12:33:24 2011(r226387)
+++ head/sys/vm/vm_unix.c   Sat Oct 15 12:35:18 2011(r226388)
@@ -141,7 +141,7 @@ sys_obreak(td, uap)
prot = VM_PROT_RW;
 #ifdef COMPAT_FREEBSD32
 #if defined(__amd64__) || defined(__ia64__)
-   if (SV_PROC_FLAG(td-td_proc, SV_ILP32))
+   if (i386_read_exec  SV_PROC_FLAG(td-td_proc, SV_ILP32))
prot |= VM_PROT_EXECUTE;
 #endif
 #endif
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r226343 - head/sys/vm

2011-10-15 Thread Kostik Belousov
On Fri, Oct 14, 2011 at 02:35:15PM -0700, Marcel Moolenaar wrote:
 
 On Oct 14, 2011, at 11:24 AM, Kostik Belousov wrote:
  
  After more thought about the issue, I do not agree with you.
  Elf specification says about the PF_R flag that only read permission
  for the memory image of the segment is required, but read and execute
  is allowed.
 
 The ELF specification does not contain CPU specifics. Those are
 always covered by processor supplements. Since this is very i386
 specific behaviour we're talking about, it's a non sequitur to
 use the generic ELF specification to argue a point in this
 respect.
This is not quite accurate. The ELF specification does contain the
CPU-specific bits for i386. But, the interpretation of the PF_R/PF_X
flags in the program header is described under the OS-specific section,
and not under the CPU-specific. That is, I am sure that the situation
shall be interpreted as the bug in the program.

 
 
  I want to commit the following refinement:
 
 The patch is good.
Thanks, committed.

 
  diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
  index 669c652..9970386 100644
  --- a/sys/kern/imgact_elf.c
  +++ b/sys/kern/imgact_elf.c
  @@ -118,11 +118,24 @@ static int elf_legacy_coredump = 0;
  SYSCTL_INT(_debug, OID_AUTO, __elfN(legacy_coredump), CTLFLAG_RW, 
  elf_legacy_coredump, 0, );
  
  -static int __elfN(nxstack) = 0;
  +static int __elfN(nxstack) =
  +#if defined(__amd64__) || defined(__powerpc__) /* both 64 and 32 bit */
  +   1;
  +#else
  +   0;
  +#endif
  SYSCTL_INT(__CONCAT(_kern_elf, __ELF_WORD_SIZE), OID_AUTO,
  nxstack, CTLFLAG_RW, __elfN(nxstack), 0,
  __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) : enable non-executable 
  stack);
 
 Please do not commit this change with the rest. It's
 not to the point. In fact, if you're changing it to
 the above, please add ia64 to the list as well.

Yes, sure. The inclusion of the chunk was a mistake.


pgpMl30tehU1H.pgp
Description: PGP signature


svn commit: r226396 - head/usr.bin/systat

2011-10-15 Thread Ed Schouten
Author: ed
Date: Sat Oct 15 13:20:36 2011
New Revision: 226396
URL: http://svn.freebsd.org/changeset/base/226396

Log:
  Fix whitespace inconsistencies in systat(1).
  
  According to md5(1), the resulting binary is the same.

Modified:
  head/usr.bin/systat/cmds.c
  head/usr.bin/systat/cmdtab.c
  head/usr.bin/systat/devs.c
  head/usr.bin/systat/fetch.c
  head/usr.bin/systat/ifcmds.c
  head/usr.bin/systat/ifstat.c
  head/usr.bin/systat/keyboard.c
  head/usr.bin/systat/mode.c
  head/usr.bin/systat/mode.h
  head/usr.bin/systat/netstat.c
  head/usr.bin/systat/systat.h
  head/usr.bin/systat/vmstat.c

Modified: head/usr.bin/systat/cmds.c
==
--- head/usr.bin/systat/cmds.c  Sat Oct 15 13:12:48 2011(r226395)
+++ head/usr.bin/systat/cmds.c  Sat Oct 15 13:20:36 2011(r226396)
@@ -47,32 +47,32 @@ static const char sccsid[] = @(#)cmds.c
 void
 command(const char *cmd)
 {
-struct cmdtab *p;
-char *cp, *tmpstr, *tmpstr1;
+   struct cmdtab *p;
+   char *cp, *tmpstr, *tmpstr1;
int interval, omask;
 
tmpstr = tmpstr1 = strdup(cmd);
omask = sigblock(sigmask(SIGALRM));
-for (cp = tmpstr1; *cp  !isspace(*cp); cp++)
-;
-if (*cp)
-*cp++ = '\0';
+   for (cp = tmpstr1; *cp  !isspace(*cp); cp++)
+   ;
+   if (*cp)
+   *cp++ = '\0';
if (*tmpstr1 == '\0')
return;
for (; *cp  isspace(*cp); cp++)
;
-if (strcmp(tmpstr1, quit) == 0 || strcmp(tmpstr1, q) == 0)
-die(0);
+   if (strcmp(tmpstr1, quit) == 0 || strcmp(tmpstr1, q) == 0)
+   die(0);
if (strcmp(tmpstr1, load) == 0) {
load();
goto done;
}
-if (strcmp(tmpstr1, stop) == 0) {
-alarm(0);
-mvaddstr(CMDLINE, 0, Refresh disabled.);
-clrtoeol();
+   if (strcmp(tmpstr1, stop) == 0) {
+   alarm(0);
+   mvaddstr(CMDLINE, 0, Refresh disabled.);
+   clrtoeol();
goto done;
-}
+   }
if (strcmp(tmpstr1, help) == 0) {
int _col, _len;
 
@@ -89,30 +89,30 @@ command(const char *cmd)
goto done;
}
interval = atoi(tmpstr1);
-if (interval = 0 
+   if (interval = 0 
(strcmp(tmpstr1, start) == 0 || strcmp(tmpstr1, interval) == 
0)) {
interval = *cp ? atoi(cp) : naptime;
-if (interval = 0) {
+   if (interval = 0) {
error(%d: bad interval., interval);
goto done;
-}
+   }
}
if (interval  0) {
-alarm(0);
-naptime = interval;
-display(0);
-status();
+   alarm(0);
+   naptime = interval;
+   display(0);
+   status();
goto done;
-}
+   }
p = lookup(tmpstr1);
if (p == (struct cmdtab *)-1) {
error(%s: Ambiguous command., tmpstr1);
goto done;
}
-if (p) {
-if (curcmd == p)
+   if (p) {
+   if (curcmd == p)
goto done;
-alarm(0);
+   alarm(0);
(*curcmd-c_close)(wnd);
curcmd-c_flags = ~CF_INIT;
wnd = (*p-c_open)();
@@ -131,12 +131,12 @@ command(const char *cmd)
else
goto done;
}
-curcmd = p;
+   curcmd = p;
labels();
-display(0);
-status();
+   display(0);
+   status();
goto done;
-}
+   }
if (curcmd-c_cmd == 0 || !(*curcmd-c_cmd)(tmpstr1, cp))
error(%s: Unknown command., tmpstr1);
 done:
@@ -176,18 +176,18 @@ void
 status(void)
 {
 
-error(Showing %s, refresh every %d seconds.,
-  curcmd-c_name, naptime);
+   error(Showing %s, refresh every %d seconds.,
+ curcmd-c_name, naptime);
 }
 
 int
 prefix(const char *s1, const char *s2)
 {
 
-while (*s1 == *s2) {
-if (*s1 == '\0')
-return (1);
-s1++, s2++;
-}
-return (*s1 == '\0');
+   while (*s1 == *s2) {
+   if (*s1 == '\0')
+   return (1);
+   s1++, s2++;
+   }
+   return (*s1 == '\0');
 }

Modified: head/usr.bin/systat/cmdtab.c
==
--- head/usr.bin/systat/cmdtab.cSat Oct 15 13:12:48 2011
(r226395)
+++ head/usr.bin/systat/cmdtab.cSat Oct 15 13:20:36 2011
(r226396)
@@ -40,22 

svn commit: r226398 - head/sys/dev/iicbus

2011-10-15 Thread Christian Brueffer
Author: brueffer
Date: Sat Oct 15 15:57:55 2011
New Revision: 226398
URL: http://svn.freebsd.org/changeset/base/226398

Log:
  Properly free resources in an error case.
  
  CID:  4203
  Found with:   Coverity Prevent(tm)
  MFC after:1 week

Modified:
  head/sys/dev/iicbus/iic.c

Modified: head/sys/dev/iicbus/iic.c
==
--- head/sys/dev/iicbus/iic.c   Sat Oct 15 15:21:33 2011(r226397)
+++ head/sys/dev/iicbus/iic.c   Sat Oct 15 15:57:55 2011(r226398)
@@ -348,8 +348,10 @@ iicioctl(struct cdev *dev, u_long cmd, c
buf = malloc(sizeof(*d-msgs) * d-nmsgs, M_TEMP, M_WAITOK);
usrbufs = malloc(sizeof(void *) * d-nmsgs, M_TEMP, M_ZERO | 
M_WAITOK);
error = copyin(d-msgs, buf, sizeof(*d-msgs) * d-nmsgs);
-   if (error)
+   if (error) {
+   free(usrbufs, M_TEMP);
break;
+   }
/* Alloc kernel buffers for userland data, copyin write data */
for (i = 0; i  d-nmsgs; i++) {
m = ((struct iic_msg *)buf)[i];
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226401 - head/sys/netinet

2011-10-15 Thread Gleb Smirnoff
Author: glebius
Date: Sat Oct 15 16:28:06 2011
New Revision: 226401
URL: http://svn.freebsd.org/changeset/base/226401

Log:
  Remove last remnants of classful addressing:
  
  - Remove ia_net, ia_netmask, ia_netbroadcast from struct in_ifaddr.
  - Remove net.inet.ip.subnetsarelocal, I bet no one need it in 2011.
  - fix bug when we were not forwarding to a host which matches classful
net address. For example router having 192.168.x.y/16 network attached,
would not forward traffic to 192.168.*.0, which are legal IPs in
CIDR world.
  - For compatibility, leave autoguessing of mask based on class.
  
  Reviewed by:  andre, bz, rwatson

Modified:
  head/sys/netinet/in.c
  head/sys/netinet/in_debug.c
  head/sys/netinet/in_var.h
  head/sys/netinet/ip_input.c

Modified: head/sys/netinet/in.c
==
--- head/sys/netinet/in.c   Sat Oct 15 16:18:35 2011(r226400)
+++ head/sys/netinet/in.c   Sat Oct 15 16:28:06 2011(r226401)
@@ -76,11 +76,6 @@ static int   in_ifinit(struct ifnet *,
struct in_ifaddr *, struct sockaddr_in *, int);
 static voidin_purgemaddrs(struct ifnet *);
 
-static VNET_DEFINE(int, subnetsarelocal);
-#defineV_subnetsarelocal   VNET(subnetsarelocal)
-SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW,
-   VNET_NAME(subnetsarelocal), 0,
-   Treat all subnets as directly connected);
 static VNET_DEFINE(int, sameprefixcarponly);
 #defineV_sameprefixcarponlyVNET(sameprefixcarponly)
 SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, same_prefix_carp_only, CTLFLAG_RW,
@@ -95,9 +90,7 @@ VNET_DECLARE(struct arpstat, arpstat);  
 
 /*
  * Return 1 if an internet address is for a ``local'' host
- * (one to which we have a connection).  If subnetsarelocal
- * is true, this includes other subnets of the local net.
- * Otherwise, it includes only the directly-connected (sub)nets.
+ * (one to which we have a connection).
  */
 int
 in_localaddr(struct in_addr in)
@@ -106,19 +99,10 @@ in_localaddr(struct in_addr in)
register struct in_ifaddr *ia;
 
IN_IFADDR_RLOCK();
-   if (V_subnetsarelocal) {
-   TAILQ_FOREACH(ia, V_in_ifaddrhead, ia_link) {
-   if ((i  ia-ia_netmask) == ia-ia_net) {
-   IN_IFADDR_RUNLOCK();
-   return (1);
-   }
-   }
-   } else {
-   TAILQ_FOREACH(ia, V_in_ifaddrhead, ia_link) {
-   if ((i  ia-ia_subnetmask) == ia-ia_subnet) {
-   IN_IFADDR_RUNLOCK();
-   return (1);
-   }
+   TAILQ_FOREACH(ia, V_in_ifaddrhead, ia_link) {
+   if ((i  ia-ia_subnetmask) == ia-ia_subnet) {
+   IN_IFADDR_RUNLOCK();
+   return (1);
}
}
IN_IFADDR_RUNLOCK();
@@ -888,23 +872,19 @@ in_ifinit(struct ifnet *ifp, struct in_i
in_ifscrub(ifp, ia, LLE_STATIC);
ia-ia_ifa.ifa_addr = (struct sockaddr *)ia-ia_addr;
}
-   if (IN_CLASSA(i))
-   ia-ia_netmask = IN_CLASSA_NET;
-   else if (IN_CLASSB(i))
-   ia-ia_netmask = IN_CLASSB_NET;
-   else
-   ia-ia_netmask = IN_CLASSC_NET;
/*
-* The subnet mask usually includes at least the standard network part,
-* but may may be smaller in the case of supernetting.
-* If it is set, we believe it.
+* Be compatible with network classes, if netmask isn't supplied,
+* guess it based on classes.
 */
if (ia-ia_subnetmask == 0) {
-   ia-ia_subnetmask = ia-ia_netmask;
+   if (IN_CLASSA(i))
+   ia-ia_subnetmask = IN_CLASSA_NET;
+   else if (IN_CLASSB(i))
+   ia-ia_subnetmask = IN_CLASSB_NET;
+   else
+   ia-ia_subnetmask = IN_CLASSC_NET;
ia-ia_sockmask.sin_addr.s_addr = htonl(ia-ia_subnetmask);
-   } else
-   ia-ia_netmask = ia-ia_subnetmask;
-   ia-ia_net = i  ia-ia_netmask;
+   }
ia-ia_subnet = i  ia-ia_subnetmask;
in_socktrim(ia-ia_sockmask);
/*
@@ -919,8 +899,6 @@ in_ifinit(struct ifnet *ifp, struct in_i
if (ifp-if_flags  IFF_BROADCAST) {
ia-ia_broadaddr.sin_addr.s_addr =
htonl(ia-ia_subnet | ~ia-ia_subnetmask);
-   ia-ia_netbroadcast.s_addr =
-   htonl(ia-ia_net | ~ ia-ia_netmask);
} else if (ifp-if_flags  IFF_LOOPBACK) {
ia-ia_dstaddr = ia-ia_addr;
flags |= RTF_HOST;
@@ -1251,11 +1229,10 @@ in_broadcast(struct in_addr in, struct i
TAILQ_FOREACH(ifa, ifp-if_addrhead, ifa_link)
if (ifa-ifa_addr-sa_family == AF_INET 
  

svn commit: r226402 - head/sys/netinet

2011-10-15 Thread Gleb Smirnoff
Author: glebius
Date: Sat Oct 15 18:41:25 2011
New Revision: 226402
URL: http://svn.freebsd.org/changeset/base/226402

Log:
  Add support for IPv4 /31 prefixes, as described in RFC3021.
  
  To run a /31 network, participating hosts MUST drop support
  for directed broadcasts, and treat the first and last addresses
  on subnet as unicast. The broadcast address for the prefix
  should be the link local broadcast address, INADDR_BROADCAST.

Modified:
  head/sys/netinet/in.c
  head/sys/netinet/in.h

Modified: head/sys/netinet/in.c
==
--- head/sys/netinet/in.c   Sat Oct 15 16:28:06 2011(r226401)
+++ head/sys/netinet/in.c   Sat Oct 15 18:41:25 2011(r226402)
@@ -897,8 +897,11 @@ in_ifinit(struct ifnet *ifp, struct in_i
 */
ia-ia_ifa.ifa_metric = ifp-if_metric;
if (ifp-if_flags  IFF_BROADCAST) {
-   ia-ia_broadaddr.sin_addr.s_addr =
-   htonl(ia-ia_subnet | ~ia-ia_subnetmask);
+   if (ia-ia_subnetmask == IN_RFC3021_MASK)
+   ia-ia_broadaddr.sin_addr.s_addr = INADDR_BROADCAST;
+   else
+   ia-ia_broadaddr.sin_addr.s_addr =
+   htonl(ia-ia_subnet | ~ia-ia_subnetmask);
} else if (ifp-if_flags  IFF_LOOPBACK) {
ia-ia_dstaddr = ia-ia_addr;
flags |= RTF_HOST;
@@ -1230,9 +1233,11 @@ in_broadcast(struct in_addr in, struct i
if (ifa-ifa_addr-sa_family == AF_INET 
(in.s_addr == ia-ia_broadaddr.sin_addr.s_addr ||
 /*
- * Check for old-style (host 0) broadcast.
+ * Check for old-style (host 0) broadcast, but
+ * taking into account that RFC 3021 obsoletes it.
  */
-t == ia-ia_subnet) 
+(ia-ia_subnetmask != IN_RFC3021_MASK 
+t == ia-ia_subnet)) 
 /*
  * Check for an all one subnetmask. These
  * only exist when an interface gets a secondary

Modified: head/sys/netinet/in.h
==
--- head/sys/netinet/in.h   Sat Oct 15 16:28:06 2011(r226401)
+++ head/sys/netinet/in.h   Sat Oct 15 18:41:25 2011(r226402)
@@ -392,6 +392,8 @@ __END_DECLS
 
 #defineIN_LOOPBACKNET  127 /* official! */
 
+#defineIN_RFC3021_MASK (u_int32_t)0xfffe
+
 /*
  * Options for use with [gs]etsockopt at the IP level.
  * First word of comment is data type; bool is stored in int.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226403 - head/usr.bin/script

2011-10-15 Thread Mikolaj Golub
Author: trociny
Date: Sat Oct 15 19:08:22 2011
New Revision: 226403
URL: http://svn.freebsd.org/changeset/base/226403

Log:
  In r225809 the intention was to send VEOF only once if STDIN was not a
  terminal. Unfortunately the fix was incorrect and for flushtime  0 it
  keept sending VEOF.
  
  Sent VEOF generates ^D\b\b echoed by the terminal, which was reported
  in bin/161526. Note, we still send VEOF at least once. Otherwise
  commands like below would hang forever:
  
echo 1 |script /tmp/script.out cat
  
  PR:   bin/161526
  Reported by:  Adrian Wontroba a...@stade.co.uk, Stefan Bethke 
s...@lassitu.de
  Tested by:Stefan Bethke s...@lassitu.de
  MFC after:3 days

Modified:
  head/usr.bin/script/script.c

Modified: head/usr.bin/script/script.c
==
--- head/usr.bin/script/script.cSat Oct 15 18:41:25 2011
(r226402)
+++ head/usr.bin/script/script.cSat Oct 15 19:08:22 2011
(r226403)
@@ -163,12 +163,15 @@ main(int argc, char *argv[])
FD_SET(master, rfd);
if (readstdin)
FD_SET(STDIN_FILENO, rfd);
-   if ((!readstdin  ttyflg) || flushtime  0) {
-   tv.tv_sec = !readstdin  ttyflg ? 1 :
-   flushtime - (tvec - start);
+   if (!readstdin  ttyflg) {
+   tv.tv_sec = 1;
tv.tv_usec = 0;
tvp = tv;
readstdin = 1;
+   } else if (flushtime  0) {
+   tv.tv_sec = flushtime - (tvec - start);
+   tv.tv_usec = 0;
+   tvp = tv;
} else {
tvp = NULL;
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r226343 - head/sys/vm

2011-10-15 Thread Marcel Moolenaar

On Oct 15, 2011, at 5:39 AM, Kostik Belousov wrote:
 
 I want to commit the following refinement:
 
 The patch is good.
 Thanks, committed.

Thanks!

-- 
Marcel Moolenaar
mar...@xcllnt.net


___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226404 - head/sys/dev/puc

2011-10-15 Thread Eitan Adler
Author: eadler (ports committer)
Date: Sat Oct 15 21:06:08 2011
New Revision: 226404
URL: http://svn.freebsd.org/changeset/base/226404

Log:
  - add support for I-O DATA RSA-PCI2/R
  
  PR:   kern/142999
  Submitted by: Takefu Kenji tak...@airport.fm
  Approved by:  jhb
  Approved by:  sahil (mentor)
  MFC after:1 week

Modified:
  head/sys/dev/puc/pucdata.c

Modified: head/sys/dev/puc/pucdata.c
==
--- head/sys/dev/puc/pucdata.c  Sat Oct 15 19:08:22 2011(r226403)
+++ head/sys/dev/puc/pucdata.c  Sat Oct 15 21:06:08 2011(r226404)
@@ -645,6 +645,12 @@ const struct puc_cfg puc_pci_devices[] =
 * As sold by Kouwell URL:http://www.kouwell.com/.
 * I/O Flex PCI I/O Card Model-223 with 4 serial and 1 parallel ports.
 */
+   {
+   0x1415, 0x9501, 0x10fc ,0xc070,
+   I-O DATA RSA-PCI2/R,
+   DEFAULT_RCLK * 8,
+   PUC_PORT_2S, 0x10, 0, 8,
+   },
 
{   0x1415, 0x9501, 0x131f, 0x2050,
SIIG Cyber 4 PCI 16550,
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r226402 - head/sys/netinet

2011-10-15 Thread Nikolay Denev

On Oct 15, 2011, at 9:41 PM, Gleb Smirnoff wrote:

 Author: glebius
 Date: Sat Oct 15 18:41:25 2011
 New Revision: 226402
 URL: http://svn.freebsd.org/changeset/base/226402
 
 Log:
  Add support for IPv4 /31 prefixes, as described in RFC3021.
 
  To run a /31 network, participating hosts MUST drop support
  for directed broadcasts, and treat the first and last addresses
  on subnet as unicast. The broadcast address for the prefix
  should be the link local broadcast address, INADDR_BROADCAST.
 
 Modified:
  head/sys/netinet/in.c
  head/sys/netinet/in.h
 
 Modified: head/sys/netinet/in.c
 ==
 --- head/sys/netinet/in.c Sat Oct 15 16:28:06 2011(r226401)
 +++ head/sys/netinet/in.c Sat Oct 15 18:41:25 2011(r226402)
 @@ -897,8 +897,11 @@ in_ifinit(struct ifnet *ifp, struct in_i
*/
   ia-ia_ifa.ifa_metric = ifp-if_metric;
   if (ifp-if_flags  IFF_BROADCAST) {
 - ia-ia_broadaddr.sin_addr.s_addr =
 - htonl(ia-ia_subnet | ~ia-ia_subnetmask);
 + if (ia-ia_subnetmask == IN_RFC3021_MASK)
 + ia-ia_broadaddr.sin_addr.s_addr = INADDR_BROADCAST;
 + else
 + ia-ia_broadaddr.sin_addr.s_addr =
 + htonl(ia-ia_subnet | ~ia-ia_subnetmask);
   } else if (ifp-if_flags  IFF_LOOPBACK) {
   ia-ia_dstaddr = ia-ia_addr;
   flags |= RTF_HOST;
 @@ -1230,9 +1233,11 @@ in_broadcast(struct in_addr in, struct i
   if (ifa-ifa_addr-sa_family == AF_INET 
   (in.s_addr == ia-ia_broadaddr.sin_addr.s_addr ||
/*
 -   * Check for old-style (host 0) broadcast.
 +   * Check for old-style (host 0) broadcast, but
 +   * taking into account that RFC 3021 obsoletes it.
 */
 -  t == ia-ia_subnet) 
 +  (ia-ia_subnetmask != IN_RFC3021_MASK 
 +  t == ia-ia_subnet)) 
/*
 * Check for an all one subnetmask. These
 * only exist when an interface gets a secondary
 
 Modified: head/sys/netinet/in.h
 ==
 --- head/sys/netinet/in.h Sat Oct 15 16:28:06 2011(r226401)
 +++ head/sys/netinet/in.h Sat Oct 15 18:41:25 2011(r226402)
 @@ -392,6 +392,8 @@ __END_DECLS
 
 #define   IN_LOOPBACKNET  127 /* official! */
 
 +#define  IN_RFC3021_MASK (u_int32_t)0xfffe
 +
 /*
  * Options for use with [gs]etsockopt at the IP level.
  * First word of comment is data type; bool is stored in int.
 

That's great! Thanks!
Any plans for MFC?

Regards,
Nikolay

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226406 - head/sys/dev/siba

2011-10-15 Thread Christian Brueffer
Author: brueffer
Date: Sat Oct 15 22:27:35 2011
New Revision: 226406
URL: http://svn.freebsd.org/changeset/base/226406

Log:
  Properly free resources in case of an error.
  
  CID:  4222
  Found with:   Coverity Prevent(tm)
  MFC after:1 week

Modified:
  head/sys/dev/siba/siba_bwn.c

Modified: head/sys/dev/siba/siba_bwn.c
==
--- head/sys/dev/siba/siba_bwn.cSat Oct 15 21:23:04 2011
(r226405)
+++ head/sys/dev/siba/siba_bwn.cSat Oct 15 22:27:35 2011
(r226406)
@@ -208,6 +208,7 @@ siba_bwn_suspend(device_t dev)
if (error) {
for (j = 0; j  i; j++)
DEVICE_RESUME(devlistp[j]);
+   free(devlistp, M_TEMP);
return (error);
}
}
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226410 - head/sys/powerpc/powerpc

2011-10-15 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Sat Oct 15 23:15:55 2011
New Revision: 226410
URL: http://svn.freebsd.org/changeset/base/226410

Log:
  Enforce a memory barrier in stream operations, as is done on other
  bus_space calls. This makes ath(4) work correctly on PowerPC.
  
  Submitted by: adrian
  Tested by:andreast
  MFC after:3 days

Modified:
  head/sys/powerpc/powerpc/bus_machdep.c

Modified: head/sys/powerpc/powerpc/bus_machdep.c
==
--- head/sys/powerpc/powerpc/bus_machdep.c  Sat Oct 15 23:13:24 2011
(r226409)
+++ head/sys/powerpc/powerpc/bus_machdep.c  Sat Oct 15 23:15:55 2011
(r226410)
@@ -293,6 +293,7 @@ bs_be_ws_1(bus_space_handle_t bsh, bus_s
 
addr = __ppc_ba(bsh, ofs);
*addr = val;
+   __asm __volatile(eieio; sync);
CTR4(KTR_BE_IO, %s(bsh=%#x, ofs=%#x, val=%#x), __func__, bsh, ofs, 
val);
 }
 
@@ -303,6 +304,7 @@ bs_be_ws_2(bus_space_handle_t bsh, bus_s
 
addr = __ppc_ba(bsh, ofs);
*addr = val;
+   __asm __volatile(eieio; sync);
CTR4(KTR_BE_IO, %s(bsh=%#x, ofs=%#x, val=%#x), __func__, bsh, ofs, 
val);
 }
 
@@ -313,6 +315,7 @@ bs_be_ws_4(bus_space_handle_t bsh, bus_s
 
addr = __ppc_ba(bsh, ofs);
*addr = val;
+   __asm __volatile(eieio; sync);
CTR4(KTR_BE_IO, %s(bsh=%#x, ofs=%#x, val=%#x), __func__, bsh, ofs, 
val);
 }
 
@@ -323,6 +326,7 @@ bs_be_ws_8(bus_space_handle_t bsh, bus_s
 
addr = __ppc_ba(bsh, ofs);
*addr = val;
+   __asm __volatile(eieio; sync);
 }
 
 static void
@@ -488,6 +492,7 @@ bs_le_rs_1(bus_space_handle_t bsh, bus_s
 
addr = __ppc_ba(bsh, ofs);
res = *addr;
+   __asm __volatile(eieio; sync);
CTR4(KTR_LE_IO, %s(bsh=%#x, ofs=%#x) = %#x, __func__, bsh, ofs, res);
return (res);
 }
@@ -500,6 +505,7 @@ bs_le_rs_2(bus_space_handle_t bsh, bus_s
 
addr = __ppc_ba(bsh, ofs);
__asm __volatile(lhbrx %0, 0, %1 : =r(res) : r(addr));
+   __asm __volatile(eieio; sync);
CTR4(KTR_LE_IO, %s(bsh=%#x, ofs=%#x) = %#x, __func__, bsh, ofs, res);
return (res);
 }
@@ -512,6 +518,7 @@ bs_le_rs_4(bus_space_handle_t bsh, bus_s
 
addr = __ppc_ba(bsh, ofs);
__asm __volatile(lwbrx %0, 0, %1 : =r(res) : r(addr));
+   __asm __volatile(eieio; sync);
CTR4(KTR_LE_IO, %s(bsh=%#x, ofs=%#x) = %#x, __func__, bsh, ofs, res);
return (res);
 }
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r226410 - head/sys/powerpc/powerpc

2011-10-15 Thread Adrian Chadd
Thanks!

I'm going to eventually fix the ath driver to always call
bus_space_barrier() when doing stream bus calls.

It's likely worthwhile doing a check to see which other drivers use
the stream calls?


Adrian
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226411 - head/lib/msun/src

2011-10-15 Thread David Schultz
Author: das
Date: Sun Oct 16 05:36:23 2011
New Revision: 226411
URL: http://svn.freebsd.org/changeset/base/226411

Log:
  Remove an unused variable.

Modified:
  head/lib/msun/src/e_log10f.c

Modified: head/lib/msun/src/e_log10f.c
==
--- head/lib/msun/src/e_log10f.cSat Oct 15 23:15:55 2011
(r226410)
+++ head/lib/msun/src/e_log10f.cSun Oct 16 05:36:23 2011
(r226411)
@@ -32,7 +32,7 @@ static const float zero   =  0.0;
 float
 __ieee754_log10f(float x)
 {
-   float f,hfsq,hi,lo,r,y,y2;
+   float f,hfsq,hi,lo,r,y;
int32_t i,k,hx;
 
GET_FLOAT_WORD(hx,x);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226412 - head/lib/msun/src

2011-10-15 Thread David Schultz
Author: das
Date: Sun Oct 16 05:36:39 2011
New Revision: 226412
URL: http://svn.freebsd.org/changeset/base/226412

Log:
  Move the macros GET_LDBL_EXPSIGN() and SET_LDBL_EXPSIGN() into
  math_private.h, so they can be used elsewhere in the math library.

Modified:
  head/lib/msun/src/e_hypotl.c
  head/lib/msun/src/math_private.h

Modified: head/lib/msun/src/e_hypotl.c
==
--- head/lib/msun/src/e_hypotl.cSun Oct 16 05:36:23 2011
(r226411)
+++ head/lib/msun/src/e_hypotl.cSun Oct 16 05:36:39 2011
(r226412)
@@ -21,13 +21,6 @@ __FBSDID($FreeBSD$);
 #include math.h
 #include math_private.h
 
-#defineGET_LDBL_EXPSIGN(i, v) do { \
-   union IEEEl2bits uv;\
-   \
-   uv.e = v;   \
-   i = uv.xbits.expsign;   \
-} while (0)
-
 #defineGET_LDBL_MAN(h, l, v) do {  \
union IEEEl2bits uv;\
\
@@ -36,14 +29,6 @@ __FBSDID($FreeBSD$);
l = uv.bits.manl;   \
 } while (0)
 
-#defineSET_LDBL_EXPSIGN(v, i) do { \
-   union IEEEl2bits uv;\
-   \
-   uv.e = v;   \
-   uv.xbits.expsign = i;   \
-   v = uv.e;   \
-} while (0)
-
 #undef GET_HIGH_WORD
 #defineGET_HIGH_WORD(i, v) GET_LDBL_EXPSIGN(i, v)
 #undef SET_HIGH_WORD

Modified: head/lib/msun/src/math_private.h
==
--- head/lib/msun/src/math_private.hSun Oct 16 05:36:23 2011
(r226411)
+++ head/lib/msun/src/math_private.hSun Oct 16 05:36:39 2011
(r226412)
@@ -188,6 +188,25 @@ do {   
\
   (d) = sf_u.value;\
 } while (0)
 
+/* Get expsign as a 16 bit int from a long double.  */
+
+#defineGET_LDBL_EXPSIGN(i,d)   \
+do {   \
+  union IEEEl2bits ge_u;   \
+  ge_u.e = (d);\
+  (i) = ge_u.xbits.expsign;\
+} while (0)
+
+/* Set expsign of a long double from a 16 bit int.  */
+
+#defineSET_LDBL_EXPSIGN(d,v)   \
+do {   \
+  union IEEEl2bits se_u;   \
+  se_u.e = (d);\
+  se_u.xbits.expsign = (v);\
+  (d) = se_u.e;\
+} while (0)
+
 #ifdef FLT_EVAL_METHOD
 /*
  * Attempt to get strict C99 semantics for assignment with non-C99 compilers.
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226413 - head/lib/msun/src

2011-10-15 Thread David Schultz
Author: das
Date: Sun Oct 16 05:37:01 2011
New Revision: 226413
URL: http://svn.freebsd.org/changeset/base/226413

Log:
  Optimize the case of pure imaginary arguments.  Calls like this are
  common, e.g., in DFT implementations.
  
  Discussed with:   bde, kargl

Modified:
  head/lib/msun/src/s_cexp.c
  head/lib/msun/src/s_cexpf.c

Modified: head/lib/msun/src/s_cexp.c
==
--- head/lib/msun/src/s_cexp.c  Sun Oct 16 05:36:39 2011(r226412)
+++ head/lib/msun/src/s_cexp.c  Sun Oct 16 05:37:01 2011(r226413)
@@ -56,8 +56,12 @@ cexp(double complex z)
/* cexp(x + I 0) = exp(x) + I 0 */
if ((hy | ly) == 0)
return (cpack(exp(x), y));
+   EXTRACT_WORDS(hx, lx, x);
+   /* cexp(0 + I y) = cos(y) + I sin(y) */
+   if (((hx  0x7fff) | lx) == 0)
+   return (cpack(cos(y), sin(y)));
+
if (hy = 0x7ff0) {
-   EXTRACT_WORDS(hx, lx, x);
if (lx != 0 || (hx  0x7fff) != 0x7ff0) {
/* cexp(finite|NaN +- I Inf|NaN) = NaN + I NaN */
return (cpack(y - y, y - y));
@@ -70,7 +74,6 @@ cexp(double complex z)
}
}
 
-   GET_HIGH_WORD(hx, x);
if (hx = exp_ovfl  hx = cexp_ovfl) {
/*
 * x is between 709.7 and 1454.3, so we must scale to avoid

Modified: head/lib/msun/src/s_cexpf.c
==
--- head/lib/msun/src/s_cexpf.c Sun Oct 16 05:36:39 2011(r226412)
+++ head/lib/msun/src/s_cexpf.c Sun Oct 16 05:37:01 2011(r226413)
@@ -57,6 +57,10 @@ cexpf(float complex z)
if (hy == 0)
return (cpackf(expf(x), y));
GET_FLOAT_WORD(hx, x);
+   /* cexp(0 + I y) = cos(y) + I sin(y) */
+   if ((hx  0x7fff) == 0)
+   return (cpackf(cosf(y), sinf(y)));
+
if (hy = 0x7f80) {
if ((hx  0x7fff) != 0x7f80) {
/* cexp(finite|NaN +- I Inf|NaN) = NaN + I NaN */
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226414 - head/lib/msun/bsdsrc

2011-10-15 Thread David Schultz
Author: das
Date: Sun Oct 16 05:37:20 2011
New Revision: 226414
URL: http://svn.freebsd.org/changeset/base/226414

Log:
  Fix some non-standard variable declarations.

Modified:
  head/lib/msun/bsdsrc/b_exp.c

Modified: head/lib/msun/bsdsrc/b_exp.c
==
--- head/lib/msun/bsdsrc/b_exp.cSun Oct 16 05:37:01 2011
(r226413)
+++ head/lib/msun/bsdsrc/b_exp.cSun Oct 16 05:37:20 2011
(r226414)
@@ -74,16 +74,16 @@ __FBSDID($FreeBSD$);
 
 #include mathimpl.h
 
-const static double p1 = 0x1.5553ep-3;
-const static double p2 = -0x1.6c16c16bebd93p-9;
-const static double p3 = 0x1.1566aaf25de2cp-14;
-const static double p4 = -0x1.bbd41c5d26bf1p-20;
-const static double p5 = 0x1.6376972bea4d0p-25;
-const static double ln2hi = 0x1.62e42fee0p-1;
-const static double ln2lo = 0x1.a39ef35793c76p-33;
-const static double lnhuge = 0x1.6602b15b7ecf2p9;
-const static double lntiny = -0x1.77af8ebeae354p9;
-const static double invln2 = 0x1.71547652b82fep0;
+static const double p1 = 0x1.5553ep-3;
+static const double p2 = -0x1.6c16c16bebd93p-9;
+static const double p3 = 0x1.1566aaf25de2cp-14;
+static const double p4 = -0x1.bbd41c5d26bf1p-20;
+static const double p5 = 0x1.6376972bea4d0p-25;
+static const double ln2hi = 0x1.62e42fee0p-1;
+static const double ln2lo = 0x1.a39ef35793c76p-33;
+static const double lnhuge = 0x1.6602b15b7ecf2p9;
+static const double lntiny = -0x1.77af8ebeae354p9;
+static const double invln2 = 0x1.71547652b82fep0;
 
 #if 0
 double exp(x)
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r226415 - in head/lib/msun: amd64 arm i387 ia64 mips powerpc sparc64

2011-10-15 Thread David Schultz
Author: das
Date: Sun Oct 16 05:37:56 2011
New Revision: 226415
URL: http://svn.freebsd.org/changeset/base/226415

Log:
  Use #include fenv.h instead of #include fenv.h.  This makes it
  more convenient to compile the math library by itself.
  
  Requested by: bde

Modified:
  head/lib/msun/amd64/fenv.c
  head/lib/msun/arm/fenv.c
  head/lib/msun/i387/fenv.c
  head/lib/msun/ia64/fenv.c
  head/lib/msun/mips/fenv.c
  head/lib/msun/powerpc/fenv.c
  head/lib/msun/sparc64/fenv.c

Modified: head/lib/msun/amd64/fenv.c
==
--- head/lib/msun/amd64/fenv.c  Sun Oct 16 05:37:20 2011(r226414)
+++ head/lib/msun/amd64/fenv.c  Sun Oct 16 05:37:56 2011(r226415)
@@ -31,7 +31,7 @@
 #include machine/fpu.h
 
 #define__fenv_static
-#include fenv.h
+#include fenv.h
 
 #ifdef __GNUC_GNU_INLINE__
 #error This file must be compiled with C99 'inline' semantics

Modified: head/lib/msun/arm/fenv.c
==
--- head/lib/msun/arm/fenv.cSun Oct 16 05:37:20 2011(r226414)
+++ head/lib/msun/arm/fenv.cSun Oct 16 05:37:56 2011(r226415)
@@ -27,7 +27,7 @@
  */
 
 #define__fenv_static
-#include fenv.h
+#include fenv.h
 
 #ifdef __GNUC_GNU_INLINE__
 #error This file must be compiled with C99 'inline' semantics

Modified: head/lib/msun/i387/fenv.c
==
--- head/lib/msun/i387/fenv.c   Sun Oct 16 05:37:20 2011(r226414)
+++ head/lib/msun/i387/fenv.c   Sun Oct 16 05:37:56 2011(r226415)
@@ -31,7 +31,7 @@
 #include machine/npx.h
 
 #define__fenv_static
-#include fenv.h
+#include fenv.h
 
 #ifdef __GNUC_GNU_INLINE__
 #error This file must be compiled with C99 'inline' semantics

Modified: head/lib/msun/ia64/fenv.c
==
--- head/lib/msun/ia64/fenv.c   Sun Oct 16 05:37:20 2011(r226414)
+++ head/lib/msun/ia64/fenv.c   Sun Oct 16 05:37:56 2011(r226415)
@@ -29,7 +29,7 @@
 #include sys/types.h
 
 #define__fenv_static
-#include fenv.h
+#include fenv.h
 
 #ifdef __GNUC_GNU_INLINE__
 #error This file must be compiled with C99 'inline' semantics

Modified: head/lib/msun/mips/fenv.c
==
--- head/lib/msun/mips/fenv.c   Sun Oct 16 05:37:20 2011(r226414)
+++ head/lib/msun/mips/fenv.c   Sun Oct 16 05:37:56 2011(r226415)
@@ -27,7 +27,7 @@
  */
 
 #define__fenv_static
-#include fenv.h
+#include fenv.h
 
 #ifdef __GNUC_GNU_INLINE__
 #error This file must be compiled with C99 'inline' semantics

Modified: head/lib/msun/powerpc/fenv.c
==
--- head/lib/msun/powerpc/fenv.cSun Oct 16 05:37:20 2011
(r226414)
+++ head/lib/msun/powerpc/fenv.cSun Oct 16 05:37:56 2011
(r226415)
@@ -27,7 +27,7 @@
  */
 
 #define__fenv_static
-#include fenv.h
+#include fenv.h
 
 #ifdef __GNUC_GNU_INLINE__
 #error This file must be compiled with C99 'inline' semantics

Modified: head/lib/msun/sparc64/fenv.c
==
--- head/lib/msun/sparc64/fenv.cSun Oct 16 05:37:20 2011
(r226414)
+++ head/lib/msun/sparc64/fenv.cSun Oct 16 05:37:56 2011
(r226415)
@@ -27,7 +27,7 @@
  */
 
 #define__fenv_static
-#include fenv.h
+#include fenv.h
 
 #ifdef __GNUC_GNU_INLINE__
 #error This file must be compiled with C99 'inline' semantics
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org