bug-inetutils
[Top][All Lists]
Advanced

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

Re: [bug-inetutils] NetBSD support.


From: Mats Erik Andersson
Subject: Re: [bug-inetutils] NetBSD support.
Date: Fri, 2 Dec 2011 12:08:18 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

fredag den  2 december 2011 klockan 09:27 skrev Simon Josefsson detta:
> Mats Erik Andersson <address@hidden> writes:
> 
> > Successful compilation boils down to:
> >
> >    Glibc, Solaris, FreeBSD:
> >
> >          gcc test.c -lreadline
> >
> >    OpenBSD:
> >
> >          gcc test.c -lreadline -lcurses    (or -lncurses)

Correction:

    OpenBSD, OpenIndiana (no automatic linking with libtermcap):

          gcc test.c -lreadline -ltermcap

Both these are using the FSF code, at least its header file.

> >
> >    NetBSD:
> >
> >          gcc test.c -ledit

Automatic linking with libtermcap.

> > Observe the different linking library. Presently, our "configure.ac"
> > is not able to implement this, since it only tests with "-lreadline",
> > which does not even exist in NetBSD 5.1. Therefore I get
> >
> >    ftp_BUILD =
> >
> > thus disabling the build of a FTP client.
> >
> > The good thing is, that when I do the steps manually, finishing off with
> >
> >     gcc ... -o ftp *.o "libraries" -ledit
> >
> > then I do get a functional FTP client also in NetBSD 5.1.
> >
> > Simon, could you refine the testing in "configure.ac" so far as to be
> > inserting "-ledit" on NetBSD?
> 
> Interesting, InetUtils uses am/readline.m4 to find the right library and
> tries some things but maybe it is not enough.  Is the NetBSD libedit
> completely compatible with readline?  Does they have a

Can you name me some suitable test source for investigating compatibility?

> readline/readline.h header file?  With the add_history function?  I

   int add_history(const char *);

Symbolic link:   history.h --> readline.h

The directory "/usr/include/readline/" contains only "readline.h"
and "history.h", nothing else!

> recall that the BSD folks did a BSD-licensed re-implementation of
> libreadline, maybe this is it.  I'm not sure we should support that,

They state their readline implementation as a wrapper around libedit.

/* /usr/include/readline/readline.h
 *
 * Copyright (c) 1997 The NetBSD Foundation, Inc.
 * All rights reserved.
 *
 * This code is derived from software contributed to The NetBSD Foundation
 * by Jaromir Dolecek.

 * list of readline stuff supported by editline library's readline wrapper
   ...
 * The following are not implemented
   (Mats: But are given as declarations!)

  int            rl_kill_text(int, int);
  Keymap                 rl_get_keymap(void);
  void           rl_set_keymap(Keymap);
  Keymap                 rl_make_bare_keymap(void);
  int            rl_generic_bind(int, const char *, const char *, Keymap);
  int            rl_bind_key_in_map(int, Function *, Keymap);

> maybe it is better to recommend people to install GNU readline instead,
> but it is a judgement call...

The manual page for libedit is this:

  http://netbsd.gw.com/cgi-bin/man-cgi?editline+3

The following is not present on a system installed from disk,
and in fact describes the readline implementation from FSF,
which is not the one in <readline/readline.h>.

  http://netbsd.gw.com/cgi-bin/man-cgi?readline

Regards,
  Mats



reply via email to

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