[ python-Bugs-988300 ] Compiler warnings for
Modules/readline.c:flex_complete()
SourceForge.net
noreply at sourceforge.net
Mon Jul 12 21:31:16 CEST 2004
Bugs item #988300, was opened at 2004-07-09 16:53
Message generated for change (Comment added) made by bcannon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=988300&group_id=5470
Category: Extension Modules
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Brett Cannon (bcannon)
Assigned to: Michael Hudson (mwh)
Summary: Compiler warnings for Modules/readline.c:flex_complete()
Initial Comment:
When I compile on my OS X 10.3.4 with Fink's readline 4.3-25 I get
the following two warnings:
/Users/drifty/Code/CVS/python/dist/src/Modules/readline.c: In
function `flex_complete':
/Users/drifty/Code/CVS/python/dist/src/Modules/readline.c:604:
warning: implicit declaration of function `completion_matches'
/Users/drifty/Code/CVS/python/dist/src/Modules/readline.c:604:
warning: return makes pointer from integer without a cast
Now, although I have a version greater than 4.2, this only makes
sense if HAVE_RL_COMPLETION_MATCHES is undefined and thus
the completion_matches() macro is not being defined (although I
checked and the headers have a prototype for
rl_completion_matches() and my readline seems to compile and
work well enough).
Would a #else statement that defines completion_matches() fit in
there? Problem would be the return type for flex_complete()
might need to be covered as well unless a clever macro can be
created that returns a char **.
Initially assigned to Michael since he seems to always deal with the
readline stuff.
----------------------------------------------------------------------
>Comment By: Brett Cannon (bcannon)
Date: 2004-07-12 12:31
Message:
Logged In: YES
user_id=357491
Sounds like the right solution. But unfortunately I don't know how to
implement the fix either. Ask on python-dev?
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2004-07-12 11:56
Message:
Logged In: YES
user_id=6656
So I'm guessing that the answer to this is to teach the
configure test to look in /sw/lib, then. Not sure how to do
that...
----------------------------------------------------------------------
Comment By: Brett Cannon (bcannon)
Date: 2004-07-12 11:46
Message:
Logged In: YES
user_id=357491
> Oh, er, "good".
If I was wrong to assign it to you feel free to unassign it.
I don't know when it was introduced; it might be old. I just decided to go
through my make output and look for any warnings before a1 when out
the door. I tend to compile with ``--without-toolbox-glue`` and that
leads to a ton of output from modules wanting Carbon stuff and throwing
a fit that they can't link so it just didn't catch my eye.
As for RL_COMPLETION_MATCHES, pyconfig.h has it commented out and
config.log has test code fail at compilation because it can't find code for
-lreadline::
configure:17625: checking for rl_completion_matches in -lreadline
configure:17656: gcc -o conftest -g -O2 conftest.c -lreadline -ltermcap
-ldl > &5
ld: can't locate file for: -lreadline
so I end up with::
``ac_cv_lib_readline_rl_completion_matches=no``.
in config.log .
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2004-07-12 05:23
Message:
Logged In: YES
user_id=6656
> Initially assigned to Michael since he seems to always
> deal with the readline stuff.
Oh, er, "good".
I'm a little confused. Is this a new thing? As in, introduced by my
changes just before 2.4a1? *Why* is
HAVE_RL_COMPLETION_MATCHES undefined? What do config.log
and pyconfig.h have to say on the matter?
> Would a #else statement that defines completion_matches()
> fit in there?
Not unless we can work out why it's needed.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=988300&group_id=5470
More information about the Python-bugs-list
mailing list