GNOME Bugzilla – Bug 435797
gtksearchenginesimple doesn't build on non-glibc systems
Last modified: 2007-05-14 15:34:36 UTC
As mentioned in bug #344785, the recently added searching code in the filechooser fails to build on non-glibc systems. The reason is that FTW_ACTIONRETVAL and friends are glibc specific, not POSIX. See bug #157076 for a possible solution (add ftw()-like API to glib).
In the short term, you could just tighten the ftw check in configure to fail on those systems...
Created attachment 88155 [details] [review] Additional check for GNU ftw Something like this? The patch checks for GNU ftw and use that define in the simple search enging code instead of HAVE_FTW_H. Still uses the old check for updateiconcache.
the patch looks good to me. in theory, we could still use ftw() without the FTW_ACTIONRETVAL with a time penalty on non-glibc systems.
Created attachment 88159 [details] [review] Check for GNU libc extensions to ftw The patch adds a configure check for GNU extensions to ftw() and nftw() and use the newly defined HAVE_GNU_FTW flag in GtkSearchEngineSimple. If no extension is available, the code falls back to POSIX-compliant nftw(). Signed-off-by: Emmanuele Bassi <ebassi@gnome.org> --- configure.in | 11 +++++++++++ gtk/gtksearchenginesimple.c | 31 +++++++++++++++++++++++-------- 2 files changed, 34 insertions(+), 8 deletions(-)
Thanks, this builds nicely for me. It doesn't fully work but we can tweak that later, I'm happy it builds for now.
2007-05-14 Emmanuele Bassi <ebassi@gnome.org> * configure.in: Add check for GNU extensions to ftw()/nftw(). * gtk/gtksearchenginesimple.c: Fix compilation on systems with only POSIX-compliant ftw(). (#435797, based on a patch by Richard Hult)