Re: vi: remove workarounds for other systems

2014-11-10 Thread Anthony J. Bentley
Martin Natano writes:
 Index: common/recover.c
 ===
 RCS file: /cvs/src/usr.bin/vi/common/recover.c,v
 retrieving revision 1.15
 diff -u -r1.15 recover.c
 --- common/recover.c  27 Oct 2009 23:59:47 -  1.15
 +++ common/recover.c  10 Nov 2014 17:10:05 -
 @@ -339,15 +339,6 @@
   int fd;
   char *dp, *p, *t, buf[4096], mpath[MAXPATHLEN];
   char *t1, *t2, *t3;
 -
 - /*
 -  * XXX
 -  * MAXHOSTNAMELEN is in various places on various systems, including
 -  * netdb.h and sys/socket.h.  If not found, use a large default.
 -  */
 -#ifndef MAXHOSTNAMELEN
 -#define  MAXHOSTNAMELEN  1024
 -#endif
   char host[MAXHOSTNAMELEN];
  
   gp = sp-gp;

FreeBSD nvi uses sysconf for this. If that's the right thing to do, we
should probably synchronize with them...

-- 
Anthony J. Bentley



Re: vi: remove workarounds for other systems

2014-11-10 Thread Ted Unangst
On Mon, Nov 10, 2014 at 13:51, Anthony J. Bentley wrote:
 Martin Natano writes:
 Index: common/recover.c
 ===
 RCS file: /cvs/src/usr.bin/vi/common/recover.c,v
 retrieving revision 1.15
 diff -u -r1.15 recover.c
 --- common/recover.c 27 Oct 2009 23:59:47 -  1.15
 +++ common/recover.c 10 Nov 2014 17:10:05 -
 @@ -339,15 +339,6 @@
  int fd;
  char *dp, *p, *t, buf[4096], mpath[MAXPATHLEN];
  char *t1, *t2, *t3;
 -
 -/*
 - * XXX
 - * MAXHOSTNAMELEN is in various places on various systems, including
 - * netdb.h and sys/socket.h.  If not found, use a large default.
 - */
 -#ifndef MAXHOSTNAMELEN
 -#define MAXHOSTNAMELEN  1024
 -#endif
  char host[MAXHOSTNAMELEN];

  gp = sp-gp;
 
 FreeBSD nvi uses sysconf for this. If that's the right thing to do, we
 should probably synchronize with them...

overkill in my opinion. we're not going to change it.

diff applied. thanks.