Skip to content

Readline depends on stdio.h #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Readline depends on stdio.h #1

wants to merge 1 commit into from

Conversation

MisterDA
Copy link

Hello !
I had compilation errors. It seems to me that readline depends on stdio.h, and moving the includes fixed the errors.

Could you add a license to this project ?

gcc -Wall -g main.c consoline.c HistoryDatabase.c RbTree.c -lreadline -o consoline
In file included from /usr/include/readline/readline.h:35:0,
                 from consoline.c:8:
/usr/include/readline/rltypedefs.h:71:28: erreur : unknown type name « FILE »
 typedef int rl_getc_func_t PARAMS((FILE *));
                            ^
/usr/include/readline/readline.h:429:20: erreur : unknown type name « FILE »
 extern int rl_getc PARAMS((FILE *));
                    ^
In file included from consoline.c:8:0:
/usr/include/readline/readline.h:558:8: erreur : unknown type name « FILE »
 extern FILE *rl_instream;
        ^~~~
/usr/include/readline/readline.h:559:8: erreur : unknown type name « FILE »
 extern FILE *rl_outstream;
        ^~~~
/usr/include/readline/readline.h:588:8: erreur : unknown type name « rl_getc_func_t »
 extern rl_getc_func_t *rl_getc_function;
        ^~~~~~~~~~~~~~
/usr/include/readline/readline.h:917:3: erreur : unknown type name « FILE »
   FILE *inf;
   ^~~~
/usr/include/readline/readline.h:918:3: erreur : unknown type name « FILE »
   FILE *outf;
   ^~~~
make: *** [Makefile:6: consoline] Error 1

@thejoshwolfe
Copy link
Owner

Uh oh. Looks like a bug in readline.

Can you tell me which version of readline you have installed? Perhaps telling me your OS would help too. If possible, I'd like to correct the root problem rather than working around it here.

I will certainly add a license. Give me a day or two. It will be the MIT License.

@thejoshwolfe
Copy link
Owner

Sorry. Looks like readline is GPL, not LGPL. That means this library will be GPL, I believe. I'll need a day or two to verify that.

@MisterDA
Copy link
Author

I'm using Arch Linux, and I have the latest core/readline 7.0.001-1 package installed.

@Ghotrix
Copy link

Ghotrix commented Jul 26, 2021

Readline on Arch still depends on stdio.h being included somewhere before the readline inclusion. Can you merge this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants