-#if defined(__WXMAC__) && !defined(__UNIX__)
- // Dominic Mazzoni [dmazzoni+@cs.cmu.edu] reports that open is still broken on the mac, so we replace
- // int fd = open(wxUnix2MacFilename( szFileName ), O_CREAT | (bOverwrite ? O_TRUNC : O_EXCL), access);
- int fd = creat( szFileName , accessMode);
-#else
- int fd = wxOpen(wxFNCONV(szFileName),
- O_BINARY | O_WRONLY | O_CREAT |
- (bOverwrite ? O_TRUNC : O_EXCL)
- ACCESS(accessMode));
-#endif
- if ( fd == -1 ) {
- wxLogSysError(_("can't create file '%s'"), szFileName);
- return FALSE;
- }
- else {
- Attach(fd);
- return TRUE;
+ int fd = wxOpen( fileName,
+ O_BINARY | O_WRONLY | O_CREAT |
+ (bOverwrite ? O_TRUNC : O_EXCL),
+ accessMode );
+ if ( fd == -1 )
+ {
+ wxLogSysError(_("can't create file '%s'"), fileName);
+ return false;