Blob Blame History Raw
--- src/cmd/basecomputer.cpp.orig	2012-03-19 03:20:14.000000000 -0500
+++ src/cmd/basecomputer.cpp	2012-04-04 22:33:14.208302980 -0500
@@ -3033,10 +3033,10 @@
     return 0;
 }
 
-static int datesort( const void *v1, const void *v2 )
+static int datesort ( const struct dirent **v1, const struct dirent **v2 )
 {
-    const struct dirent *d1 = *(const struct dirent**) v1;
-    const struct dirent *d2 = *(const struct dirent**) v2;
+    const struct dirent *d1=*v1;
+    const struct dirent *d2=*v2;
     struct stat s1, s2;
     std::string tmp = VSFileSystem::homedir+"/save/"+d1->d_name;
     if ( stat( tmp.c_str(), &s1 ) )
@@ -3047,12 +3047,6 @@
     return s1.st_mtime-s2.st_mtime;
 }
 
-#if (defined (__FREEBSD__)) || (defined (_WIN32) && !defined (__CYGWIN__ ) ) || (defined (__GLIBC_MINOR__) && __GLIBC_MINOR__ >= 10) || defined(__HAIKU__)
-typedef int (*scancompare)( const struct dirent **v1, const struct dirent **v2 );
-#else
-typedef int (*scancompare)( const void *v1, const void *v2 );
-#endif
-
 //Load the controls for the News display.
 void BaseComputer::loadLoadSaveControls( void )
 {
@@ -3065,7 +3059,7 @@
     if (playerUnit) {
         struct dirent **dirlist;
         std::string     savedir = VSFileSystem::homedir+"/save/";
-        int ret = scandir( savedir.c_str(), &dirlist, nodirs, (scancompare)&datesort );
+        int ret = scandir (savedir.c_str(),&dirlist,nodirs,datesort);
         while (ret-- > 0)
             picker->addCell( new SimplePickerCell( dirlist[ret]->d_name ) );
     }