Bug 477 - progressmeter.c problem requires openbsd-compat/bsd-cray.h change
Summary: progressmeter.c problem requires openbsd-compat/bsd-cray.h change
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: -current
Hardware: Other Other
: P2 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-28 06:06 AEDT by wendy palm
Modified: 2004-04-14 12:24 AEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wendy palm 2003-01-28 06:06:47 AEDT
when foregroundproc() got put into progressmeter.c, the return line got
changed from
#ifdef HAVE_TCGETPGRP
        return ((ctty_pgrp = tcgetpgrp(STDOUT_FILENO)) != -1 &&
                ctty_pgrp == pgrp);
#else
        return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 &&
                 ctty_pgrp == pgrp));
#endif


to

        return ((ioctl(STDOUT_FILENO, TIOCGPGRP, &ctty_pgrp) != -1 &&
                 ctty_pgrp == pgrp));


and the crays stopped being able to compile because TIOCGPGRP isn't
set on them.

i'm not sure why the #ifdef HAVE_TCGETPGRP got deleted, but if that part
is not going to be used, i need the following patch added to
openbsd-compat/bsd-cray.h

diff -c openbsd-compat/bsd-cray.h.orig openbsd-compat/bsd-cray.h
*** openbsd-compat/bsd-cray.h.orig      Mon Jan 27 11:42:17 2003
--- openbsd-compat/bsd-cray.h   Mon Jan 27 11:52:07 2003
***************
*** 49,54 ****
--- 49,56 ----
  #ifndef MAXHOSTNAMELEN
  #define MAXHOSTNAMELEN  64
  #endif
+ #include <sys/ttold.h>
+ #define TIOCGPGRP (tIOC|20)
  #endif

  #endif /* _BSD_CRAY_H */
Comment 1 Ben Lindstrom 2003-01-28 08:16:31 AEDT
Thanks, applied.  Also removed check for tcgetpgrp() since that was the only
place it was used.
Comment 2 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED