[3285] in Release_Engineering

home help back first fref pref prev next nref lref last post

DECstation lpd broken again

daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Wed Jul 20 14:15:00 1994

From: epeisach@MIT.EDU
Date: Wed, 20 Jul 1994 12:59:01 -0400
To: dot@MIT.EDU
Cc: rel-eng@MIT.EDU


I have not compiled this code - but I bet it would fix Jeff Solof's
problems. Essentially - the flag bits in the princap file are BSD based
specific and cannot simply be mapped to POSIX. 

Someone should compile lpd and try it on Jeff Solof's machine with these
changes. 

(Either that of if someone can find the changes that were made to
/mit/opssrc/lpd/....) 

	Ezra

*** 1.1	1994/07/20 16:51:54
--- printjob.c	1994/07/20 16:55:43
***************
*** 28,33 ****
--- 28,40 ----
  #include <sys/termio.h>
  #endif
  
+ #if defined(ultrix) && defined(mips)
+ /* Should probably be in lp.local.h */
+ /* NOPOSIXIO indicates that setting the line speeds and parameters will use
+    the old BSD calling conventions */
+ #define NOPOSIXIO
+ #endif
+  
  #define DORETURN	0	/* absorb fork error */
  #define DOABORT		1	/* abort if dofork fails */
  /*
***************
*** 1492,1498 ****
   */
  setty()
  {
! #ifndef POSIX
  	struct sgttyb ttybuf;
  #else
  	struct termios ttybuf;
--- 1499,1505 ----
   */
  setty()
  {
! #if !defined(POSIX) && !defined(NOPOSIXIO)
  	struct sgttyb ttybuf;
  #else
  	struct termios ttybuf;
***************
*** 1499,1505 ****
  #endif
  	register struct bauds *bp;
  
! #ifndef POSIX
  	/* I cannot determine if under AUX you can open a line exclusively */
  	if (ioctl(pfd, TIOCEXCL, (char *)0) < 0) {
  		syslog(LOG_ERR, "%s: ioctl(TIOCEXCL): %m", printer);
--- 1506,1512 ----
  #endif
  	register struct bauds *bp;
  
! #if !defined(POSIX) && !defined(NOPOSIXIO)
  	/* I cannot determine if under AUX you can open a line exclusively */
  	if (ioctl(pfd, TIOCEXCL, (char *)0) < 0) {
  		syslog(LOG_ERR, "%s: ioctl(TIOCEXCL): %m", printer);
***************
*** 1506,1512 ****
  		exit(1);
  	}
  #endif
! #ifndef POSIX
  	if (ioctl(pfd, TIOCGETP, (char *)&ttybuf) < 0) {
  		syslog(LOG_ERR, "%s: ioctl(TIOCGETP): %m", printer);
  		exit(1);
--- 1513,1519 ----
  		exit(1);
  	}
  #endif
! #if !defined(POSIX) && !defined(NOPOSIXIO)
  	if (ioctl(pfd, TIOCGETP, (char *)&ttybuf) < 0) {
  		syslog(LOG_ERR, "%s: ioctl(TIOCGETP): %m", printer);
  		exit(1);
***************
*** 1525,1531 ****
  			syslog(LOG_ERR, "%s: illegal baud rate %d", printer, BR);
  			exit(1);
  		}
! #ifndef POSIX
  		ttybuf.sg_ispeed = ttybuf.sg_ospeed = bp->speed;
  #else
  		ttybuf.c_cflag &= ~CBAUD;
--- 1532,1538 ----
  			syslog(LOG_ERR, "%s: illegal baud rate %d", printer, BR);
  			exit(1);
  		}
! #if !defined(POSIX) && !defined(NOPOSIXIO)
  		ttybuf.sg_ispeed = ttybuf.sg_ospeed = bp->speed;
  #else
  		ttybuf.c_cflag &= ~CBAUD;
***************
*** 1534,1540 ****
  		if (XS) ttybuf.c_lflag |=  XS;
  #endif
  	}
! #ifndef POSIX
  	ttybuf.sg_flags &= ~FC;
  	ttybuf.sg_flags |= FS;
  	if (ioctl(pfd, TIOCSETP, (char *)&ttybuf) < 0) {
--- 1541,1547 ----
  		if (XS) ttybuf.c_lflag |=  XS;
  #endif
  	}
! #if !defined(POSIX) && !defined(NOPOSIXIO)
  	ttybuf.sg_flags &= ~FC;
  	ttybuf.sg_flags |= FS;
  	if (ioctl(pfd, TIOCSETP, (char *)&ttybuf) < 0) {
***************
*** 1551,1557 ****
  		exit(1);
  	}
  #endif /* POSIX */
! #ifndef POSIX
  	/* AUX does not appear to have old/new line disciplines that 
  	   do anything */
  	if (XC || XS) {
--- 1558,1564 ----
  		exit(1);
  	}
  #endif /* POSIX */
! #if !defined(POSIX) && !defined(NOPOSIXIO)
  	/* AUX does not appear to have old/new line disciplines that 
  	   do anything */
  	if (XC || XS) {

home help back first fref pref prev next nref lref last post