bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-inetutils] Implicit dependency in telnetd and telnet.


From: Mats Andersson
Subject: [bug-inetutils] Implicit dependency in telnetd and telnet.
Date: Tue, 23 Aug 2011 23:15:20 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Dear all,

I happen to observe some non-elementary dependecies on
'struct termio' within telnetd/state.c,utility.c, and some
convoluted effects of HAVE_LIBREADLINE in "telnet/" and "telnetd/".

On NexentaCore without libreadline5-dev

   * telnet builds

   * telnetd must be mended:

      telnetd/state.h  must get NTELOPTS manually set

      telnetd/utility.c must see "<termio.h>" included.

On the other hand, once libreadline5-dev is installed,
then telnet as well as telnetd fails to compile. The
cause of this is the need to write

   /* telnet/telnet.c  and  telnetd/utility.c */

   #if HAVE_LIBREADLINE
   #  include <curses.h>
   #  include <term.h>
   #endif

Obviously GNU/Linux, GNU/kFreeBSD, and *BSD can make do
without explicit "<curses.h>", but OpenSolaris can not.

A related phenomenon is that GNU/Linux with libreadline
is able to include <termio.h> automatically, which happens
to be crucial in telnetd/utility.c, since HAVE_TERMIO_H
is generally unset, still the later use of "struct termio"
passes unnoticed.

Please evaluate what consequences the above insertion of
<curses.h> as well as the additions

   /* telnetd/state.c */

   #if !defined NTELOPT && defined TELOPT_NEW_ENVIRON
   #  define NTELOPTS  (1 + TELOPT_NEW_ENVIRON)
   #endif


   /* telnetd/utility.c

   #if defined HAVE_TERMIO_H || defined __sun__
   #  include <termio.h>
   #endif

would have on other systems. The indicated three changes are
the minimal actions needed to build on OpenSolaris with and
without the support of libreadline5.


Best regards,
  Mats 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]