estraier / tkrzw

a set of implementations of DBM
Apache License 2.0
169 stars 21 forks source link

Removing -D_POSIX_C_SOURCE=999999L made memmem() visible on FreeBSD #33

Closed puffetto closed 2 years ago

puffetto commented 2 years ago

I am reverting my previous patch as removing -D_POSIX_C_SOURCE=999999L (which is necessary to compile on LLVM) makes memmem() visible again on FreeBSD. As on FreeBSD compiling libraries with GCC is becoming a link-mangling nightmare at this point, in my humble opinion LLVM is the way to go.

estraier commented 2 years ago

If the error is caused by compiler's behavior, I think we should detect compiler's identifier, like this: https://stackoverflow.com/questions/28166565/detect-gcc-as-opposed-to-msvc-clang-with-macro

BTW, can I think you are using CLang as a frontend of LLVM on FreeBSD?