Fixes for building on OSX
alutwak opened this issue · comments
To build on OSX the following modifications need to be made:
- The -fexpensive-optimizations flag needs to be removed from c/Makefile.am. The OSX version of gcc (which I'm pretty sure just wraps LLVM) doesn't like that flag and it should be unnecessary anyway, since it's included in the -O2 flag.
- AddToCompletionList(), OutputCompletionList() and AddCompoundMembers() need to have the
inline
specifier removed. I'm not totally sure why this is, but I'm guessing that it's because those functions are used in if-statement conditions. - The statement
abs(h % HASH_SIZE);
should be replaced byh % HASH_SIZE;
on line 82.h
is unsigned so the abs() function doesn't do anything. LLVM throws a warning on this and that warning results in an error because of the -Werror flag.
Thanks for reviving this project!
Thanks for this report!
I'm to make these changes (and a few more based on my own testing). Could I ask you to test those before they land? I don't have a Mac handy to test with.
Yeah, that would be no problem. Just let me know when you're ready.
I'm going back through these issues now and I missed this one.
Right now, problem 2 should have been fixed. I will fix the other two momentarily.
This should be fixed as of 006a0d7.