Issue 988300: Compiler warnings for Modules/readline.c:flex_complete() (original) (raw)

Created on 2004-07-09 23:53 by brett.cannon, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (8)
msg21468 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-07-09 23:53
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.
msg21469 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-07-12 12:23
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.
msg21470 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-07-12 18:46
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 .
msg21471 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-07-12 18:56
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...
msg21472 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-07-12 19:31
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?
msg21473 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-07-14 10:59
Logged In: YES user_id=6656 Hmm. Does running LDFLAGS=-L/sw/lib ./configure acheive anything interesting? Speaking for myself, I'd prefer it if python's build process ignored /sw/ entirely by default...
msg21474 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-07-16 05:57
Logged In: YES user_id=357491 OK, that seemed to solve it. I will fire off a quick email to python-dev to see if anyone feels we should try to deal with this or add a mention in the README. Reassigning to myself. Thanks, Michael, for the help.
msg21475 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-08-05 04:04
Logged In: YES user_id=357491 Closing as won't fix since turned out mostly to be a setup issue on my box of not having Configure know where the header file was.
History
Date User Action Args
2022-04-11 14:56:05 admin set github: 40530
2004-07-09 23:53:16 brett.cannon create