// Created: 28.12.2000
// RCS-ID: $Id$
// Copyright: (c) 2000 Robert Roebling
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/*
#endif
#ifdef __MWERKS__
+#ifdef __MACH__
+#include <sys/types.h>
+#include <utime.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#else
#include <stat.h>
#include <unistd.h>
#include <unix.h>
#endif
+#endif
#ifdef __WATCOMC__
#include <io.h>
}
#else // !HAVE_MKTEMP (includes __DOS__)
// generate the unique file name ourselves
- #ifndef __DOS__
+ #if !defined(__DOS__) && (!defined(__MWERKS__) || defined(__DARWIN__) )
path << (unsigned int)getpid();
#endif
size_t count = dirs.GetCount();
for ( size_t i = 0; i < count; i++ )
{
- if ( i > 0 || filename.IsAbsolute() )
+ if ( i > 0 ||
+#if defined(__WXMAC__) && !defined(__DARWIN__)
+ // relative pathnames are exactely the other way round under mac...
+ !filename.IsAbsolute()
+#else
+ filename.IsAbsolute()
+#endif
+ )
currPath += wxFILE_SEP_PATH;
currPath += dirs[i];
void wxFileName::RemoveDir( int pos )
{
- m_dirs.Remove( (size_t)pos );
+ m_dirs.RemoveAt( (size_t)pos );
}
// ----------------------------------------------------------------------------
}
MacDefaultExtensionRecord( const MacDefaultExtensionRecord& from )
{
- strcpy( m_ext , from.m_ext ) ;
+ wxStrcpy( m_ext , from.m_ext ) ;
m_type = from.m_type ;
m_creator = from.m_creator ;
}
- MacDefaultExtensionRecord( const char * extension , OSType type , OSType creator )
+ MacDefaultExtensionRecord( const wxChar * extension , OSType type , OSType creator )
{
- strncpy( m_ext , extension , kMacExtensionMaxLength ) ;
+ wxStrncpy( m_ext , extension , kMacExtensionMaxLength ) ;
m_ext[kMacExtensionMaxLength] = 0 ;
m_type = type ;
m_creator = creator ;
}
- char m_ext[kMacExtensionMaxLength] ;
+ wxChar m_ext[kMacExtensionMaxLength] ;
OSType m_type ;
OSType m_creator ;
} ;
// load the default extensions
MacDefaultExtensionRecord defaults[1] =
{
- MacDefaultExtensionRecord( "txt" , 'TEXT' , 'ttxt' ) ,
+ MacDefaultExtensionRecord( wxT("txt") , 'TEXT' , 'ttxt' ) ,
} ;
// we could load the pc exchange prefs here too
MacDefaultExtensionRecord rec ;
rec.m_type = type ;
rec.m_creator = creator ;
- strncpy( rec.m_ext , ext.Lower().c_str() , kMacExtensionMaxLength ) ;
+ wxStrncpy( rec.m_ext , ext.Lower().c_str() , kMacExtensionMaxLength ) ;
gMacDefaultExtensions.Add( rec ) ;
}
#endif