You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two weeks ago I've added FSearch to FreeBSD Ports Collection. It required couple of changes in order to build that addressed certain Linux'isms. One of them (unconditional inclusion of linux/limits.h) was fixed in 917442e. The other issue seemingly remains: use of non-standard strverscmp() function.
This function is a GNU extension and thus is not present in other libc implementations, including (but not limited to) FreeBSD's. It turns out that it can be implemented using g_utf8_collate_key_for_filename() calls on compared strings (see the patches under files directory at the svnweb link above). This is probably better than writing strverscmp() implementation from scratch since FSearch is GTK/Glib application anyway, so it's OK to depend on functions offered by those APIs.
I did not wrap the code with any #ifndef __GNUC__ guards since there is no conflict to prevent in case of FreeBSD, and arguably it is better not to rely on some non-standard function in the first place (i.e., I'd probably simply used provided reference implementation under some non-clashy-with-GNUs-strverscmp name, regardless of the operating system and/or underlying standard C library).
The text was updated successfully, but these errors were encountered:
Two weeks ago I've added FSearch to FreeBSD Ports Collection. It required couple of changes in order to build that addressed certain Linux'isms. One of them (unconditional inclusion of
linux/limits.h
) was fixed in 917442e. The other issue seemingly remains: use of non-standardstrverscmp()
function.This function is a GNU extension and thus is not present in other
libc
implementations, including (but not limited to) FreeBSD's. It turns out that it can be implemented usingg_utf8_collate_key_for_filename()
calls on compared strings (see the patches underfiles
directory at the svnweb link above). This is probably better than writingstrverscmp()
implementation from scratch since FSearch is GTK/Glib application anyway, so it's OK to depend on functions offered by those APIs.I did not wrap the code with any
#ifndef __GNUC__
guards since there is no conflict to prevent in case of FreeBSD, and arguably it is better not to rely on some non-standard function in the first place (i.e., I'd probably simply used provided reference implementation under some non-clashy-with-GNUs-strverscmp name, regardless of the operating system and/or underlying standard C library).The text was updated successfully, but these errors were encountered: