tmp_fname = new char[fname_len];
wxWX2MB(tmp_fname, filename, fname_len);
-#ifdef __WXMAC__
+#if defined(__WXMAC__) && !defined(__UNIX__)
m_fp = fopen(wxUnix2MacFilename( tmp_fname ), mode);
#else
m_fp = fopen(tmp_fname, mode);
delete tmp_fname;
#else
-#ifdef __WXMAC__
+#if defined(__WXMAC__) && !defined(__UNIX__)
m_fp = fopen(wxUnix2MacFilename( filename ), mode);
#else
m_fp = fopen(filename, mode);