pkgsrc-Bugs archive

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

Re: pkg/29423



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

From: Richy Kim <richy%fatkid.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/29423
Date: Sun, 3 Jul 2005 14:08:02 -0700

 --Apple-Mail-6-383761375
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
        charset=US-ASCII;
        delsp=yes;
        format=flowed
 
 Hi,
 
 attached is the fix(es) for this bug: a revised patch for the  
 existing 'patch-ad', and a new 'patch-am' for the source 'unix.c' (to  
 fix another error hidden behind this one listed).
 
 The fix for io.c is to include the system header 'termios.h' for  
 __linux__ flavor builds.
 For unix.c the include 'unistd.h' should be removed.
 
 Thanks.
 
 -r.
 
 
 
 --Apple-Mail-6-383761375
 Content-Transfer-Encoding: 7bit
 Content-Type: application/octet-stream;
        x-unix-mode=0600;
        name="patch-ad"
 Content-Disposition: attachment;
        filename=patch-ad
 
 --- source/io.c.orig   1994-07-21 18:47:26.000000000 -0700
 +++ source/io.c        2005-07-03 11:53:38.000000000 -0700
 @@ -90,6 +90,10 @@
  #include <sys/types.h>
  #endif
  
 +#if (defined(BSD) && BSD >= 199306)   /* XXX for all post 1993 BSDs? */
 +#include <sgtty.h>
 +#endif
 +
  #ifdef USG
  #ifndef ATARI_ST
  #include <string.h>
 @@ -105,6 +109,9 @@
  #endif
  #endif
  #endif /* 0 */
 +#ifdef __linux__
 +#include <termios.h>
 +#endif
  #ifdef HPUX
  /* Needs termio.h because curses.h doesn't include it */
  #include <termio.h>
 @@ -245,7 +252,7 @@
    struct ltchars lcbuf;
    struct tchars cbuf;
    int lbuf;
 -  long time();
 +  time_t time();
  
    py.misc.male |= 2;
    (void) ioctl(0, TIOCGETP, (char *)&tbuf);
 @@ -331,7 +338,7 @@
  #if defined(atarist) && defined(__GNUC__)
    (void) signal (SIGTSTP, (__Sigfunc)suspend);
  #else
 -#ifdef  __386BSD__
 +#if defined(__386BSD__) || (defined(BSD) && BSD >= 199306)
    (void) signal (SIGTSTP, (sig_t)suspend);
  #else
    (void) signal (SIGTSTP, suspend);
 @@ -527,6 +534,7 @@
  }
  #else
  {
 +  int y, x;
  #ifdef AMIGA
    closetimer ();
  #endif
 @@ -542,7 +550,8 @@
    pause_line(15);
  #endif
    /* this moves curses to bottom right corner */
 -  mvcur(stdscr->_cury, stdscr->_curx, LINES-1, 0);
 +  getyx(stdscr, y, x);
 +  mvcur(y, x, LINES-1, 0);
    endwin();  /* exit curses */
    (void) fflush (stdout);
  #ifdef MSDOS
 @@ -757,7 +766,7 @@
        msg_print("Fork failed. Try again.");
        return;
      }
 -#if defined(USG) || defined(__386BSD__)
 +#if defined(USG) || defined(__386BSD__) || (defined(BSD) && BSD >= 199306)
    (void) wait((int *) 0);
  #else
    (void) wait((union wait *) 0);
 
 --Apple-Mail-6-383761375
 Content-Transfer-Encoding: 7bit
 Content-Type: application/octet-stream;
        x-unix-mode=0600;
        name="patch-am"
 Content-Disposition: attachment;
        filename=patch-am
 
 --- source/unix.c.orig 1994-07-21 15:37:08.000000000 -0700
 +++ source/unix.c      2005-07-03 11:47:48.000000000 -0700
 @@ -43,10 +43,14 @@
  #include <sys/param.h>
  #endif
  
 +#if (defined(BSD) && BSD >= 199306)
 +#include <fcntl.h>
 +#include <unistd.h>
 +#endif
 +
  #ifdef __linux__
  #include <sys/time.h>
  #include <sys/types.h>
 -#include <unistd.h>
  #endif
  
  #ifdef USG
 @@ -276,7 +280,9 @@
  void user_name(buf)
  char *buf;
  {
 +#if !(defined(BSD) && BSD >= 199306)
    extern char *getlogin();
 +#endif
    struct passwd *pwline;
    register char *p;
  
 @@ -314,7 +320,10 @@
          user[i] = '\0';
          if (i == 0)
            {
 -            char *login = (char *) getlogin();
 +#if !(defined(BSD) && BSD >= 199306)
 +            extern char *getlogin();
 +#endif
 +            char *login = getlogin();
  
              if (login != NULL)
                (void) strcpy (user, login);
 
 --Apple-Mail-6-383761375
 Content-Transfer-Encoding: 7bit
 Content-Type: text/plain;
        charset=US-ASCII;
        format=flowed
 
 
 
 
 
 
 --Apple-Mail-6-383761375--
 



Home | Main Index | Thread Index | Old Index