dajobe / raptor

Redland Raptor RDF syntax library
https://librdf.org/raptor/
Other
156 stars 62 forks source link

Fix sort_r selection on GNU/Hurd #60

Closed pinotree closed 1 year ago

pinotree commented 1 year ago

The Hurd is based on the Mach microkernel, and thus __MACH__ is defined; since also macOS is (loosely) based on Mach, it defines __MACH__ as well. Because of this, the wrong variant of sort_r (i.e. the BSD one) is used for the Hurd, which does not work.

Since on macOS __APPLE__ is defined, and __DARWIN__ helps for older Mac OS X, then simply drop the __MACH__ selection: the preprocessor check for the Linux sort_r is properly used for the Hurd (using __GNU__), and that variant works fine.

dajobe commented 1 year ago

Thanks for the patch.