#include "wx/utils.h"
#include <wx/intl.h>
+// there are just too many of those...
+#ifdef _MSC_VER
+ #pragma warning(disable:4706) // assignment within conditional expression
+#endif // VC++
+
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#endif
#endif
#include <time.h>
+#ifndef __MWERKS__
#include <sys/types.h>
#include <sys/stat.h>
+#else
+#include <stat.h>
+#include <unistd.h>
+#endif
#ifdef __UNIX__
#include <unistd.h>
#endif
#ifdef __WINDOWS__
-#ifndef __GNUWIN32__
+#if !defined( __GNUWIN32__ ) && !defined( __MWERKS__ )
#include <direct.h>
#include <dos.h>
#endif
#endif
#include "wx/setup.h"
-#ifdef HAVE_FNMATCH_H
+
+// No, Cygwin doesn't appear to have fnmatch.h after all.
+#if defined(HAVE_FNMATCH_H)
#include "fnmatch.h"
#endif
#define _MAXPATHLEN 500
-#if !USE_SHARED_LIBRARY
+extern char *wxBuffer;
+
+#if !USE_SHARED_LIBRARIES
IMPLEMENT_DYNAMIC_CLASS(wxPathList, wxStringList)
#endif
-extern char *wxBuffer;
-
void wxPathList::Add (const wxString& path)
{
wxStringList::Add ((char *)(const char *)path);
bool wxRemoveFile(const wxString& file)
{
-#if defined(_MSC_VER) || defined(__BORLANDC__)
+#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__)
int flag = remove(WXSTRINGCAST file);
#else
int flag = unlink(WXSTRINGCAST file);
#else
static short last_temp = 0; // cache last to speed things a bit
// At most 1000 temp files to a process! We use a ring count.
- char tmp[100];
+ char tmp[100]; // FIXME static buffer
for (short suffix = last_temp + 1; suffix != last_temp; ++suffix %= 1000)
{
char *wxFindNextFile(void)
{
#ifndef __VMS__
- static char buf[400];
+ static char buf[400]; // FIXME static buffer
/* MATTHEW: [2] Don't crash if we read too many times */
if (!wxDirStream)
{
if (!buf)
buf = new char[sz+1];
-#ifdef _MSC_VER
+#ifdef _MSC_VER
if (_getcwd(buf, sz) == NULL) {
#else
if (getcwd(buf, sz) == NULL) {
};
bool wxMatchWild( const wxString& pat, const wxString& text, bool dot_special )
-#ifdef HAVE_FNMATCH_H
+
+#if defined(HAVE_FNMATCH_H)
{
if(dot_special)
return fnmatch(pat.c_str(), text.c_str(), FNM_PERIOD) == 0;
}
#else
-#pragma error Broken implementation of wxMatchWild() -- needs fixing!
+// #pragma error Broken implementation of wxMatchWild() -- needs fixing!
+
/*
* WARNING: this code is broken!
*/
pattern++;
return ((*str == '\0') && (*pattern == '\0'));
};
+
#endif
+#ifdef _MSC_VER
+ #pragma warning(default:4706) // assignment within conditional expression
+#endif // VC++