gnome-commander r1911 - in trunk: . src



Author: epiotr
Date: Mon Jul 28 18:35:25 2008
New Revision: 1911
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1911&view=rev

Log:
Correctly handle FNM_CASEFOLD when building on non-Gnu systems

Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/src/filter.cc
   trunk/src/gnome-cmd-file-popmenu.cc
   trunk/src/utils.cc

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Mon Jul 28 18:35:25 2008
@@ -237,7 +237,6 @@
 dnl Checks for library functions
 dnl =============================
 
-AC_FUNC_FNMATCH_GNU
 AC_FUNC_MMAP
 
 dnl ================================================================

Modified: trunk/src/filter.cc
==============================================================================
--- trunk/src/filter.cc	(original)
+++ trunk/src/filter.cc	Mon Jul 28 18:35:25 2008
@@ -25,10 +25,6 @@
 #include "gnome-cmd-includes.h"
 #include "filter.h"
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 using namespace std;
 
 
@@ -55,7 +51,7 @@
     filter->fn_exp = g_strdup (exp);
     filter->fn_flags = FNM_NOESCAPE;
 
-#ifdef _GNU_SOURCE
+#ifdef FNM_CASEFOLD
     if (!case_sens)
         filter->fn_flags |= FNM_CASEFOLD;
 #endif

Modified: trunk/src/gnome-cmd-file-popmenu.cc
==============================================================================
--- trunk/src/gnome-cmd-file-popmenu.cc	(original)
+++ trunk/src/gnome-cmd-file-popmenu.cc	Mon Jul 28 18:35:25 2008
@@ -30,9 +30,6 @@
 #include "utils.h"
 #include "cap.h"
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
 #include <fnmatch.h>
 
 using namespace std;
@@ -284,7 +281,7 @@
             for (; files; files = files->next)
             {
                 gboolean ok = FALSE;
-#ifdef _GNU_SOURCE
+#ifdef FNM_CASEFOLD
                 gint fn_flags = FNM_NOESCAPE | FNM_CASEFOLD;
 #else
                 gint fn_flags = FNM_NOESCAPE;

Modified: trunk/src/utils.cc
==============================================================================
--- trunk/src/utils.cc	(original)
+++ trunk/src/utils.cc	Mon Jul 28 18:35:25 2008
@@ -33,9 +33,6 @@
 #include "gnome-cmd-con-list.h"
 #include "gnome-cmd-xfer.h"
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
 #include <fnmatch.h>
 
 using namespace std;
@@ -1328,7 +1325,7 @@
 gboolean patlist_matches (GList *pattern_list, const gchar *s)
 {
     for (GList *tmp = pattern_list; tmp; tmp = tmp->next)
-#ifdef _GNU_SOURCE
+#ifdef FNM_CASEFOLD
         if (fnmatch ((gchar *) tmp->data, s, FNM_NOESCAPE|FNM_CASEFOLD) == 0)
 #else
         if (fnmatch ((gchar *) tmp->data, s, FNM_NOESCAPE) == 0)   // omit FNM_CASEFOLD as it is a GNU extension.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]