[202] in Kerberos-V5-bugs

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

Re: Sun4c SunOS4.1.1 problems

daemon@ATHENA.MIT.EDU (Theodore Ts'o)
Wed Oct 2 17:35:47 1991

Date: Wed, 2 Oct 91 17:35:49 -0400
From: tytso@Athena.MIT.EDU (Theodore Ts'o)
To: James Bottomley <jejb@lat.amtp.cam.ac.uk>
Cc: krb5-bugs@Athena.MIT.EDU
In-Reply-To: [159]
Reply-To: tytso@Athena.MIT.EDU

Hi!  My apologies for taking so long to get to your patch.

   1) The distribution won't build with gcc on a sun

      Reason: the dbm_... routines rely on the passing and returning of a
      structure (datum), and sun's cc still follows the pre-ANSI rules which
      send and receive the structure by its value, whereas gcc uses the ANSI
      rules and puts the entire structure on the stack, thus making it
      incompatible with the ndbm library.

You can fix this by defining -fpcc_struct_return, or by recompiling
ndbm using gcc.  I know, it's a lose, but it's a problem with gcc using
a non-standard (but better) procedure calling interface.

   2) the lib/os/read_pwd.c program crashes out with an illegal ioctl
      for device.  I assume this is because Sun prefers to implement
      these by the gtty and stty function calls. Below is a diff for the
      file that uses these calls if the variable `sun' is defined.

I mostly took your patches, except for the calls to isatty().   Why do
you need to call isatty()?  It's sort of a icky routine, and I'd rather
avoid if at all possible.  What happens if you call stty() on a non-tty
fd under the SunOS?  In any case, read_pwd should not be printing error
messages to stderr; library routines just shouldn't be doing such
things, so I took the fprintf(stderr, ....) calls out.

Thanks for your feedback!

							- Ted

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