diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp
index 52af1f7b4c..64391f01e3 100644
--- a/src/common/filefn.cpp
+++ b/src/common/filefn.cpp
@@ -70,6 +70,11 @@
#include
#endif
+#include "wx/setup.h"
+#ifdef HAVE_FNMATCH_H
+#include "fnmatch.h"
+#endif
+
#ifdef __WINDOWS__
#include "windows.h"
#endif
@@ -1393,6 +1398,17 @@ bool wxIsWild( const wxString& pattern )
};
+#ifdef HAVE_FNMATCH_H
+{
+ // dot_special: what is it supposed to do?
+ return fnmatch(pat.c_str(), text.c_str(), FNM_PERIOD) == 0;
+}
+#else
+
+#pragma error Broken implementation of wxMatchWild() -- needs fixing!
+ /*
+ * WARNING: this code is broken!
+ */
bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
{
wxString tmp1 = pat;
@@ -1527,4 +1543,5 @@ bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
pattern++;
return ((*str == '\0') && (*pattern == '\0'));
};
+#endif
diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp
index 4a6dbc728d..0199458470 100644
--- a/src/gtk/utilsgtk.cpp
+++ b/src/gtk/utilsgtk.cpp
@@ -3,7 +3,7 @@
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
-// Id:
+// Id: $Id$
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -28,6 +28,7 @@
#include
#include
+
#ifdef __SVR4__
#include
#endif
diff --git a/src/gtk1/utilsgtk.cpp b/src/gtk1/utilsgtk.cpp
index 4a6dbc728d..0199458470 100644
--- a/src/gtk1/utilsgtk.cpp
+++ b/src/gtk1/utilsgtk.cpp
@@ -3,7 +3,7 @@
// Purpose:
// Author: Robert Roebling
// Created: 01/02/97
-// Id:
+// Id: $Id$
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -28,6 +28,7 @@
#include
#include
+
#ifdef __SVR4__
#include
#endif