This is the mail archive of the cygwin-apps@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libreadline.dll.a missing functions.


Earnie Boyd wrote:
> > > > I was testing configurations of bash-2.04 and decided to try the
> > > > cygreadline.dll.  

[snip]

> > rl_set_screen_size() is declared in rlprivate.h.  It is not supposed to
> > be an external entry point; that's why it is not exported in the dll.
> > It is defined in terminal.c but is not marked 'static' there, presumably
> > because other, internal-to-readline functions call it -- but that
> > non-static designation means that is is exposed in the static library
> > and in unix shared librarys.  Just not dll's.  However, I can't find
> > *any* other reference to that function, other than the two I just
> > mentioned.  So, exteranl apps are not supposed to use
> > rl_set_screen_size(), and readline itself never calls the function.  I
> > think rl_set_screen_size() is dead code.
> >
> > What package are you compiling that wants 'rl_set_screen_size()" ?
> >
> 
> See the first sentence. ;)

Doh!  

Well, I poked around in the bash source code, and sure enough -- it
looks like the bash people are calling functions they shouldn't.  From
rlprivate.h:

/* NOTE: Functions and variables prefixed with `_rl_' are
   pseudo-global: they are global so they can be shared
   between files in the readline library, but are not intended
   to be visible to readline callers. */

When I wrote the readline.def file, I deliberately did NOT include (a)
any var or function declared in rlprivate.h (except for
rl_untranslate_keyseq, which is ALSO declared in readline.h), nor (b)
any var or function beginning with _rl_.  

You had mentioned, Earnie, that there were other undefined functions. 
Can you give me the whole list?  I suspect that they also fall into the
categories above, and that they represent a bug in bash.  Either bash
should not call library-internal functions, or readline should export
those functions.

--Chuck

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]