[Scummvm-devel] fsnode-gsoc remove file method

Marcus Comstedt marcus at mc.pp.se
Wed Oct 31 11:52:10 CET 2007


"David Corrales" <corrales.david at gmail.com> writes:

> I didn't quite get the stubbing part. I take that now, the code that is in removeFile is to be moved to the default SaveFileManager, but I don't see the stubbing part. Care to explain a bit further please?<br><br><div>

Sorry, I was a bit unclear.  The stubbing currently consists of the
following lines in file.cpp:

#ifdef __DC__
        /* Can't remove files from CD-ROM... */
        #define remove(name)  ((errno = EROFS), -1)
#endif

They are needed as long as a call to remove() exists in file.cpp,
because otherwise I get a link error because no real remove() function
exists (since it can't work anyway, it didn't make any sense to write
one).  With this #define, removeFile() becomes a stub, scummvm links,
but the removeFile() function will of course not work (since it can't
work on the DC).  Hence the question if something actually relied on
this function to work.

If the call to remove() is moved to the default savefile manager,
I don't need the stub anymore since default-saves.cpp is not included
in my build.


  // Marcus






More information about the Scummvm-devel mailing list