Friday, August 06, 2021

Re: new: devel/libmarisa: tire library wanted by some IME pkgs

On 21/08/06 04:13PM, Stuart Henderson wrote:
>
> make test fails to build, do you have any ideas about that?
>
>
> marisa-test.cc:21:23: error: expected unqualified-id
> EXCEPT(trie.write(::fileno(stdout)), MARISA_STATE_ERROR);
> ^
> /usr/include/stdio.h:410:19: note: expanded from macro 'fileno'
> #define fileno(p) (!__isthreaded ? __sfileno(p) : (fileno)(p))
> ^
> 1 error generated.
>

Thanks for your feedback, it seems like I need to remove the semicolons
before `fileno()` in marisa-test.cc:

- EXCEPT(trie.write(::fileno(stdout)), MARISA_STATE_ERROR);
+ EXCEPT(trie.write(fileno(stdout)), MARISA_STATE_ERROR);

The attached port is based on your tweaked version, and I include a
patch for this issue. With that, all tests are passing, but I have to
admit I'm not sure why this change is required for OpenBSD.

This version is also on the web:
https://github.com/ZhanYF/static/raw/main/libmarisa.tgz

No comments:

Post a Comment