[2144] in Kerberos-V5-bugs

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

Kerberos 5-B6 bug report (termios.h vs. sys/ioctl.h)

daemon@ATHENA.MIT.EDU (Craig Leres)
Mon Aug 12 19:10:06 1996

To: krb5-bugs@MIT.EDU
Cc: mlrosenberg@lbl.gov (Mark Rosenberg), craigl@mh1.lbl.gov (Craig Lant)
Date: Mon, 12 Aug 1996 16:10:01 PDT
From: Craig Leres <leres@ee.lbl.gov>

Under SunOS 4.1.4 with gcc 2.7.2, sources that use termios.h give warnings:

    gcc [...] -DKERBEROS -I. -I. -c ./cleanup.c
    In file included from pty-int.h:60,
		     from ./cleanup.c:22:
    /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.4/2.7.2/include/termios.h:116: warning: `NL0' redefined
    /usr/include/sys/ioctl.h:30: warning: this is the location of the previous definition
    /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.4/2.7.2/include/termios.h:117: warning: `NL1' redefined
    [...]

The problem is that you shouldn't include both sys/ioctl.h and termios.h.

Context diffs for:

    src/appl/bsd/krlogin.c
    src/appl/bsd/krlogind.c
    src/appl/bsd/krshd.c
    src/appl/bsd/login.c
    src/util/pty/pty-int.h

are appended.

		Craig

------ 
RCS file: RCS/krlogin.c,v
retrieving revision 1.1
diff -c -r1.1 krlogin.c
*** /tmp/,RCSt1a006J2	Mon Aug 12 16:08:06 1996
--- krlogin.c	Mon Aug 12 16:02:09 1996
***************
*** 42,48 ****
--- 42,50 ----
  
  #include <sys/types.h>
  #include <sys/param.h>
+ #ifndef POSIX_TERMIOS
  #include <sys/ioctl.h>
+ #endif
  #include <sys/errno.h>
  #include <sys/file.h>
  #include <sys/socket.h>

RCS file: RCS/krlogind.c,v
retrieving revision 1.1
diff -c -r1.1 krlogind.c
*** /tmp/,RCSt1a006J7	Mon Aug 12 16:08:15 1996
--- krlogind.c	Mon Aug 12 16:06:06 1996
***************
*** 110,116 ****
--- 110,118 ----
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <sys/socket.h>
+ #if !defined(POSIX_TERMIOS) || defined(ultrix)
  #include <sys/ioctl.h>
+ #endif
  #include <sys/wait.h>
  #include <sys/file.h>
  #include <sys/time.h>

RCS file: RCS/krshd.c,v
retrieving revision 1.1
diff -c -r1.1 krshd.c
*** /tmp/,RCSt1a006JC	Mon Aug 12 16:08:21 1996
--- krshd.c	Mon Aug 12 16:04:19 1996
***************
*** 90,96 ****
--- 90,98 ----
  #endif
  
  #include <sys/types.h>
+ #ifndef POSIX_TERMIOS
  #include <sys/ioctl.h>
+ #endif
  #include <sys/param.h>
  #include <sys/socket.h>
  #include <sys/file.h>

RCS file: RCS/login.c,v
retrieving revision 1.1
diff -c -r1.1 login.c
*** /tmp/,RCSt1a006JH	Mon Aug 12 16:08:23 1996
--- login.c	Mon Aug 12 16:06:39 1996
***************
*** 94,100 ****
--- 94,102 ----
  #include <sys/time.h>
  #include <sys/resource.h>
  #include <sys/file.h>
+ #ifndef POSIX_TERMIOS
  #include <sys/ioctl.h>
+ #endif
  #include <fcntl.h>
  
  #include <utmp.h>

RCS file: RCS/pty-int.h,v
retrieving revision 1.1
diff -c -r1.1 pty-int.h
*** /tmp/,RCSt1a006I4	Mon Aug 12 15:57:16 1996
--- pty-int.h	Mon Aug 12 15:55:20 1996
***************
*** 22,28 ****
--- 22,30 ----
  #include <stdio.h>
  
  #include <sys/stat.h>
+ #if !defined(POSIX_TERMIOS) || defined(ultrix)
  #include <sys/ioctl.h>
+ #endif
  #include <sys/file.h>
  #include <sys/time.h>
  #include <ctype.h>

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