svn commit: r451623 - in head/net/tcpview: . files

Cy Schubert Cy.Schubert at komquats.com
Tue Oct 10 13:05:54 UTC 2017


In message <20171010073011.GA36833 at FreeBSD.org>, Alexey Dokuchaev writes:
> On Mon, Oct 09, 2017 at 10:34:03AM -0700, Cy Schubert wrote:
> > In message <20171009170719.GA89682 at FreeBSD.org>, Alexey Dokuchaev writes:
> > > ...
> > > > Added: head/net/tcpview/files/patch-hex.c
> > > > @@ -0,0 +1,10 @@
> > > > +--- hex.c.orig	1993-04-22 13:40:04.000000000 -0700
> > > > ++++ hex.c	2017-10-06 07:25:01.182767000 -0700
> > > > +@@ -85,6 +85,7 @@
> > > > +   char *s;
> > > > + 
> > > > +   do {
> > > > ++#define gets(a) fgets(a,sizeof(a),stdin)
> > > > +     if( gets(str) == NULL )
> > > 
> > > gets(3) called only once in this port; why not simply patch that
> > > single call properly instead of bringing in a "poor man's" macro?
> > 
> > As an example. To open discussion of possibilities.
> 
> I don't think that having this (even in some extra-guarded form) is
> good *general* solution.  Macros are fragile and things can go south
> when the argument is more just a simple pointer.

Which is the limitation of this. As I said, it was not perfict.

> 
> I'm just as all of us want gets(3) to die out, but as long as we must
> provide it in libc, putting __attribute__ ((__deprecated__)) of some
> sort seems as a safer approach.

Don't worry. gets() will be removed very shortly. See:

- exp-run PR 222796
- patch D12298 https://reviews.freebsd.org/D12298


-- 
Cheers,
Cy Schubert <Cy.Schubert at cschubert.com>
FreeBSD UNIX:  <cy at FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.




More information about the svn-ports-all mailing list