On 1999-12-17, Jan Wieck mentioned:
> gcc -I../../interfaces/libpq -I../../include -I../../backend -O2 -Wall -Wmissing-prototypes -g -c tab-complete.c
-otab-complete.o
> tab-complete.c: In function `initialize_readline':
> tab-complete.c:100: `rl_filename_quoting_function' undeclared (first use in this function)
> tab-complete.c:100: (Each undeclared identifier is reported only once
> tab-complete.c:100: for each function it appears in.)
> tab-complete.c:102: `rl_filename_quote_characters' undeclared (first use in this function)
> tab-complete.c:107: `rl_completion_query_items' undeclared (first use in this function)
> tab-complete.c: In function `psql_completion':
> tab-complete.c:206: `rl_completion_append_character' undeclared (first use in this function)
If these are indeed all the errors, then I would like to know what version
of readline it is you're using. There is no constant or macro defined for
that AFAICS, so you might have to infer that from a package name or other
sources. Mine goes by the name of 2.2.1. Note that this is not the same as
the version number on the libreadline shared library, where mine says 3.0.
> tab-complete.c:262: warning: implicit declaration of function `snprintf'
That looks a little odd, since that prototype is declared in c.h, which is
included in tab-complete.c, conditional on config.h macros, which is also
included in tab-complete.c (before c.h), so maybe a configure problem?
> tab-complete.c: In function `quote_file_name':
> tab-complete.c:790: `SINGLE_MATCH' undeclared (first use in this function)
> tab-complete.c:786: warning: `length' might be used uninitialized in this function
HUH???
[...]
char * quote_file_name(char *text, int match_type, char * quote_pointer)
{ char *s; size_t length; (void)quote_pointer; /* not used */ length = strlen(text) + (
match_type==SINGLE_MATCH? 3 : 2 ); s = xmalloc(length);
[...]
Looks like a brain-dead compiler to me.
> make[2]: *** [tab-complete.o] Error 1
All psql code should compile with -Wall -W with precisely this message:
common.c: In function `handle_sigint':
common.c:316: warning: unused parameter `postgres_signal_arg'
Everything else is a problem which will get fixed.
--
Peter Eisentraut Sernanders väg 10:115
peter_e@gmx.net 75262 Uppsala
http://yi.org/peter-e/ Sweden