Skip to content
This repository has been archived by the owner on Apr 15, 2021. It is now read-only.

Problem finding the definition of function 're_comp' #1

Open
JolleyLama opened this issue Jan 28, 2016 · 2 comments
Open

Problem finding the definition of function 're_comp' #1

JolleyLama opened this issue Jan 28, 2016 · 2 comments

Comments

@JolleyLama
Copy link

When compiling on El Capitan, I get a series of error messages starting with this:

cc -m32 -Os -pipe  -o work/fortune fortune.c regexpr.o
fortune.c:399:16: warning: implicit declaration of function 're_comp' is invalid
      in C99 [-Wimplicit-function-declaration]
                if (BAD_COMP(RE_COMP(pat))) {
                             ^

I fixed this by adding this to fortune.c:

# include "regexpr.h"

Right after the include section at the top of the file. I added it right after # include "pathnames.h". I'm not much of a C developer either, but I saw that 're_comp' was defined in that header file, and the header file wasn't being included anywhere.

@JolleyLama
Copy link
Author

I don't know how active this repository is, so I'm really posting this to help others get this to build.

@johnpneumann
Copy link
Owner

@JolleyLama - Thanks for the report. I monitor the repo, but it's seen little to no activity so have not needed to do much. If you want to submit a PR, feel free and I'll merge it in. That being said, on OSX, I've found it much easier to just use homebrew to install fortune (since I utilize it to manage more packages than just fortune). I can understand that others may not want to install homebrew (I'm not sure why, but I'm sure that folks have their reasons), so I'd be happy to take a PR to fix this in case it might help someone else.

johnpneumann added a commit that referenced this issue Feb 26, 2016
tristanmorgan pushed a commit to tristanmorgan/Fortune-OSX that referenced this issue Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants