PERFORCE change 52467 for review

Marcel Moolenaar marcel at FreeBSD.org
Fri May 7 18:15:04 PDT 2004


http://perforce.freebsd.org/chv.cgi?CH=52467

Change 52467 by marcel at marcel_nfs on 2004/05/07 18:14:54

	IFC @52456

Affected files ...

.. //depot/projects/gdb/lib/msun/Makefile#2 integrate
.. //depot/projects/gdb/lib/msun/man/ieee.3#2 integrate
.. //depot/projects/gdb/lib/msun/src/math.h#4 integrate
.. //depot/projects/gdb/lib/msun/src/s_copysignl.c#1 branch
.. //depot/projects/gdb/sbin/route/route.c#6 integrate
.. //depot/projects/gdb/share/man/man4/man4.i386/cp.4#1 branch
.. //depot/projects/gdb/share/man/man5/link.5#2 integrate
.. //depot/projects/gdb/share/man/man5/style.Makefile.5#2 integrate
.. //depot/projects/gdb/share/mk/bsd.lib.mk#4 integrate
.. //depot/projects/gdb/sys/dev/ctau/if_ct.c#2 integrate
.. //depot/projects/gdb/sys/dev/cx/if_cx.c#4 integrate
.. //depot/projects/gdb/sys/kern/tty_compat.c#3 integrate
.. //depot/projects/gdb/sys/sys/user.h#4 integrate
.. //depot/projects/gdb/sys/vm/vm_glue.c#7 integrate
.. //depot/projects/gdb/usr.bin/ctags/ctags.c#2 integrate
.. //depot/projects/gdb/usr.sbin/sysinstall/config.c#2 integrate
.. //depot/projects/gdb/usr.sbin/sysinstall/install.c#4 integrate

Differences ...

==== //depot/projects/gdb/lib/msun/Makefile#2 (text+ko) ====

@@ -1,5 +1,5 @@
 #  @(#)Makefile 5.1beta 93/09/24
-# $FreeBSD: src/lib/msun/Makefile,v 1.37 2003/10/25 09:32:18 des Exp $
+# $FreeBSD: src/lib/msun/Makefile,v 1.39 2004/05/07 18:56:31 stefanf Exp $
 #
 #  ====================================================
 #  Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -102,7 +102,7 @@
 CFLAGS+=	-I${LIBCDIR}/include -I${LIBCDIR}/${MACHINE_ARCH}
 
 # C99 long double functions
-COMMON_SRCS+=	s_fabsl.c
+COMMON_SRCS+=	s_copysignl.c s_fabsl.c
 
 # FreeBSD's C library supplies these functions:
 #COMMON_SRCS+=	s_fabs.c s_frexp.c s_isnan.c s_ldexp.c s_modf.c
@@ -139,11 +139,12 @@
 	exp.3 expf.3 exp.3 exp10.3 exp.3 exp10f.3 \
 	exp.3 expm1f.3 exp.3 logf.3 exp.3 powf.3 \
 	exp.3 log10f.3 exp.3 log1pf.3
-MLINKS+=fabs.3 fabsf.3
+MLINKS+=fabs.3 fabsf.3 fabs.3 fabsl.3
 MLINKS+=floor.3 floorf.3
 MLINKS+=fmod.3 fmodf.3
 MLINKS+=hypot.3 cabs.3 hypot.3 cabsf.3 hypot.3 hypotf.3
-MLINKS+=ieee.3 copysign.3 ieee.3 copysignf.3 ieee.3 finite.3 ieee.3 finitef.3 \
+MLINKS+=ieee.3 copysign.3 ieee.3 copysignf.3 ieee.3 copysignl.3 \
+	ieee.3 finite.3 ieee.3 finitef.3 \
 	ieee.3 ilogb.3 ieee.3 ilogbf.3 ieee.3 nextafter.3 ieee.3 nextafterf.3 \
 	ieee.3 remainder.3 ieee.3 remainderf.3 ieee.3 scalbn.3 ieee.3 scalbnf.3
 MLINKS+=ieee_test.3 logb.3 ieee_test.3 logbf.3

==== //depot/projects/gdb/lib/msun/man/ieee.3#2 (text+ko) ====

@@ -30,7 +30,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     from: @(#)ieee.3	6.4 (Berkeley) 5/6/91
-.\" $FreeBSD: src/lib/msun/man/ieee.3,v 1.12 2001/10/15 13:34:43 dd Exp $
+.\" $FreeBSD: src/lib/msun/man/ieee.3,v 1.13 2004/05/07 18:56:31 stefanf Exp $
 .\"
 .Dd February 25, 1994
 .Dt IEEE 3
@@ -38,6 +38,7 @@
 .Sh NAME
 .Nm copysign ,
 .Nm copysignf ,
+.Nm copysignl ,
 .Nm finite ,
 .Nm finitef ,
 .Nm ilogb ,
@@ -57,6 +58,8 @@
 .Fn copysign "double x" "double y"
 .Ft float
 .Fn copysignf "float x" "float y"
+.Ft long double
+.Fn copysignl "long double x" "long double y"
 .Ft int
 .Fn finite "double x"
 .Ft int
@@ -81,9 +84,10 @@
 These functions are required or recommended by
 .St -ieee754 .
 .Pp
-.Fn copysign
+.Fn copysign ,
+.Fn copysignf
 and
-.Fn copysignf
+.Fn copysignl
 return
 .Fa x
 with its sign changed to
@@ -179,5 +183,9 @@
 .Nm ieee
 functions appeared in
 .Bx 4.3 .
+The
+.Fn copysignl
+function first appeared in
+.Fx 5.3 .
 .Sh STANDARDS
 .St -ieee754

==== //depot/projects/gdb/lib/msun/src/math.h#4 (text+ko) ====

@@ -11,7 +11,7 @@
 
 /*
  * from: @(#)fdlibm.h 5.1 93/09/24
- * $FreeBSD: src/lib/msun/src/math.h,v 1.31 2004/04/25 02:35:42 das Exp $
+ * $FreeBSD: src/lib/msun/src/math.h,v 1.32 2004/05/07 18:56:31 stefanf Exp $
  */
 
 #ifndef _MATH_H_
@@ -353,7 +353,9 @@
 long double	atanl(long double);
 long double	cbrtl(long double);
 long double	ceill(long double);
+#endif
 long double	copysignl(long double, long double);
+#if 0
 long double	coshl(long double);
 long double	cosl(long double);
 long double	erfcl(long double);

==== //depot/projects/gdb/sbin/route/route.c#6 (text+ko) ====

@@ -38,7 +38,7 @@
 static char sccsid[] = "@(#)route.c	8.6 (Berkeley) 4/28/95";
 #endif
 static const char rcsid[] =
-  "$FreeBSD: src/sbin/route/route.c,v 1.74 2004/05/03 16:30:32 andre Exp $";
+  "$FreeBSD: src/sbin/route/route.c,v 1.75 2004/05/07 15:33:17 csjp Exp $";
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -273,6 +273,8 @@
 		rtm->rtm_type = RTM_DELETE;
 		rtm->rtm_seq = seqno;
 		rlen = write(s, next, rtm->rtm_msglen);
+		if (rlen < 0 && errno == EPERM)
+			err(1, "write to routing socket");
 		if (rlen < (int)rtm->rtm_msglen) {
 			warn("write to routing socket");
 			(void) printf("got only %d for rlen\n", rlen);
@@ -1223,6 +1225,8 @@
 	if (debugonly)
 		return (0);
 	if ((rlen = write(s, (char *)&m_rtmsg, l)) < 0) {
+		if (errno == EPERM)
+			err(1, "writing to routing socket");
 		warn("writing to routing socket");
 		return (-1);
 	}

==== //depot/projects/gdb/share/man/man5/link.5#2 (text+ko) ====

@@ -26,7 +26,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/share/man/man5/link.5,v 1.26 2003/09/08 19:57:20 ru Exp $
+.\" $FreeBSD: src/share/man/man5/link.5,v 1.27 2004/05/07 13:00:01 brueffer Exp $
 .\"
 .Dd October 23, 1993
 .Dt LINK 5
@@ -295,7 +295,7 @@
 .Fa sod
 structure that was responsible for loading this shared object.
 .It Fa som_sodbase
-Tossed in later versions the run-time linker.
+Tossed out in later versions of the run-time linker.
 .It Fa som_write
 Set if (some portion of) this object's text segment is currently writable.
 .It Fa som_dynamic
@@ -393,7 +393,7 @@
 Virtual address of next rt_symbol.
 .It Fa rt_link
 Next in hash bucket.
-Used by internally by
+Used internally by
 .Nm ld.so .
 .It Fa rt_srcaddr
 Location of the source of initialized data within a shared object.
@@ -436,7 +436,7 @@
 .It Fa dd_sym_loaded
 Set by the run-time linker whenever it adds symbols by loading shared objects.
 .It Fa dd_bpt_addr
-The address were a breakpoint will be set by the run-time linker to
+The address where a breakpoint will be set by the run-time linker to
 divert control to the debugger.
 This address is determined by the start-up
 module,

==== //depot/projects/gdb/share/man/man5/style.Makefile.5#2 (text+ko) ====

@@ -25,7 +25,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\" $FreeBSD: src/share/man/man5/style.Makefile.5,v 1.7 2003/09/08 19:57:20 ru Exp $
+.\" $FreeBSD: src/share/man/man5/style.Makefile.5,v 1.8 2004/05/07 09:59:03 des Exp $
 .\"
 .Dd February 28, 2003
 .Dt STYLE.MAKEFILE 5
@@ -70,7 +70,7 @@
 The general
 .Dq product
 order is:
-.Va PROG Ns / Ns Va LIB Ns / Ns Va SCRIPT
+.Va PROG Ns / Ns Oo Va SH Oc Ns Va LIB Ns / Ns Va SCRIPT
 .Va FILES
 .Va LINKS
 .Oo Va NO Oc Ns Va MAN
@@ -84,7 +84,7 @@
 The general
 .Dq build
 order is:
-.Va PROG Ns / Ns Va LIB Ns / Ns Va SCRIPT
+.Va PROG Ns / Ns Oo Va SH Oc Ns Va LIB Ns / Ns Va SCRIPT
 .Va SRCS
 .Va WARNS
 .Va CFLAGS

==== //depot/projects/gdb/share/mk/bsd.lib.mk#4 (text+ko) ====

@@ -1,5 +1,5 @@
 #	from: @(#)bsd.lib.mk	5.26 (Berkeley) 5/2/91
-# $FreeBSD: src/share/mk/bsd.lib.mk,v 1.159 2004/03/15 17:01:31 trhodes Exp $
+# $FreeBSD: src/share/mk/bsd.lib.mk,v 1.160 2004/05/07 09:58:36 des Exp $
 #
 
 .include <bsd.init.mk>
@@ -12,8 +12,11 @@
 .undef SHLIB_NAME
 .undef INSTALL_PIC_ARCHIVE
 .else
-.if !defined(SHLIB_NAME) && defined(LIB) && defined(SHLIB_MAJOR)
-SHLIB_NAME=	lib${LIB}.so.${SHLIB_MAJOR}
+.if !defined(SHLIB) && defined(LIB)
+SHLIB=		${LIB}
+.endif
+.if !defined(SHLIB_NAME) && defined(SHLIB) && defined(SHLIB_MAJOR)
+SHLIB_NAME=	lib${SHLIB}.so.${SHLIB_MAJOR}
 .endif
 .if defined(SHLIB_NAME) && !empty(SHLIB_NAME:M*.so.*)
 SHLIB_LINK?=	${SHLIB_NAME:R}

==== //depot/projects/gdb/sys/dev/ctau/if_ct.c#2 (text+ko) ====

@@ -21,7 +21,7 @@
  * Cronyx Id: if_ct.c,v 1.1.2.22 2004/02/26 19:06:51 rik Exp $
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ctau/if_ct.c,v 1.2 2004/03/02 16:39:40 rik Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ctau/if_ct.c,v 1.4 2004/05/07 11:59:54 rik Exp $");
 
 #include <sys/param.h>
  
@@ -64,7 +64,7 @@
 #   include <i386/isa/intr_machdep.h>
 #   endif
 #endif
-#if __FreeBSD_version >= 500000
+#if __FreeBSD_version >= 400000
 #include <dev/cx/machdep.h>
 #include <dev/ctau/ctddk.h>
 #include <dev/cx/cronyxfw.h>
@@ -78,7 +78,7 @@
 #   include "opt_netgraph.h"
 #   include <netgraph/ng_message.h>
 #   include <netgraph/netgraph.h>
-#if __FreeBSD_version >= 500000
+#if __FreeBSD_version >= 400000
 #   include <dev/ctau/ng_ct.h>
 #else
 #   include <netgraph/ng_ct.h>
@@ -107,6 +107,11 @@
 #endif
 #endif
 
+/* If we don't have Cronyx's sppp version, we don't have fr support via sppp */
+#ifndef PP_FR
+#define PP_FR 0
+#endif
+
 #define CT_DEBUG(d,s)	({if (d->chan->debug) {\
 				printf ("%s: ", d->name); printf s;}})
 #define CT_DEBUG2(d,s)	({if (d->chan->debug>1) {\
@@ -1333,7 +1338,7 @@
 
 #ifndef NETGRAPH
 	case SERIAL_GETPROTO:
-	        strcpy ((char*)data, /*(d->pp.pp_flags & PP_FR) ? "fr" :*/
+	        strcpy ((char*)data, (d->pp.pp_flags & PP_FR) ? "fr" :
 	                (d->pp.pp_if.if_flags & PP_CISCO) ? "cisco" : "ppp");
 	        return 0;
 
@@ -1351,21 +1356,21 @@
 		if (d->pp.pp_if.if_flags & IFF_RUNNING)
 			return EBUSY;
 	        if (! strcmp ("cisco", (char*)data)) {
-/*	                d->pp.pp_flags &= ~(PP_FR);*/
+	                d->pp.pp_flags &= ~(PP_FR);
 	                d->pp.pp_flags |= PP_KEEPALIVE;
 	                d->pp.pp_if.if_flags |= PP_CISCO;
-/*	        } else if (! strcmp ("fr", (char*)data)) {
+	        } else if (! strcmp ("fr", (char*)data)) {
 	                d->pp.pp_if.if_flags &= ~(PP_CISCO);
-	                d->pp.pp_flags |= PP_FR | PP_KEEPALIVE;*/
+	                d->pp.pp_flags |= PP_FR | PP_KEEPALIVE;
 	        } else if (! strcmp ("ppp", (char*)data)) {
-	                d->pp.pp_flags &= ~(/*PP_FR | */PP_KEEPALIVE);
+	                d->pp.pp_flags &= ~(PP_FR | PP_KEEPALIVE);
 	                d->pp.pp_if.if_flags &= ~(PP_CISCO);
 	        } else
 			return EINVAL;
 	        return 0;
 
 	case SERIAL_GETKEEPALIVE:
-		if (/*(d->pp.pp_flags & PP_FR) ||*/
+		if ((d->pp.pp_flags & PP_FR) ||
 			(d->pp.pp_if.if_flags & PP_CISCO))
 			return EINVAL;
 	        *(int*)data = (d->pp.pp_flags & PP_KEEPALIVE) ? 1 : 0;
@@ -1382,7 +1387,7 @@
 #endif /* __FreeBSD_version >= 500000 */
 	        if (error)
 	                return error;
-		if (/*(d->pp.pp_flags & PP_FR) ||*/
+		if ((d->pp.pp_flags & PP_FR) ||
 			(d->pp.pp_if.if_flags & PP_CISCO))
 			return EINVAL;
 	        if (*(int*)data)

==== //depot/projects/gdb/sys/dev/cx/if_cx.c#4 (text+ko) ====

@@ -22,7 +22,7 @@
  * Cronyx Id: if_cx.c,v 1.1.2.23 2004/02/26 17:56:40 rik Exp $
  */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/cx/if_cx.c,v 1.7 2004/03/02 16:44:07 rik Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/cx/if_cx.c,v 1.10 2004/05/07 11:45:25 rik Exp $");
 
 #include <sys/param.h>
 
@@ -67,7 +67,7 @@
 #       include <i386/isa/intr_machdep.h>
 #   endif
 #endif
-#if __FreeBSD_version >= 500000
+#if __FreeBSD_version >= 400000
 #   include <dev/cx/machdep.h>
 #   include <dev/cx/cxddk.h>
 #   include <dev/cx/cronyxfw.h>
@@ -81,7 +81,7 @@
 #   include "opt_netgraph.h"
 #   include <netgraph/ng_message.h>
 #   include <netgraph/netgraph.h>
-#   if __FreeBSD_version >= 500000
+#   if __FreeBSD_version >= 400000
 #       include <dev/cx/ng_cx.h>
 #   else
 #       include <netgraph/ng_cx.h>
@@ -91,7 +91,7 @@
 #   if __FreeBSD_version < 500000
 #   include "sppp.h"
 #   if NSPPP <= 0
-#	error The device cp requires sppp or netgraph.
+#	error The device cx requires sppp or netgraph.
 #   endif
 #   endif
 #   include <net/if_sppp.h>
@@ -110,6 +110,11 @@
 #endif
 #endif
 
+/* If we don't have Cronyx's sppp version, we don't have fr support via sppp */
+#ifndef PP_FR
+#define PP_FR 0
+#endif
+
 #define CX_DEBUG(d,s)	({if (d->chan->debug) {\
 				printf ("%s: ", d->name); printf s;}})
 #define CX_DEBUG2(d,s)	({if (d->chan->debug>1) {\
@@ -226,7 +231,6 @@
 static swihand_t cx_softintr;
 #else
 static void cx_softintr (void *);
-static void *cx_slow_ih;
 static void *cx_fast_ih;
 #endif
 static void cx_down (drv_t *d);
@@ -1810,7 +1814,7 @@
 	        CX_DEBUG2 (d, ("ioctl: getproto\n"));
 		s = splhigh ();
 	        strcpy ((char*)data, (c->mode == M_ASYNC) ? "async" :
-			/*(d->pp.pp_flags & PP_FR) ? "fr" :*/
+			(d->pp.pp_flags & PP_FR) ? "fr" :
 			(d->pp.pp_if.if_flags & PP_CISCO) ? "cisco" : "ppp");
 		splx (s);
 	        return 0;
@@ -1832,14 +1836,14 @@
 		if (d->pp.pp_if.if_flags & IFF_RUNNING)
 			return EBUSY;
 	        if (! strcmp ("cisco", (char*)data)) {
-/*	                d->pp.pp_flags &= ~(PP_FR);*/
+	                d->pp.pp_flags &= ~(PP_FR);
 	                d->pp.pp_flags |= PP_KEEPALIVE;
 	                d->pp.pp_if.if_flags |= PP_CISCO;
-/*	        } else if (! strcmp ("fr", (char*)data)) {*/
-/*	                d->pp.pp_if.if_flags &= ~(PP_CISCO);*/
-/*	                d->pp.pp_flags |= PP_FR | PP_KEEPALIVE;*/
+	        } else if (! strcmp ("fr", (char*)data)) {
+	                d->pp.pp_if.if_flags &= ~(PP_CISCO);
+	                d->pp.pp_flags |= PP_FR | PP_KEEPALIVE;
 	        } else if (! strcmp ("ppp", (char*)data)) {
-	                d->pp.pp_flags &= ~(/*PP_FR |*/ PP_KEEPALIVE);
+	                d->pp.pp_flags &= ~(PP_FR | PP_KEEPALIVE);
 	                d->pp.pp_if.if_flags &= ~(PP_CISCO);
 	        } else
 			return EINVAL;
@@ -1847,7 +1851,7 @@
 
 	case SERIAL_GETKEEPALIVE:
 	        CX_DEBUG2 (d, ("ioctl: getkeepalive\n"));
-	        if (/*(d->pp.pp_flags & PP_FR) ||*/
+	        if ((d->pp.pp_flags & PP_FR) ||
 		    (d->pp.pp_if.if_flags & PP_CISCO) ||
 		    (c->mode == M_ASYNC))
 			return EINVAL;
@@ -1868,7 +1872,7 @@
 #endif /* __FreeBSD_version >= 500000 */
 	        if (error)
 	                return error;
-	        if (/*(d->pp.pp_flags & PP_FR) ||*/
+	        if ((d->pp.pp_flags & PP_FR) ||
 			(d->pp.pp_if.if_flags & PP_CISCO))
 			return EINVAL;
 		s = splhigh ();
@@ -3145,8 +3149,6 @@
 #else
 		swi_add(&tty_ithd, "tty:cx", cx_softintr, NULL, SWI_TTY, 0,
 		    &cx_fast_ih);
-		swi_add(&clk_ithd, "tty:cx", cx_softintr, NULL, SWI_TTY, 0,
-		    &cx_slow_ih);
 #endif
 		break;
 	case MOD_UNLOAD:
@@ -3163,7 +3165,6 @@
 			untimeout (cx_timeout, 0, timeout_handle);
 #if __FreeBSD_version >= 500000
 		ithread_remove_handler (cx_fast_ih);
-		ithread_remove_handler (cx_slow_ih);
 #else
 		unregister_swi (SWI_TTY, cx_softintr);
 #endif

==== //depot/projects/gdb/sys/kern/tty_compat.c#3 (text+ko) ====

@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/tty_compat.c,v 1.33 2004/04/05 21:03:36 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/tty_compat.c,v 1.34 2004/05/07 15:35:38 cognet Exp $");
 
 #include "opt_compat.h"
 
@@ -137,7 +137,7 @@
 		cc[VSTOP] = tc->t_stopc;
 		cc[VEOF] = tc->t_eofc;
 		cc[VEOL] = tc->t_brkc;
-		if (tc->t_brkc == -1)
+		if (tc->t_brkc == (char)_POSIX_VDISABLE)
 			cc[VEOL2] = _POSIX_VDISABLE;
 		*com = TIOCSETA;
 		break;

==== //depot/projects/gdb/sys/sys/user.h#4 (text+ko) ====

@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)user.h	8.2 (Berkeley) 9/23/93
- * $FreeBSD: src/sys/sys/user.h,v 1.55 2004/04/07 04:19:50 imp Exp $
+ * $FreeBSD: src/sys/sys/user.h,v 1.56 2004/05/07 15:37:56 cognet Exp $
  */
 
 #ifndef _SYS_USER_H_
@@ -74,7 +74,7 @@
     defined(__amd64__)
 #define	KINFO_PROC_SIZE	912		/* the correct size for kinfo_proc */
 #endif
-#ifdef	__i386__
+#if	__i386__ || defined __arm__
 #define	KINFO_PROC_SIZE	648		/* the correct size for kinfo_proc */
 #endif
 #ifdef  __powerpc__

==== //depot/projects/gdb/sys/vm/vm_glue.c#7 (text+ko) ====

@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/vm/vm_glue.c,v 1.196 2004/04/06 20:15:36 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/vm/vm_glue.c,v 1.197 2004/05/07 11:43:24 green Exp $");
 
 #include "opt_vm.h"
 #include "opt_kstack_pages.h"
@@ -216,7 +216,7 @@
 		return (EAGAIN);
 #endif
 	error = vm_map_wire(&curproc->p_vmspace->vm_map, start, end,
-	    VM_MAP_WIRE_USER | VM_MAP_WIRE_NOHOLES);
+	    VM_MAP_WIRE_SYSTEM | VM_MAP_WIRE_NOHOLES);
 	/*
 	 * Return EFAULT on error to match copy{in,out}() behaviour
 	 * rather than returning ENOMEM like mlock() would.

==== //depot/projects/gdb/usr.bin/ctags/ctags.c#2 (text+ko) ====

@@ -44,11 +44,14 @@
 #endif
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/ctags/ctags.c,v 1.18 2002/07/28 15:50:38 dwmalone Exp $");
+#include <sys/types.h>
+#include <sys/wait.h>
+__FBSDID("$FreeBSD: src/usr.bin/ctags/ctags.c,v 1.19 2004/05/07 19:44:40 cjc Exp $");
 
 #include <err.h>
 #include <limits.h>
 #include <locale.h>
+#include <regex.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -94,7 +97,6 @@
 	int	exit_val;			/* exit value */
 	int	step;				/* step through args */
 	int	ch;				/* getopts char */
-	char	*cmd;
 
 	setlocale(LC_ALL, "");
 
@@ -164,16 +166,38 @@
 			put_entries(head);
 		else {
 			if (uflag) {
+				FILE *oldf;
+				regex_t *regx;
+
+				if ((oldf = fopen(outfile, "r")) == NULL)
+					err(1, "opening %s", outfile);
+				if (unlink(outfile))
+					err(1, "unlinking %s", outfile);
+				if ((outf = fopen(outfile, "w")) == NULL)
+					err(1, "recreating %s", outfile);
+				if ((regx = calloc(argc, sizeof(regex_t))) == NULL)
+					err(1, "RE alloc");
 				for (step = 0; step < argc; step++) {
-					(void)asprintf(&cmd,
-					    "mv %s OTAGS; fgrep -v '\t%s\t' OTAGS >%s; rm OTAGS",
-					    outfile, argv[step], outfile);
-					if (cmd == NULL)
-						err(1, "out of space");
-					system(cmd);
-					free(cmd);
-					cmd = NULL;
+					(void)strcpy(lbuf, "\t");
+					(void)strlcat(lbuf, argv[step], LINE_MAX);
+					(void)strlcat(lbuf, "\t", LINE_MAX);
+					if (regcomp(regx + step, lbuf,
+					    REG_NOSPEC))
+						warn("RE compilation failed");
+				}
+nextline:
+				while (fgets(lbuf, LINE_MAX, oldf)) {
+					for (step = 0; step < argc; step++)
+						if (regexec(regx + step,
+						    lbuf, 0, NULL, 0) == 0)
+							goto nextline;
+					fputs(lbuf, outf);
 				}
+				for (step = 0; step < argc; step++)
+					regfree(regx + step);
+				free(regx);
+				fclose(oldf);
+				fclose(outf);
 				++aflag;
 			}
 			if (!(outf = fopen(outfile, aflag ? "a" : "w")))
@@ -181,13 +205,18 @@
 			put_entries(head);
 			(void)fclose(outf);
 			if (uflag) {
-				(void)asprintf(&cmd, "sort -o %s %s",
-				    outfile, outfile);
-				if (cmd == NULL)
-					err(1, "out of space");
-				system(cmd);
-				free(cmd);
-				cmd = NULL;
+				pid_t pid;
+
+				if ((pid = fork()) == -1)
+					err(1, "fork failed");
+				else if (pid == 0) {
+					execlp("sort", "sort", "-o", outfile,
+					    outfile, NULL);
+					err(1, "exec of sort failed");
+				}
+				/* Just assume the sort went OK. The old code
+				   did not do any checks either. */
+				(void)wait(NULL);
 			}
 		}
 	}

