From owner-freebsd-standards Sun Apr 21 3:46: 4 2002 Delivered-To: freebsd-standards@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0720B37B416; Sun, 21 Apr 2002 03:46:03 -0700 (PDT) Received: (from tjr@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3LAk2w07443; Sun, 21 Apr 2002 03:46:02 -0700 (PDT) (envelope-from tjr) Date: Sun, 21 Apr 2002 03:46:02 -0700 (PDT) From: Message-Id: <200204211046.g3LAk2w07443@freefall.freebsd.org> To: schweikh@schweikhardt.net, tjr@FreeBSD.org, freebsd-standards@FreeBSD.org Subject: Re: bin/11114: make(1) does not work as documented with .POSIX: target Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Synopsis: make(1) does not work as documented with .POSIX: target State-Changed-From-To: open->feedback State-Changed-By: tjr State-Changed-When: Sun Apr 21 03:43:35 PDT 2002 State-Changed-Why: Solution proposed, waiting for confirmation from originator. http://www.freebsd.org/cgi/query-pr.cgi?pr=11114 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Apr 22 16: 5:44 2002 Delivered-To: freebsd-standards@freebsd.org Received: from treetop.robbins.dropbear.id.au (218.a.005.mel.iprimus.net.au [210.50.40.218]) by hub.freebsd.org (Postfix) with ESMTP id 9727137B507 for ; Mon, 22 Apr 2002 15:52:18 -0700 (PDT) Received: from treetop.robbins.dropbear.id.au (localhost [127.0.0.1]) by treetop.robbins.dropbear.id.au (8.12.2/8.12.2) with ESMTP id g3M7ooi1037883 for ; Mon, 22 Apr 2002 17:50:51 +1000 (EST) (envelope-from tim@treetop.robbins.dropbear.id.au) Received: (from tim@localhost) by treetop.robbins.dropbear.id.au (8.12.2/8.12.2/Submit) id g3M7omVH037882 for freebsd-standards@FreeBSD.ORG; Mon, 22 Apr 2002 17:50:49 +1000 (EST) Date: Mon, 22 Apr 2002 17:50:47 +1000 From: "Tim J. Robbins" To: freebsd-standards@FreeBSD.ORG Subject: df -t option Message-ID: <20020422175047.A37860@treetop.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I've attached a patch that adds the XSI df -t option, but with a twist: it uses -T because we already have a -t. The output format is modelled after the Solaris output format, but uses the minimum field width possible like BSD df usually does. As I see it, we have three ways of attacking the problem of the conflicting -t option: a) Scrap support for our current `-t type' option in favour of the standard b) Support -t with and without arguments via some heuristics c) Add it as -T and document that fact I'm leaning towards (c), but I'd be interested to hear what others think, or whether there's a better way to solve the problem. Tim Index: df.1 =================================================================== RCS file: /home/ncvs/src/bin/df/df.1,v retrieving revision 1.26 diff -u -r1.26 df.1 --- df.1 2002/04/16 20:00:45 1.26 +++ df.1 2002/04/22 08:45:15 @@ -32,7 +32,7 @@ .\" @(#)df.1 8.3 (Berkeley) 5/8/95 .\" $FreeBSD: src/bin/df/df.1,v 1.26 2002/04/16 20:00:45 charnier Exp $ .\" -.Dd May 8, 1995 +.Dd April 22, 2002 .Dt DF 1 .Os .Sh NAME @@ -44,7 +44,7 @@ .Fl b | h | H | k | .Fl m | P .Oc -.Op Fl ailn +.Op Fl ailnT .Op Fl t Ar type .Op Ar file | filesystem ... .Sh DESCRIPTION @@ -114,6 +114,13 @@ Note that this overrides the .Ev BLOCKSIZE specification from the environment. +.It Fl T +Print information about the number of blocks and files (inodes) in use +and available. When +.Fl T +is specified, the presence of +.Fl h +is ignored. .It Fl t Only print out statistics for filesystems of the specified types. More than one type may be specified in a comma separated list. @@ -145,12 +152,6 @@ .Ev BLOCKSIZE is set, the block counts will be displayed in units of that size block. .El -.Sh BUGS -The -.Fl n -and -.Fl t -flags are ignored if a file or filesystem is specified. .Sh SEE ALSO .Xr lsvfs 1 , .Xr quota 1 , @@ -161,8 +162,28 @@ .Xr fstab 5 , .Xr mount 8 , .Xr quot 8 +.Sh STANDARDS +The +.Nm +utility conforms to +.St -p1003.1-2001 . +Due to a conflict with the existing +.Bx +.Nm +.Fl t +option, the +.Tn XSI +.Fl t +option is present as +.Fl T . .Sh HISTORY A .Nm command appeared in .At v1 . +.Sh BUGS +The +.Fl n +and +.Fl t +flags are ignored if a file or filesystem is specified. Index: df.c =================================================================== RCS file: /home/ncvs/src/bin/df/df.c,v retrieving revision 1.37 diff -u -r1.37 df.c --- df.c 2002/03/26 20:32:37 1.37 +++ df.c 2002/04/22 08:45:17 @@ -93,10 +93,12 @@ /* Maximum widths of various fields. */ struct maxwidths { + int mnton; int mntfrom; int total; int used; int avail; + int itotal; int iused; int ifree; }; @@ -117,14 +119,16 @@ char **makevfslist(char *); void prthuman(struct statfs *, long); void prthumanval(double); +void prt(struct statfs *, struct maxwidths *); void prtstat(struct statfs *, struct maxwidths *); +void prttot(struct statfs *, struct maxwidths *); long regetmntinfo(struct statfs **, long, char **); int ufs_df(char *, struct maxwidths *); unit_t unit_adjust(double *); void update_maxwidths(struct maxwidths *, struct statfs *); void usage(void); -int aflag = 0, hflag, iflag, nflag; +int aflag = 0, hflag, iflag, nflag, Tflag; struct ufs_args mdev; static __inline int imax(int a, int b) @@ -146,7 +150,7 @@ fstype = "ufs"; vfslist = NULL; - while ((ch = getopt(argc, argv, "abgHhiklmnPt:")) != -1) + while ((ch = getopt(argc, argv, "abgHhiklmnPTt:")) != -1) switch (ch) { case 'a': aflag = 1; @@ -188,6 +192,9 @@ case 'n': nflag = 1; break; + case 'T': + Tflag = 1; + break; case 't': if (vfslist != NULL) errx(1, "only one -t option may be specified"); @@ -216,7 +223,7 @@ } for (i = 0; i < mntsize; i++) { if (aflag || (mntbuf[i].f_flags & MNT_IGNORE) == 0) - prtstat(&mntbuf[i], &maxwidths); + prt(&mntbuf[i], &maxwidths); } exit(rv); } @@ -252,7 +259,7 @@ continue; } else if (statfs(mntpt, &statfsbuf) == 0) { statfsbuf.f_mntonname[0] = '\0'; - prtstat(&statfsbuf, &maxwidths); + prt(&statfsbuf, &maxwidths); } else { warn("%s", *argv); rv = 1; @@ -277,7 +284,7 @@ bzero(&maxwidths, sizeof(maxwidths)); update_maxwidths(&maxwidths, &statfsbuf); } - prtstat(&statfsbuf, &maxwidths); + prt(&statfsbuf, &maxwidths); } return (rv); } @@ -383,6 +390,18 @@ (num) / ((bs) / (fsbs)) : (num) * ((fsbs) / (bs))) /* + * Print out status in requested format. + */ +void +prt(struct statfs *sfsp, struct maxwidths *mwp) +{ + if (!Tflag) + prtstat(sfsp, mwp); + else + prttot(sfsp, mwp); +} + +/* * Print out status about a filesystem. */ void @@ -442,6 +461,36 @@ } /* + * Print out total allocated-space figures for filesystem (-T option). + */ +void +prttot(struct statfs *sfsp, struct maxwidths *mwp) +{ + static long blocksize; + static int timesthrough; + int bwidth, dummy, fwidth; + + if (blocksize == 0) + (void)getbsize(&dummy, &blocksize); + + if (++timesthrough == 1) + mwp->mntfrom = imax(mwp->mntfrom, strlen("total")); + + bwidth = imax(mwp->used, mwp->total); + fwidth = imax(mwp->iused, mwp->itotal); + + (void)printf("%-*s (%-*s): %*ld blocks %*ld files\n", + mwp->mnton, sfsp->f_mntonname, mwp->mntfrom, sfsp->f_mntfromname, + bwidth, fsbtoblk(sfsp->f_blocks - sfsp->f_bfree, sfsp->f_bsize, + blocksize), fwidth, sfsp->f_files - sfsp->f_ffree); + (void)printf("%-*s %*s: %*ld blocks %*ld files\n", + mwp->mnton, "", mwp->mntfrom, "total", bwidth, + fsbtoblk(sfsp->f_blocks, sfsp->f_bsize, blocksize), fwidth, + sfsp->f_files); +} + + +/* * Update the maximum field-width information in `mwp' based on * the filesystem specified by `sfsp'. */ @@ -454,6 +503,7 @@ if (blocksize == 0) getbsize(&dummy, &blocksize); + mwp->mnton = imax(mwp->mnton, strlen(sfsp->f_mntonname)); mwp->mntfrom = imax(mwp->mntfrom, strlen(sfsp->f_mntfromname)); mwp->total = imax(mwp->total, longwidth(fsbtoblk(sfsp->f_blocks, sfsp->f_bsize, blocksize))); @@ -461,6 +511,7 @@ sfsp->f_bfree, sfsp->f_bsize, blocksize))); mwp->avail = imax(mwp->avail, longwidth(fsbtoblk(sfsp->f_bavail, sfsp->f_bsize, blocksize))); + mwp->itotal = imax(mwp->itotal, longwidth(sfsp->f_files)); mwp->iused = imax(mwp->iused, longwidth(sfsp->f_files - sfsp->f_ffree)); mwp->ifree = imax(mwp->ifree, longwidth(sfsp->f_ffree)); @@ -536,7 +587,7 @@ mntpt = ""; memmove(&sfsp->f_mntonname[0], mntpt, (size_t)MNAMELEN); memmove(&sfsp->f_mntfromname[0], file, (size_t)MNAMELEN); - prtstat(sfsp, mwp); + prt(sfsp, mwp); (void)close(rfd); return (0); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Apr 22 17:14:36 2002 Delivered-To: freebsd-standards@freebsd.org Received: from theshell.com (arsenic.theshell.com [63.236.138.5]) by hub.freebsd.org (Postfix) with SMTP id 3903A37B42F for ; Mon, 22 Apr 2002 17:14:19 -0700 (PDT) Received: (qmail 1147 invoked by uid 500); 23 Apr 2002 00:14:18 -0000 Date: Mon, 22 Apr 2002 17:14:18 -0700 From: Peter Avalos To: "Tim J. Robbins" Cc: freebsd-standards@FreeBSD.ORG Subject: Re: df -t option Message-ID: <20020423001418.GA896@theshell.com> Mail-Followup-To: "Tim J. Robbins" , freebsd-standards@FreeBSD.ORG References: <20020422175047.A37860@treetop.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OXfL5xGRrasGEqWY" Content-Disposition: inline In-Reply-To: <20020422175047.A37860@treetop.robbins.dropbear.id.au> User-Agent: Mutt/1.3.28i Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --OXfL5xGRrasGEqWY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 22, 2002 at 05:50:47PM +1000, Tim J. Robbins wrote: > I've attached a patch that adds the XSI df -t option, but with a twist: > it uses -T because we already have a -t. The output format is modelled af= ter > the Solaris output format, but uses the minimum field width possible like > BSD df usually does. >=20 > As I see it, we have three ways of attacking the problem of the conflicti= ng > -t option: > a) Scrap support for our current `-t type' option in favour of the standa= rd > b) Support -t with and without arguments via some heuristics > c) Add it as -T and document that fact >=20 > I'm leaning towards (c), but I'd be interested to hear what others think, > or whether there's a better way to solve the problem. >=20 I think it should be implemented as the standard says, and move the current -t to some other option (-T seems good). If it is done this way I would not recommend a MFC. I believe having standard options is the way to go. --Pete --OXfL5xGRrasGEqWY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE8xKdZ7ogfS9uZ4RsRAnsDAKDx8M+w17FOAJci6ul6u6XOwy+URwCguHpZ hzeVeUO+gkVjhI1Ut7gV1ys= =W3Ry -----END PGP SIGNATURE----- --OXfL5xGRrasGEqWY-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Apr 22 17:23:42 2002 Delivered-To: freebsd-standards@freebsd.org Received: from espresso.q9media.com (espresso.q9media.com [216.254.138.122]) by hub.freebsd.org (Postfix) with ESMTP id CA3FA37B417 for ; Mon, 22 Apr 2002 17:23:39 -0700 (PDT) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id g3N0MvD85584; Mon, 22 Apr 2002 20:22:57 -0400 (EDT) (envelope-from mike) Date: Mon, 22 Apr 2002 20:22:57 -0400 From: Mike Barcroft To: Peter Avalos Cc: "Tim J. Robbins" , freebsd-standards@FreeBSD.ORG Subject: Re: df -t option Message-ID: <20020422202257.B72727@espresso.q9media.com> References: <20020422175047.A37860@treetop.robbins.dropbear.id.au> <20020423001418.GA896@theshell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020423001418.GA896@theshell.com>; from pavalos@theshell.com on Mon, Apr 22, 2002 at 05:14:18PM -0700 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Peter Avalos writes: > I think it should be implemented as the standard says, and move the > current -t to some other option (-T seems good). If it is done this way > I would not recommend a MFC. I believe having standard options is the > way to go. I agree. In -stable, -T could become an alias for -t, and using -t instead of -T could result in a warning noting its deprecated status. I did something similar when I added the -p option to whois(1). Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Tue Apr 23 3:32:25 2002 Delivered-To: freebsd-standards@freebsd.org Received: from treetop.robbins.dropbear.id.au (088.c.009.mel.iprimus.net.au [210.50.114.88]) by hub.freebsd.org (Postfix) with ESMTP id 6DF3E37B405; Tue, 23 Apr 2002 03:32:20 -0700 (PDT) Received: from treetop.robbins.dropbear.id.au (localhost [127.0.0.1]) by treetop.robbins.dropbear.id.au (8.12.2/8.12.2) with ESMTP id g3NA5CKJ001842; Tue, 23 Apr 2002 20:05:12 +1000 (EST) (envelope-from tim@treetop.robbins.dropbear.id.au) Received: (from tim@localhost) by treetop.robbins.dropbear.id.au (8.12.2/8.12.2/Submit) id g3NA5ArW001841; Tue, 23 Apr 2002 20:05:10 +1000 (EST) Date: Tue, 23 Apr 2002 20:05:10 +1000 From: "Tim J. Robbins" To: Mike Barcroft Cc: Peter Avalos , freebsd-standards@FreeBSD.org Subject: Re: df -t option Message-ID: <20020423200510.A1738@treetop.robbins.dropbear.id.au> References: <20020422175047.A37860@treetop.robbins.dropbear.id.au> <20020423001418.GA896@theshell.com> <20020422202257.B72727@espresso.q9media.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020422202257.B72727@espresso.q9media.com>; from mike@FreeBSD.org on Mon, Apr 22, 2002 at 08:22:57PM -0400 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Apr 22, 2002 at 08:22:57PM -0400, Mike Barcroft wrote: > I agree. In -stable, -T could become an alias for -t, and using -t > instead of -T could result in a warning noting its deprecated status. > I did something similar when I added the -p option to whois(1). A quick grep shows that the mount(8) and umount(8) utilities, but nothing else, use -t to specify the filesystem type. What do you propose be done with these utilities? Leaving mount/umount alone seems like the right thing to do to me, but it may also be confusing. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Tue Apr 23 8:33:36 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id B985637B41A; Tue, 23 Apr 2002 08:33:33 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id BAA00805; Wed, 24 Apr 2002 01:33:30 +1000 Date: Wed, 24 Apr 2002 01:34:27 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: "Tim J. Robbins" Cc: Mike Barcroft , Peter Avalos , Subject: Re: df -t option In-Reply-To: <20020423200510.A1738@treetop.robbins.dropbear.id.au> Message-ID: <20020424013035.A12579-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 23 Apr 2002, Tim J. Robbins wrote: > On Mon, Apr 22, 2002 at 08:22:57PM -0400, Mike Barcroft wrote: > > > I agree. In -stable, -T could become an alias for -t, and using -t > > instead of -T could result in a warning noting its deprecated status. > > I did something similar when I added the -p option to whois(1). > > A quick grep shows that the mount(8) and umount(8) utilities, but nothing > else, use -t to specify the filesystem type. What do you propose be done Also fsck. > with these utilities? Leaving mount/umount alone seems like the right thing > to do to me, but it may also be confusing. Leaving df -t alone seems right to me. df -t is a bit newer than mount -t though. It wasn't in FreeBSD-1. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 11: 1:43 2002 Delivered-To: freebsd-standards@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 103C337B42B for ; Thu, 25 Apr 2002 11:01:18 -0700 (PDT) Received: by flood.ping.uio.no (Postfix, from userid 2602) id DB365534C; Thu, 25 Apr 2002 20:01:16 +0200 (CEST) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: standards@freebsd.org Subject: struct iovec From: Dag-Erling Smorgrav Date: 25 Apr 2002 20:01:16 +0200 Message-ID: Lines: 6 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Is there anything in any of the standards that prevents us from making iov_base a void * instead of a char *? DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 12:21:41 2002 Delivered-To: freebsd-standards@freebsd.org Received: from chiark.greenend.org.uk (chiark.greenend.org.uk [212.22.195.2]) by hub.freebsd.org (Postfix) with ESMTP id 7D33637B41B for ; Thu, 25 Apr 2002 12:21:38 -0700 (PDT) Received: from fanf by chiark.greenend.org.uk with local (Exim 3.12 #1) id 170onv-0007FZ-00 (Debian); Thu, 25 Apr 2002 20:21:19 +0100 Date: Thu, 25 Apr 2002 20:21:19 +0100 From: Tony Finch To: Dag-Erling Smorgrav Cc: standards@freebsd.org Subject: Re: struct iovec Message-ID: <20020425202119.A26505@chiark.greenend.org.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from des@ofug.org on Thu, Apr 25, 2002 at 08:01:16PM +0200 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Apr 25, 2002 at 08:01:16PM +0200, Dag-Erling Smorgrav wrote: > Is there anything in any of the standards that prevents us from making > iov_base a void * instead of a char *? SUS v2 and v3 say that iov_base is a void *. Tony. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 12:28: 7 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 6C77437B41C for ; Thu, 25 Apr 2002 12:27:51 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id FAA15757; Fri, 26 Apr 2002 05:27:44 +1000 Date: Fri, 26 Apr 2002 05:28:49 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Dag-Erling Smorgrav Cc: standards@FreeBSD.ORG Subject: Re: struct iovec In-Reply-To: Message-ID: <20020426052455.J1536-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 25 Apr 2002, Dag-Erling Smorgrav wrote: > Is there anything in any of the standards that prevents us from making > iov_base a void * instead of a char *? Probably not. POSIX.1-200x-draft7 only prevents making it a char * instead of a void * :-). We also have a wrong type for iov_len (should be size_t). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 12:44:24 2002 Delivered-To: freebsd-standards@freebsd.org Received: from chiark.greenend.org.uk (chiark.greenend.org.uk [212.22.195.2]) by hub.freebsd.org (Postfix) with ESMTP id CC89337B417 for ; Thu, 25 Apr 2002 12:44:22 -0700 (PDT) Received: from fanf by chiark.greenend.org.uk with local (Exim 3.12 #1) id 170p9z-0007rU-00 (Debian); Thu, 25 Apr 2002 20:44:07 +0100 Date: Thu, 25 Apr 2002 20:44:07 +0100 From: Tony Finch To: Bruce Evans Cc: Dag-Erling Smorgrav , standards@FreeBSD.ORG Subject: Re: struct iovec Message-ID: <20020425204407.A28674@chiark.greenend.org.uk> References: <20020426052455.J1536-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020426052455.J1536-100000@gamplex.bde.org>; from bde@zeta.org.au on Fri, Apr 26, 2002 at 05:28:49AM +1000 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Apr 26, 2002 at 05:28:49AM +1000, Bruce Evans wrote: > > We also have a wrong type for iov_len (should be size_t). Um, it is size_t. I note that making iov_base into a void* makes adjusting the pointer much more painful, since you can't do arithmetic on void*. There is lots of code in the system that assumes that you can do arithmetic on iov_base... Tony. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 14:33:56 2002 Delivered-To: freebsd-standards@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id D1DF637B419 for ; Thu, 25 Apr 2002 14:33:52 -0700 (PDT) Received: by flood.ping.uio.no (Postfix, from userid 2602) id A52645309; Thu, 25 Apr 2002 23:33:50 +0200 (CEST) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Tony Finch Cc: Bruce Evans , standards@FreeBSD.ORG Subject: Re: struct iovec References: <20020426052455.J1536-100000@gamplex.bde.org> <20020425204407.A28674@chiark.greenend.org.uk> From: Dag-Erling Smorgrav Date: 25 Apr 2002 23:33:49 +0200 In-Reply-To: <20020425204407.A28674@chiark.greenend.org.uk> Message-ID: Lines: 11 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Tony Finch writes: > I note that making iov_base into a void* makes adjusting the > pointer much more painful, since you can't do arithmetic on > void*. There is lots of code in the system that assumes that > you can do arithmetic on iov_base... Right, I'll see what I can do about that. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 17:11:52 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id 9DA1737B404; Thu, 25 Apr 2002 17:11:43 -0700 (PDT) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.12.1/8.12.1) with ESMTP id g3Q0Bfn5025092; Thu, 25 Apr 2002 20:11:42 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: References: <200202091752.g19HqFP11551@green.bikeshed.org> <20020210040158.A26957@chiark.greenend.org.uk> Date: Thu, 25 Apr 2002 20:11:40 -0400 To: arch@FreeBSD.ORG From: Garance A Drosihn Subject: Re: diff & patch problem with 'No newline' Cc: "M. Warner Losh" , freebsd-standards@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Back in February, there was a discussion on the freebsd-standards list about the behavor of freebsd's 'diff' and 'patch' with respect to files which do not have a final newline character. The latest gnu-diff command will create a patch which includes the line: \ No newline at end of file if the last line of the file is changed, and if it does not have a newline character. Our 'diff' does not do this, because we specifically changed it to not do this. This was done because our older version of patch does not know what to do with the line. Back at the time, I blithely said: At 11:20 PM -0500 2/9/02, Garance A Drosihn wrote: >At 4:01 AM +0000 2/10/02, Tony Finch wrote: >>It is also useful to refer to `patch` when we talk about >>`diff`, since the former is defined (in SUS) in terms of >>the latter. And you also must consider how these tools >>interact with the revision management systems that the >>project uses. > >This is true. As I mentioned, if we need to fix patch to >understand the extra line, then we should do that. Chances >are we should do that anyway, in case someone sends us a >patch generated from the diff on the list of operating >systems I listed as 'group 5'. > >If no other operating system had this extra marker line, >then I would be reluctant to have FreeBSD add it. However, >given how much of the unix world considers that extra line >as "standard", including the two other BSD's, then I think >it's a good idea for us to also support it. And now, a mere two months later, I finally looked into it. Changing 'diff' is trivial, but the main issue is changing 'patch' to match. I found out that NetBSD had made changes to 'patch' so it does understand these lines. I copy&pasted those changes into our version, and it looks like it works right. The patch is pretty straightforward, and I would like to get it into our patch in for 4.6-release (along with the minor change to 'diff'). Any objections? -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 17:17:20 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id 9A94137B404; Thu, 25 Apr 2002 17:16:43 -0700 (PDT) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.12.1/8.12.1) with ESMTP id g3Q0Gfn5126116; Thu, 25 Apr 2002 20:16:42 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: References: <200202091752.g19HqFP11551@green.bikeshed.org> <20020210040158.A26957@chiark.greenend.org.uk> Date: Thu, 25 Apr 2002 20:16:40 -0400 To: arch@FreeBSD.ORG From: Garance A Drosihn Subject: Re: diff & patch problem with 'No newline' Cc: freebsd-standards@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 8:11 PM -0400 4/25/02, Garance A Drosihn wrote: >The patch is pretty straightforward, and I would like to >get it into our patch in for 4.6-release (along with the >minor change to 'diff'). Any objections? I guess it would help if I showed what the patch is... NetBSD has apparently been running with this for a few weeks. Index: pch.c =================================================================== RCS file: /home/ncvs/src/gnu/usr.bin/patch/pch.c,v retrieving revision 1.17 diff -u -r1.17 pch.c --- pch.c 2 Aug 2000 06:54:21 -0000 1.17 +++ pch.c 26 Apr 2002 00:14:33 -0000 @@ -434,6 +434,30 @@ /* about as informative as "Syntax error" in C */ } +/* + * True if the line has been discarded (i.e. it is a line saying + * "\ No newline at end of file".) + */ +static bool +remove_special_line(void) +{ + int c; + + c = fgetc(pfp); + if (c == '\\') { + do { + c = fgetc(pfp); + } while (c != EOF && c != '\n'); + + return TRUE; + } + + if (c != EOF) + fseek(pfp, -1, SEEK_CUR); + + return FALSE; +} + /* True if there is more of the current diff listing to process. */ bool @@ -641,6 +665,15 @@ p_end--; return FALSE; } + if (p_end == p_ptrn_lines) + { + if (remove_special_line()) { + int len; + + len = strlen(p_line[p_end]) - 1; + (p_line[p_end])[len] = 0; + } + } break; case '\t': case '\n': /* assume the 2 spaces got eaten */ if (repl_beginning && repl_could_be_missing && @@ -768,6 +801,14 @@ assert(fillsrc==p_end+1 || fillsrc==repl_beginning); assert(filldst==p_end+1 || filldst==repl_beginning); } + + if (p_line[p_end] != NULL) + { + if (remove_special_line()) { + p_len[p_end] -= 1; + (p_line[p_end])[p_len[p_end]] = 0; + } + } } else if (diff_type == UNI_DIFF) { long line_beginning = ftell(pfp); @@ -865,6 +906,12 @@ p_Char[fillsrc] = ch; p_line[fillsrc] = s; p_len[fillsrc++] = strlen(s); + if (fillsrc > p_ptrn_lines) { + if (remove_special_line()) { + p_len[fillsrc - 1] -= 1; + s[p_len[fillsrc - 1]] = 0; + } + } break; case '=': ch = ' '; @@ -900,6 +947,12 @@ p_Char[filldst] = ch; p_line[filldst] = s; p_len[filldst++] = strlen(s); + if (fillsrc > p_ptrn_lines) { + if (remove_special_line()) { + p_len[filldst - 1] -= 1; + s[p_len[filldst - 1]] = 0; + } + } break; default: p_end = filldst; @@ -975,6 +1028,12 @@ p_len[i] = strlen(p_line[i]); p_Char[i] = '-'; } + + if (remove_special_line()) { + p_len[i-1] -= 1; + (p_line[i-1])[p_len[i-1]] = 0; + } + if (hunk_type == 'c') { ret = pgets(buf, sizeof buf, pfp); p_input_line++; @@ -1006,6 +1065,11 @@ } p_len[i] = strlen(p_line[i]); p_Char[i] = '+'; + } + + if (remove_special_line()) { + p_len[i-1] -= 1; + (p_line[i-1])[p_len[i-1]] = 0; } } if (reverse) /* backwards patch? */ -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 18: 1:30 2002 Delivered-To: freebsd-standards@freebsd.org Received: from espresso.q9media.com (espresso.q9media.com [216.254.138.122]) by hub.freebsd.org (Postfix) with ESMTP id 25D0537B405; Thu, 25 Apr 2002 18:01:26 -0700 (PDT) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id g3Q10Zg62607; Thu, 25 Apr 2002 21:00:35 -0400 (EDT) (envelope-from mike) Date: Thu, 25 Apr 2002 21:00:35 -0400 From: Mike Barcroft To: Garance A Drosihn Cc: arch@FreeBSD.ORG, "M. Warner Losh" , freebsd-standards@FreeBSD.ORG Subject: Re: diff & patch problem with 'No newline' Message-ID: <20020425210035.A43192@espresso.q9media.com> References: <200202091752.g19HqFP11551@green.bikeshed.org> <20020210040158.A26957@chiark.greenend.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ; from drosih@rpi.edu on Thu, Apr 25, 2002 at 08:11:40PM -0400 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Garance A Drosihn writes: > And now, a mere two months later, I finally looked into it. > Changing 'diff' is trivial, but the main issue is changing > 'patch' to match. > > I found out that NetBSD had made changes to 'patch' so it > does understand these lines. I copy&pasted those changes > into our version, and it looks like it works right. The > patch is pretty straightforward, and I would like to get > it into our patch in for 4.6-release (along with the minor > change to 'diff'). Any objections? Yes. I still maintain that files without a trailing new line are not "text files", and should therefore be treated as binary files. Even if we did consider these to be "text files", no standards that I'm aware of define the behavior for this situation, so a non-standard patch utility would be required to interpret these extensions. This would make our generated diffs unportable in the same way as some of the other vendors you mentioned as having this feature. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 19:22:43 2002 Delivered-To: freebsd-standards@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id E657637B41D; Thu, 25 Apr 2002 19:22:25 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g3Q2MNH93629; Thu, 25 Apr 2002 20:22:24 -0600 (MDT) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g3Q2MMb44809; Thu, 25 Apr 2002 20:22:22 -0600 (MDT) (envelope-from imp@village.org) Date: Thu, 25 Apr 2002 20:22:17 -0600 (MDT) Message-Id: <20020425.202217.82927028.imp@village.org> To: mike@FreeBSD.ORG Cc: drosih@rpi.edu, arch@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG Subject: Re: diff & patch problem with 'No newline' From: "M. Warner Losh" In-Reply-To: <20020425210035.A43192@espresso.q9media.com> References: <20020425210035.A43192@espresso.q9media.com> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20020425210035.A43192@espresso.q9media.com> Mike Barcroft writes: : Garance A Drosihn writes: : > And now, a mere two months later, I finally looked into it. : > Changing 'diff' is trivial, but the main issue is changing : > 'patch' to match. : > : > I found out that NetBSD had made changes to 'patch' so it : > does understand these lines. I copy&pasted those changes : > into our version, and it looks like it works right. The : > patch is pretty straightforward, and I would like to get : > it into our patch in for 4.6-release (along with the minor : > change to 'diff'). Any objections? : : Yes. I still maintain that files without a trailing new line are not : "text files", and should therefore be treated as binary files. Even : if we did consider these to be "text files", no standards that I'm : aware of define the behavior for this situation, so a non-standard : patch utility would be required to interpret these extensions. This : would make our generated diffs unportable in the same way as some of : the other vendors you mentioned as having this feature. There's lots of software (well, OK, subversion) that depends on the old, historical behavior. The historical behavior of diff has been to include the "this file doesn't end with a newline" message, not what FreeBSD hacked it to do. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 21: 9:27 2002 Delivered-To: freebsd-standards@freebsd.org Received: from espresso.q9media.com (espresso.q9media.com [216.254.138.122]) by hub.freebsd.org (Postfix) with ESMTP id 335E837B400; Thu, 25 Apr 2002 21:09:24 -0700 (PDT) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id g3Q48n273410; Fri, 26 Apr 2002 00:08:49 -0400 (EDT) (envelope-from mike) Date: Fri, 26 Apr 2002 00:08:49 -0400 From: Mike Barcroft To: "M. Warner Losh" Cc: drosih@rpi.edu, arch@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG Subject: Re: diff & patch problem with 'No newline' Message-ID: <20020426000849.C43192@espresso.q9media.com> References: <20020425210035.A43192@espresso.q9media.com> <20020425.202217.82927028.imp@village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020425.202217.82927028.imp@village.org>; from imp@village.org on Thu, Apr 25, 2002 at 08:22:17PM -0600 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG M. Warner Losh writes: > There's lots of software (well, OK, subversion) that depends on the > old, historical behavior. The historical behavior of diff has been to > include the "this file doesn't end with a newline" message, not what > FreeBSD hacked it to do. Perhaps the people working on Subversion still have time to fix that designo before too many people start using it. Solaris 2.5.1, for instance, returns "Warning: missing newline at end of file" on stderr for this condition. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 21:12:58 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id E83D337B400; Thu, 25 Apr 2002 21:12:52 -0700 (PDT) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.12.1/8.12.1) with ESMTP id g3Q4Cpn5070504; Fri, 26 Apr 2002 00:12:51 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20020425210035.A43192@espresso.q9media.com> References: <200202091752.g19HqFP11551@green.bikeshed.org> <20020210040158.A26957@chiark.greenend.org.uk> <20020425210035.A43192@espresso.q9media.com> Date: Fri, 26 Apr 2002 00:12:50 -0400 To: Mike Barcroft From: Garance A Drosihn Subject: Re: diff & patch problem with 'No newline' Cc: arch@FreeBSD.ORG, "M. Warner Losh" , freebsd-standards@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 9:00 PM -0400 4/25/02, Mike Barcroft wrote: >Garance A Drosihn writes: >> And now, a mere two months later, I finally looked into it. >> Changing 'diff' is trivial, but the main issue is changing >> 'patch' to match. >> >> I found out that NetBSD had made changes to 'patch' so it >> does understand these lines. I copy&pasted those changes >> into our version, and it looks like it works right. The >> patch is pretty straightforward, and I would like to get >> it into our patch in for 4.6-release (along with the minor >> change to 'diff'). Any objections? > >Yes. I still maintain that files without a trailing new >line are not "text files", and should therefore be treated >as binary files. Even if we did consider these to be "text >files", no standards that I'm aware of define the behavior >for this situation, so a non-standard patch utility would >be required to interpret these extensions. Well, here is a campaign speech for this little patch... :-) Adding the support to 'patch' will not break any patch which does follow the standard. If we revert the change made to 'diff' several years ago, then I admit we will occasionally create patches that are not standard. Those patches will be non-standard in a well-known and easily fixable format. This will create no insurmountable (or even difficult) problem for anyone who receives the patch. All a person has to do is delete the one line, and they will have a patch which behaves exactly the same way as the patch we currently produce. They can even do this blindly, using a filter to strip out the line. So, that's my pitch. I feel fairly strongly that there is a real advantage in following the lead of Linux (+anyone using gnu-diff) and NetBSD in this matter. How strongly do others feel that we should stick to the letter of this standard, because they feel the standard really has the right idea? And if you feel that way, then could you please explain to me what the advantage is? Can you come up with any tangible benefit of the standard which would convince a linux user to give up this non-standard extension which they have been using for at least five years? -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 21:13:13 2002 Delivered-To: freebsd-standards@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 8D65E37B425; Thu, 25 Apr 2002 21:13:03 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g3Q4D0H94130; Thu, 25 Apr 2002 22:13:01 -0600 (MDT) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g3Q4Cwb45510; Thu, 25 Apr 2002 22:12:58 -0600 (MDT) (envelope-from imp@village.org) Date: Thu, 25 Apr 2002 22:12:45 -0600 (MDT) Message-Id: <20020425.221245.99497735.imp@village.org> To: mike@FreeBSD.ORG Cc: drosih@rpi.edu, arch@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG Subject: Re: diff & patch problem with 'No newline' From: "M. Warner Losh" In-Reply-To: <20020426000849.C43192@espresso.q9media.com> References: <20020425210035.A43192@espresso.q9media.com> <20020425.202217.82927028.imp@village.org> <20020426000849.C43192@espresso.q9media.com> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20020426000849.C43192@espresso.q9media.com> Mike Barcroft writes: : M. Warner Losh writes: : > There's lots of software (well, OK, subversion) that depends on the : > old, historical behavior. The historical behavior of diff has been to : > include the "this file doesn't end with a newline" message, not what : > FreeBSD hacked it to do. : : Perhaps the people working on Subversion still have time to fix that : designo before too many people start using it. Solaris 2.5.1, for : instance, returns "Warning: missing newline at end of file" on stderr : for this condition. Subversion already powers through this by forcing the user to install gnu diff. What does POSIX.1 say about this matter? Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 21:17:53 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id 11F9F37B417; Thu, 25 Apr 2002 21:17:48 -0700 (PDT) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.12.1/8.12.1) with ESMTP id g3Q4Hjn5531326; Fri, 26 Apr 2002 00:17:45 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20020426000849.C43192@espresso.q9media.com> References: <20020425210035.A43192@espresso.q9media.com> <20020425.202217.82927028.imp@village.org> <20020426000849.C43192@espresso.q9media.com> Date: Fri, 26 Apr 2002 00:17:44 -0400 To: Mike Barcroft , "M. Warner Losh" From: Garance A Drosihn Subject: Re: diff & patch problem with 'No newline' Cc: arch@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 12:08 AM -0400 4/26/02, Mike Barcroft wrote: >M. Warner Losh writes: > > There's lots of software (well, OK, subversion) that > > depends on the old, historical behavior. The historical > > behavior of diff has been to include the "this file > > doesn't end with a newline" message, not what FreeBSD > > hacked it to do. > >Perhaps the people working on Subversion still have time >to fix that design before too many people start using it. >Solaris 2.5.1, for instance, returns "Warning: missing >newline at end of file" on stderr for this condition. They probably will fix it, by writing their own diff and their own patch. The same way other packages fix it, by requiring that the user install gnu-diff & gnu-patch. I am still wondering who it is that is better off given the standard behavior than this particular non-standard behavior. Not "better off" in the sense that "it is better to follow standards", but "better off" in the sense that it is easier to get their work done, and the sun shines brighter, and beer tastes better -- all because the standard does not allow patch+diff to handle this simple case of a file which is missing the last newline character. but that's enough from me for tonight... -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 21:34:54 2002 Delivered-To: freebsd-standards@freebsd.org Received: from espresso.q9media.com (espresso.q9media.com [216.254.138.122]) by hub.freebsd.org (Postfix) with ESMTP id 2147537B41F; Thu, 25 Apr 2002 21:34:50 -0700 (PDT) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id g3Q4YK374396; Fri, 26 Apr 2002 00:34:20 -0400 (EDT) (envelope-from mike) Date: Fri, 26 Apr 2002 00:34:20 -0400 From: Mike Barcroft To: Garance A Drosihn Cc: "M. Warner Losh" , arch@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG Subject: Re: diff & patch problem with 'No newline' Message-ID: <20020426003420.D43192@espresso.q9media.com> References: <20020425210035.A43192@espresso.q9media.com> <20020425.202217.82927028.imp@village.org> <20020426000849.C43192@espresso.q9media.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ; from drosih@rpi.edu on Fri, Apr 26, 2002 at 12:17:44AM -0400 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Garance A Drosihn writes: > >Perhaps the people working on Subversion still have time > >to fix that design before too many people start using it. > >Solaris 2.5.1, for instance, returns "Warning: missing > >newline at end of file" on stderr for this condition. > > They probably will fix it, by writing their own diff and > their own patch. The same way other packages fix it, > by requiring that the user install gnu-diff & gnu-patch. It occurs to me that the name of this software is very appropriate. In any event, we'll be in good company if they decide to reject convention and go the Linux-route. > I am still wondering who it is that is better off given > the standard behavior than this particular non-standard > behavior. Not "better off" in the sense that "it is > better to follow standards", but "better off" in the > sense that it is easier to get their work done, and the > sun shines brighter, and beer tastes better -- all > because the standard does not allow patch+diff to > handle this simple case of a file which is missing the > last newline character. It may be that my reading of the specification is too strict. There's nothing in the Standard that deals with this edge case, so anything you do will be non-standard. I just happen to think, garbage in the outputted diff is the worst possible choice. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 22: 3: 2 2002 Delivered-To: freebsd-standards@freebsd.org Received: from espresso.q9media.com (espresso.q9media.com [216.254.138.122]) by hub.freebsd.org (Postfix) with ESMTP id 7C81A37B419; Thu, 25 Apr 2002 22:02:56 -0700 (PDT) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id g3Q522975374; Fri, 26 Apr 2002 01:02:02 -0400 (EDT) (envelope-from mike) Date: Fri, 26 Apr 2002 01:02:02 -0400 From: Mike Barcroft To: "M. Warner Losh" Cc: drosih@rpi.edu, arch@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG Subject: Re: diff & patch problem with 'No newline' Message-ID: <20020426010202.E43192@espresso.q9media.com> References: <20020425210035.A43192@espresso.q9media.com> <20020425.202217.82927028.imp@village.org> <20020426000849.C43192@espresso.q9media.com> <20020425.221245.99497735.imp@village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020425.221245.99497735.imp@village.org>; from imp@village.org on Thu, Apr 25, 2002 at 10:12:45PM -0600 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG M. Warner Losh writes: > In message: <20020426000849.C43192@espresso.q9media.com> > Mike Barcroft writes: > : Perhaps the people working on Subversion still have time to fix that > : designo before too many people start using it. Solaris 2.5.1, for > : instance, returns "Warning: missing newline at end of file" on stderr > : for this condition. > > Subversion already powers through this by forcing the user to install > gnu diff. That'll teach them. > What does POSIX.1 say about this matter? Nothing about this specific case, but: : STDOUT : ... : Diff Binary Output Format : In the POSIX locale, if one or both of the files being compared are : not text files, an unspecified format shall be used that contains the : pathnames of two files being compared and the string "differ". : : If both files being compared are text files, depending on the options : specified, one of the following formats shall be used to write the : differences. : ... ...where text file is defined as: : 3.392 Text File : : A file that contains characters organized into one or more lines. The : lines do not contain NUL characters and none can exceed {LINE_MAX} : bytes in length, including the . Although : IEEE Std 1003.1-2001 does not distinguish between text files and : files (see the ISO C standard), many utilities only produce : predictable or meaningful output when operating on text files. The : standard utilities that have such restrictions always specify text : files in their STDIN or INPUT FILES sections. Since the Standard doesn't allow additional output on STDOUT (with good reason, since it breaks patch), we have two ways to conform, either take the Solaris way and utilize: : STDERR : The standard error shall be used only for diagnostic messages. ...or utilize the binary output option, which I recommend since I don't consider files without trailing newlines to be text files. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 25 22:44:52 2002 Delivered-To: freebsd-standards@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 92B6F37B404; Thu, 25 Apr 2002 22:44:46 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g3Q5ijH94545; Thu, 25 Apr 2002 23:44:45 -0600 (MDT) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g3Q5iib46021; Thu, 25 Apr 2002 23:44:44 -0600 (MDT) (envelope-from imp@village.org) Date: Thu, 25 Apr 2002 23:44:35 -0600 (MDT) Message-Id: <20020425.234435.29376552.imp@village.org> To: mike@FreeBSD.ORG Cc: drosih@rpi.edu, arch@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG Subject: Re: diff & patch problem with 'No newline' From: "M. Warner Losh" In-Reply-To: <20020426010202.E43192@espresso.q9media.com> References: <20020426000849.C43192@espresso.q9media.com> <20020425.221245.99497735.imp@village.org> <20020426010202.E43192@espresso.q9media.com> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20020426010202.E43192@espresso.q9media.com> Mike Barcroft writes: : M. Warner Losh writes: : > In message: <20020426000849.C43192@espresso.q9media.com> : > Mike Barcroft writes: : > : Perhaps the people working on Subversion still have time to fix that : > : designo before too many people start using it. Solaris 2.5.1, for : > : instance, returns "Warning: missing newline at end of file" on stderr : > : for this condition. : > : > Subversion already powers through this by forcing the user to install : > gnu diff. : : That'll teach them. : : > What does POSIX.1 say about this matter? : : Nothing about this specific case, but: Is there a "clarification" to the standard that clarifies this? I don't recall the name of the clarifications, but I think that Garrett has submitted them. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 26 4: 7:41 2002 Delivered-To: freebsd-standards@freebsd.org Received: from areilly.bpc-users.org (CPE-144-132-240-160.nsw.bigpond.net.au [144.132.240.160]) by hub.freebsd.org (Postfix) with SMTP id 8D7AA37B41A for ; Fri, 26 Apr 2002 04:07:33 -0700 (PDT) Received: (qmail 26366 invoked from network); 26 Apr 2002 11:07:33 -0000 Received: from localhost (andrew@127.0.0.1) by localhost with SMTP; 26 Apr 2002 11:07:33 -0000 Subject: Re: diff & patch problem with 'No newline' From: Andrew Reilly To: Garance A Drosihn Cc: Mike Barcroft , arch@FreeBSD.ORG, "M. Warner Losh" , freebsd-standards@FreeBSD.ORG In-Reply-To: References: <200202091752.g19HqFP11551@green.bikeshed.org> <20020210040158.A26957@chiark.greenend.org.uk> <20020425210035.A43192@espresso.q9media.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.3 Date: 26 Apr 2002 21:07:32 +1000 Message-Id: <1019819253.450.389.camel@gurney.reilly.home> Mime-Version: 1.0 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 2002-04-26 at 14:12, Garance A Drosihn wrote: > So, that's my pitch. I feel fairly strongly that there is a > real advantage in following the lead of Linux (+anyone using > gnu-diff) and NetBSD in this matter. How strongly do others > feel that we should stick to the letter of this standard, > because they feel the standard really has the right idea? > > And if you feel that way, then could you please explain to me > what the advantage is? Can you come up with any tangible > benefit of the standard which would convince a linux user to > give up this non-standard extension which they have been > using for at least five years? I know that you didn't ask for it, but I'd like to voice a strong vote of "yea" for (at least) teaching our patch to handle the "\no new line" in diffs. I don't any more (my MB cap has been raised), but I used to follow the wine port by rolling my own tarballs after patching with the incremental patches that they posted on their ftp site. These were _huge_ patch files, and almost always contained some "\no new line" lines, that our patch would not DTRT with. I don't care whether our diff produces those lines one way or the other. I use vi. It doesn't believe in files without newlines at the end. -- Andrew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 26 8:50:47 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id 95A1D37B41F; Fri, 26 Apr 2002 08:50:43 -0700 (PDT) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.12.1/8.12.1) with ESMTP id g3QFoHp8533702; Fri, 26 Apr 2002 11:50:17 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <1019819253.450.389.camel@gurney.reilly.home> References: <200202091752.g19HqFP11551@green.bikeshed.org> <20020210040158.A26957@chiark.greenend.org.uk> <20020425210035.A43192@espresso.q9media.com> <1019819253.450.389.camel@gurney.reilly.home> Date: Fri, 26 Apr 2002 11:50:16 -0400 To: Andrew Reilly From: Garance A Drosihn Subject: Re: diff & patch problem with 'No newline' Cc: arch@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-Scanned-By: MIMEDefang 2.3 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG At 9:07 PM +1000 4/26/02, Andrew Reilly wrote: >On Fri, 2002-04-26 at 14:12, Garance A Drosihn wrote: >> So, that's my pitch. I feel fairly strongly that there is a >> real advantage in following the lead of Linux (+anyone using > > gnu-diff) and NetBSD in this matter. > >I know that you didn't ask for it, but I'd like to voice a >strong vote of "yea" for (at least) teaching our patch to >handle the "\no new line" in diffs. I'm willing to ask for any votes of "yea". It's the votes of "nay" that I'm not asking for... :-) :-) -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 26 9: 0:22 2002 Delivered-To: freebsd-standards@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 4C07837B41C; Fri, 26 Apr 2002 09:00:10 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g3QG08H96928; Fri, 26 Apr 2002 10:00:08 -0600 (MDT) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g3QG07b48822; Fri, 26 Apr 2002 10:00:07 -0600 (MDT) (envelope-from imp@village.org) Date: Fri, 26 Apr 2002 09:59:55 -0600 (MDT) Message-Id: <20020426.095955.80136029.imp@village.org> To: drosih@rpi.edu Cc: areilly@bigpond.net.au, arch@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG Subject: Re: diff & patch problem with 'No newline' From: "M. Warner Losh" In-Reply-To: References: <1019819253.450.389.camel@gurney.reilly.home> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: Garance A Drosihn writes: : At 9:07 PM +1000 4/26/02, Andrew Reilly wrote: : >On Fri, 2002-04-26 at 14:12, Garance A Drosihn wrote: : >> So, that's my pitch. I feel fairly strongly that there is a : >> real advantage in following the lead of Linux (+anyone using : > > gnu-diff) and NetBSD in this matter. : > : >I know that you didn't ask for it, but I'd like to voice a : >strong vote of "yea" for (at least) teaching our patch to : >handle the "\no new line" in diffs. : : I'm willing to ask for any votes of "yea". It's the votes : of "nay" that I'm not asking for... :-) :-) My plans had always been to back out Green's change (with Green's permission, btw) when there was a patch that could grok things. The back out wouldn't be MFC'd until after at least one release. Since this was historical FreeBSD behavior, and modern patches grok the end of line things, I see this as a no brainer: just do it once patch is patched :-) Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 26 9:34: 5 2002 Delivered-To: freebsd-standards@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 25D3737B417 for ; Fri, 26 Apr 2002 09:34:02 -0700 (PDT) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.11.4/8.11.6) id g3QGXnM41912; Fri, 26 Apr 2002 12:33:49 -0400 (EDT) (envelope-from wollman) Date: Fri, 26 Apr 2002 12:33:49 -0400 (EDT) From: Garrett Wollman Message-Id: <200204261633.g3QGXnM41912@khavrinen.lcs.mit.edu> To: "M. Warner Losh" Cc: freebsd-standards@FreeBSD.ORG Subject: Re: diff & patch problem with 'No newline' In-Reply-To: <20020425.234435.29376552.imp@village.org> References: <20020426000849.C43192@espresso.q9media.com> <20020425.221245.99497735.imp@village.org> <20020426010202.E43192@espresso.q9media.com> <20020425.234435.29376552.imp@village.org> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > Is there a "clarification" to the standard that clarifies this? I > don't recall the name of the clarifications, but I think that Garrett > has submitted them. Formally, one submits an ``interpretation request''. Interps for 1003.1-2001 are being handled by The Open Group through their ``aardvark'' system. My personal feeling is that, regardless of what the standard may say, the most useful procedure is to deal with the observed fact that users consider files without newlines at the end to be text files, and to expect the text-processing tools to work properly is not at all unreasonable. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 26 13:19:35 2002 Delivered-To: freebsd-standards@freebsd.org Received: from green.bikeshed.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 88E9737B419; Fri, 26 Apr 2002 13:19:30 -0700 (PDT) Received: from localhost (green@localhost) by green.bikeshed.org (8.11.6/8.11.6) with ESMTP id g3QKJSs87524; Fri, 26 Apr 2002 16:19:29 -0400 (EDT) (envelope-from green@green.bikeshed.org) Message-Id: <200204262019.g3QKJSs87524@green.bikeshed.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: "M. Warner Losh" Cc: drosih@rpi.edu, areilly@bigpond.net.au, arch@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG Subject: Re: diff & patch problem with 'No newline' In-Reply-To: Your message of "Fri, 26 Apr 2002 09:59:55 MDT." <20020426.095955.80136029.imp@village.org> From: "Brian F. Feldman" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 26 Apr 2002 16:19:28 -0400 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "M. Warner Losh" wrote: > In message: > Garance A Drosihn writes: > : At 9:07 PM +1000 4/26/02, Andrew Reilly wrote: > : >On Fri, 2002-04-26 at 14:12, Garance A Drosihn wrote: > : >> So, that's my pitch. I feel fairly strongly that there is a > : >> real advantage in following the lead of Linux (+anyone using > : > > gnu-diff) and NetBSD in this matter. > : > > : >I know that you didn't ask for it, but I'd like to voice a > : >strong vote of "yea" for (at least) teaching our patch to > : >handle the "\no new line" in diffs. > : > : I'm willing to ask for any votes of "yea". It's the votes > : of "nay" that I'm not asking for... :-) :-) > > My plans had always been to back out Green's change (with Green's > permission, btw) when there was a patch that could grok things. The > back out wouldn't be MFC'd until after at least one release. Since > this was historical FreeBSD behavior, and modern patches grok the end > of line things, I see this as a no brainer: just do it once patch is > patched :-) So, as a solution for unbreaking old machines which won't understand what to do with those patch files (as largely demonstrated by the ports, of course), should there be a port for a "new" version of patch which the ports system can depend upon and use instead of the base system's patch? I can see this mattering because people are very comfortable running releases from several years ago. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org <> bfeldman@tislabs.com \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 26 13:23: 9 2002 Delivered-To: freebsd-standards@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id DA5EA37B419; Fri, 26 Apr 2002 13:22:59 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g3QKMwH98274; Fri, 26 Apr 2002 14:22:58 -0600 (MDT) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g3QKMvb50647; Fri, 26 Apr 2002 14:22:57 -0600 (MDT) (envelope-from imp@village.org) Date: Fri, 26 Apr 2002 14:22:52 -0600 (MDT) Message-Id: <20020426.142252.15670459.imp@village.org> To: green@FreeBSD.ORG Cc: drosih@rpi.edu, areilly@bigpond.net.au, arch@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG Subject: Re: diff & patch problem with 'No newline' From: "M. Warner Losh" In-Reply-To: <200204262019.g3QKJSs87524@green.bikeshed.org> References: <20020426.095955.80136029.imp@village.org> <200204262019.g3QKJSs87524@green.bikeshed.org> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <200204262019.g3QKJSs87524@green.bikeshed.org> "Brian F. Feldman" writes: : So, as a solution for unbreaking old machines which won't understand what to : do with those patch files (as largely demonstrated by the ports, of course), : should there be a port for a "new" version of patch which the ports system : can depend upon and use instead of the base system's patch? I can see this : mattering because people are very comfortable running releases from several : years ago. That's a problem for ports people to deal with :-) They routinely have stuff like this. I think we should MFC the patch changes for 4.6, but wait for the diff changes for 4.7 so that we have a patch that can grok the stuff for at least three months before we have a diff in -stable that will generate them. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 26 13:34:56 2002 Delivered-To: freebsd-standards@freebsd.org Received: from green.bikeshed.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0019737B417; Fri, 26 Apr 2002 13:34:50 -0700 (PDT) Received: from localhost (green@localhost) by green.bikeshed.org (8.11.6/8.11.6) with ESMTP id g3QKYow87624; Fri, 26 Apr 2002 16:34:50 -0400 (EDT) (envelope-from green@green.bikeshed.org) Message-Id: <200204262034.g3QKYow87624@green.bikeshed.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: "M. Warner Losh" Cc: drosih@rpi.edu, areilly@bigpond.net.au, arch@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG Subject: Re: diff & patch problem with 'No newline' In-Reply-To: Your message of "Fri, 26 Apr 2002 14:22:52 MDT." <20020426.142252.15670459.imp@village.org> From: "Brian F. Feldman" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 26 Apr 2002 16:34:50 -0400 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "M. Warner Losh" wrote: > In message: <200204262019.g3QKJSs87524@green.bikeshed.org> > "Brian F. Feldman" writes: > : So, as a solution for unbreaking old machines which won't understand what to > : do with those patch files (as largely demonstrated by the ports, of course), > : should there be a port for a "new" version of patch which the ports system > : can depend upon and use instead of the base system's patch? I can see this > : mattering because people are very comfortable running releases from several > : years ago. > > That's a problem for ports people to deal with :-) They routinely > have stuff like this. > > I think we should MFC the patch changes for 4.6, but wait for the diff > changes for 4.7 so that we have a patch that can grok the stuff for at > least three months before we have a diff in -stable that will generate > them. Okay, I didn't know if the plans changed to being to update both patch and diff at the same time before 4.6! Since they didn't, I remain happified. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org <> bfeldman@tislabs.com \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 26 13:36: 2 2002 Delivered-To: freebsd-standards@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id 65EF337B404; Fri, 26 Apr 2002 13:35:59 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id 34443AE165; Fri, 26 Apr 2002 13:35:59 -0700 (PDT) Date: Fri, 26 Apr 2002 13:35:59 -0700 From: Alfred Perlstein To: "Brian F. Feldman" Cc: "M. Warner Losh" , drosih@rpi.edu, areilly@bigpond.net.au, arch@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG Subject: Re: diff & patch problem with 'No newline' Message-ID: <20020426203559.GK1530@elvis.mu.org> References: <20020426.095955.80136029.imp@village.org> <200204262019.g3QKJSs87524@green.bikeshed.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200204262019.g3QKJSs87524@green.bikeshed.org> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Brian F. Feldman [020426 13:19] wrote: > > So, as a solution for unbreaking old machines which won't understand what to > do with those patch files (as largely demonstrated by the ports, of course), > should there be a port for a "new" version of patch which the ports system > can depend upon and use instead of the base system's patch? I can see this > mattering because people are very comfortable running releases from several > years ago. I think the way bzip2 is handled might work. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 26 21: 0:14 2002 Delivered-To: freebsd-standards@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 207B337B419 for ; Fri, 26 Apr 2002 21:00:10 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3R40Ai45880; Fri, 26 Apr 2002 21:00:10 -0700 (PDT) (envelope-from gnats) Date: Fri, 26 Apr 2002 21:00:10 -0700 (PDT) Message-Id: <200204270400.g3R40Ai45880@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: "Tim J. Robbins" Subject: Re: standards/36191: Final request for comments on csplit util. Reply-To: "Tim J. Robbins" Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The following reply was made to PR standards/36191; it has been noted by GNATS. From: "Tim J. Robbins" To: bug-followup@FreeBSD.ORG Cc: Subject: Re: standards/36191: Final request for comments on csplit util. Date: Sat, 27 Apr 2002 13:29:15 +1000 I'd appreciate any last comments on my implementation of csplit. The latest version is at: http://people.freebsd.org/~tjr/36191-csplit/ This version passes the VSC Lite test suite - previous versions did not due to a boundary condition error in the regexp handling code. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message