"Stephen J. Turnbull" <turnbull(a)sk.tsukuba.ac.jp> writes:
Also we should pay close attention to Linux/glibc-isms. The code in
question is conditioned on HAVE_GETPT, but this refers to a GNU
extension in glibc which appears to be a convenience routine.
getpt() is not a convinience routine. It is required for UNIX98 PTY
emulation with glibc 2.1 on Linux 2.0. There's no master PTY device
on such systems.
It's quite possible that other systems will comply with the
standard
(Unix9X?) and could take advantage of the apparently more careful
code in the Linux s/m file, but won't have getpt() -- or at least we
should check on that.
Other system do support these PTY style, but the master PTY device is
named differently, and some systems require special STREAMS setup
stuff. Finally, HP-UX grantpt() doesn't do what the manpage says.
As a result, when I wrote the patch for GNU Emacs, I discarded the
idea of unifying UNIX98 PTY support. It would still require a bunch
of #defines and would be nearly as ugly as the current solution (on
GNU Emacs).
(Due to legal reasons, GNU Emacs does not ship with the RUS-CERT
patch.)
--
Florian Weimer Florian.Weimer(a)RUS.Uni-Stuttgart.DE
University of Stuttgart
http://cert.uni-stuttgart.de/
RUS-CERT +49-711-685-5973/fax +49-711-685-5898
http://ca.uni-stuttgart.de:11371/pks/lookup?op=get&search=0xC06EC3B5