problem when including readline.h
Chip Camden
sterling at camdensoftware.com
Sun Feb 13 23:17:39 UTC 2011
Quoth Robert Huff on Sunday, 13 February 2011:
> Chip Camden writes:
>
> > > I'm writing a C program which, for various reasons, has the
> > > warning level turned _way_ up.
> > > I'm now getting this:
> > >
> > > /usr/include/readline/readline.h:336: warning: redundant redeclaration of 'rl_make_bare_keymap'
> > > /usr/include/readline/keymaps.h:74: warning: previous declaration of 'rl_make_bare_keymap' was here
> > >
> > > and more like it.
> > > Other than turning down the warning level, what's wrong and how
> > > do I fix it?
> >
> > Both keymaps.h and readline.h declare rl_make_bare_keymap as an external
> > function. Perhaps you shouldn't be including both files?
>
> Except I don't. The include list:
>
> #include <sys/types.h>
> #include <ctype.h>
> #include <limits.h>
> #include <mysql/mysql.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <strings.h>
> #include <sys/param.h>
> #include <unistd.h>
> #include <readline/readline.h>
> #include <readline/history.h>
>
> No second "keymap.h" visible.
>
>
> Robert Huff
>
Ah -- readline.h includes keymaps.h. You're SOL.
--
Sterling (Chip) Camden | sterling at camdensoftware.com | 2048D/3A978E4F
http://chipsquips.com | http://camdensoftware.com | http://chipstips.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20110213/f61e5ea0/attachment.pgp
More information about the freebsd-questions
mailing list