-#if defined(__WINDOWS__)
- c = T('\r');
- m_output->Write( (const void*)(&c), sizeof(wxChar) );
- c = T('\n');
- m_output->Write( (const void*)(&c), sizeof(wxChar) );
-#elif defined(__UNIX__)
- c = T('\n');
- m_output->Write( (const void*)(&c), sizeof(wxChar) );
-#elif defined(__WXMAC__)
- c = T('\r');
- m_output->Write( (const void*)(&c), sizeof(wxChar) );
-#elif defined(__OS2__)
- c = T('\r');
- m_output->Write( (const void*)(&c), sizeof(wxChar) );
- c = T('\n');
- m_output->Write( (const void*)(&c), sizeof(wxChar) );
-#else
- #error "wxTextOutputStream: unsupported platform."
-#endif
+ if (m_mode == wxEOL_DOS)
+ {
+ c = wxT('\r');
+ m_output.Write( (const void*)(&c), sizeof(wxChar) );
+ c = wxT('\n');
+ m_output.Write( (const void*)(&c), sizeof(wxChar) );
+ } else
+ if (m_mode == wxEOL_MAC)
+ {
+ c = wxT('\r');
+ m_output.Write( (const void*)(&c), sizeof(wxChar) );
+ } else
+ {
+ c = wxT('\n');
+ m_output.Write( (const void*)(&c), sizeof(wxChar) );
+ }