augustss / MicroHs

Haskell implemented with combinators
Other
370 stars 25 forks source link

Implement the ffsl function for OpenBSD #61

Closed thimc closed 1 month ago

thimc commented 1 month ago

Hi Lennart,

The ffsl() function is a glibc extension although it may be present in other operating systems (such as FreeBSD and MacOS) so here is a minimal implementation which makes it possible to compile MicroHs on OpenBSD 7.6 (tested on the -current branch for amd64).

Edit:

Looking in to the source further I noticed that there already is an implementation of ffsl, but it isn't picked up when compiling, presumably because we define FFS as ffsl.

augustss commented 1 month ago

Just to make sure I got it right, OpenBSD has ffs, but not ffsl? If that's the case, I'll make a special implementation of ffsl for this case, since it's important to have a fast ffsl.

thimc commented 1 month ago

That is correct.

augustss commented 1 month ago

I have made some changes that I hope will work on OpenBSD. Please let me know.

thimc commented 1 month ago

Yup, compiled just fine. Thanks!