Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Oct 2017 06:05:46 -0700
From:      Cy Schubert <Cy.Schubert@komquats.com>
To:        Alexey Dokuchaev <danfe@FreeBSD.org>
Cc:        Cy Schubert <Cy.Schubert@komquats.com>, Cy Schubert <cy@FreeBSD.org>, ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   Re: svn commit: r451623 - in head/net/tcpview: . files
Message-ID:  <201710101305.v9AD5k9x056952@slippy.cwsent.com>
In-Reply-To: Message from Alexey Dokuchaev <danfe@FreeBSD.org> of "Tue, 10 Oct 2017 07:30:11 -0000." <20171010073011.GA36833@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20171010073011.GA36833@FreeBSD.org>, Alexey Dokuchaev writes:
> On Mon, Oct 09, 2017 at 10:34:03AM -0700, Cy Schubert wrote:
> > In message <20171009170719.GA89682@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@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710101305.v9AD5k9x056952>