==== //depot/projects/gdb/usr.sbin/sysinstall/config.c#2 (text+ko) ====

@@ -4,7 +4,7 @@
  * This is probably the last program in the `sysinstall' line - the next
  * generation being essentially a complete rewrite.
  *
- * $FreeBSD: src/usr.sbin/sysinstall/config.c,v 1.221 2004/01/02 09:33:58 obrien Exp $
+ * $FreeBSD: src/usr.sbin/sysinstall/config.c,v 1.222 2004/05/07 19:15:55 jhb Exp $
  *
  * Copyright (c) 1995
  *	Jordan Hubbard.  All rights reserved.
@@ -212,7 +212,8 @@
 			chunk_list[nchunks++] = c2;
 		}
 	    }
-	    else if ((c1->type == fat || c1->type == efi) && c1->private_data)
+	    else if (((c1->type == fat || c1->type == efi || c1->type == part) &&
+		    c1->private_data) || (c1->type == part && c1->subtype == FS_SWAP))
 		chunk_list[nchunks++] = c1;
 	}
     }

==== //depot/projects/gdb/usr.sbin/sysinstall/install.c#4 (text+ko) ====

@@ -4,7 +4,7 @@
  * This is probably the last program in the `sysinstall' line - the next
  * generation being essentially a complete rewrite.
  *
- * $FreeBSD: src/usr.sbin/sysinstall/install.c,v 1.352 2004/03/11 18:50:05 jhb Exp $
+ * $FreeBSD: src/usr.sbin/sysinstall/install.c,v 1.353 2004/05/07 19:15:56 jhb Exp $
  *
  * Copyright (c) 1995
  *	Jordan Hubbard.  All rights reserved.
@@ -1036,8 +1036,14 @@
 	    return DITEM_FAILURE | DITEM_RESTORE;
 	}
 	for (c1 = disk->chunks->part; c1; c1 = c1->next) {
+#ifndef __ia64__
 	    if (c1->type == freebsd) {
 		for (c2 = c1->part; c2; c2 = c2->next) {
+#else
+	if (c1->type == part) {
+		c2 = c1;
+		{
+#endif
 		    if (c2->type == part && c2->subtype != FS_SWAP && c2->private_data) {
 			PartInfo *tmp = (PartInfo *)c2->private_data;
 


More information about the p4-projects mailing list