pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/53296: vim is super-slow (hangs) on sparc64 / select issue



The following reply was made to PR pkg/53296; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/53296: vim is super-slow (hangs) on sparc64 / select issue
Date: Fri, 18 May 2018 13:47:40 +0200

 The source plays stupid tricks with the select declaration, see os_unix.c:
 
 /*
  * Some systems have a prototype for select() that has (int *) instead of
  * (fd_set *), which is wrong. This define removes that prototype. We define
  * our own prototype below.
  * Don't use it for the Mac, it causes a warning for precompiled headers.
  * TODO: use a configure check for precompiled headers?  
  */
 #if !defined(__APPLE__) && !defined(__TANDEM)
 # define select select_declared_wrong
 #endif
 
 
 and then it does not include <sys/select.h>, thus missing the function
 renaming on NetBSD. See brute force hack below for a possible fix.
 
 Martin
 
 --- src/os_unix.c.orig	2018-04-28 21:56:44.000000000 +0200
 +++ src/os_unix.c	2018-05-18 13:41:00.874162825 +0200
 @@ -25,8 +25,11 @@
   * Don't use it for the Mac, it causes a warning for precompiled headers.
   * TODO: use a configure check for precompiled headers?
   */
 -#if !defined(__APPLE__) && !defined(__TANDEM)
 +#if !defined(__APPLE__) && !defined(__TANDEM) && !defined(__NetBSD__)
  # define select select_declared_wrong
 +#else
 +#include <sys/select.h>
 +#define	HAVE_SYS_SELECT	1
  #endif
  
  #include "vim.h"
 @@ -77,7 +80,7 @@
  # endif
  #endif
  
 -#if defined(HAVE_SELECT)
 +#if defined(HAVE_SELECT) && !defined(HAVE_SYS_SELECT)
  extern int   select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
  #endif
  
 


Home | Main Index | Thread Index | Old Index