+#if defined(__WXMAC__)
+wxString wxMacFSSpec2MacFilename( const FSSpec *spec )
+{
+ Handle myPath ;
+ short length ;
+
+ FSpGetFullPath( spec , &length , &myPath ) ;
+ ::SetHandleSize( myPath , length + 1 ) ;
+ ::HLock( myPath ) ;
+ (*myPath)[length] = 0 ;
+ if ( length > 0 && (*myPath)[length-1] ==':' )
+ (*myPath)[length-1] = 0 ;
+
+#ifdef __DARWIN__
+ wxString result( wxMac2UnixFilename((char*) *myPath) ) ;
+#else
+ wxString result( (char*) *myPath ) ;
+#endif
+ ::HUnlock( myPath ) ;
+ ::DisposeHandle( myPath ) ;
+ return result ;
+}
+
+void wxMacFilename2FSSpec( const char *path , FSSpec *spec )
+{
+#ifdef __DARWIN__
+ const char *s = wxUnix2MacFilename(path);
+ FSpLocationFromFullPath( strlen(s) , s , spec ) ;
+#else
+ FSpLocationFromFullPath( strlen(path) , path , spec ) ;
+#endif
+}