[Insight-developers] BCC compiler issue
Bill Hoffman
bill.hoffman@kitware.com
Wed, 12 Feb 2003 11:07:44 -0500
CMake does something like this:
#include <stdio.h>
#if defined(_WIN32) && (defined(_MSC_VER) || defined(__BORLANDC__))
#define _unlink unlink
#else
#include <unistd.h>
#endif
bool cmSystemTools::RemoveFile(const char* source)
{
return unlink(source) != 0 ? false : true;
}
At 06:00 PM 2/11/2003 -0600, Hans Johnson wrote:
>Hello,
>
>Could somebody with the Borland compiler please tell us the cross platform function call used to delete a file?
>
>I believe that the following program should do it:
>
>#include <cstdio>
>
>int main ( int argc, char ** argv)
>{
> std::remove("testfile");
>}
>
>Will you please test that the above code works?
>
>I beleive that this should work cross platform, because the remove function is part of the ANSI C standard.
>
>Thanks,
>===================================================================
>Hans J. Johnson W294 GH
>hans-johnson@uiowa.edu Dept. of Psychiatry
>http://www.psychiatry.uiowa.edu/~hjohnson The University of Iowa
>(319) 353-8587 Iowa City, IA 52242
>===================================================================
>
>_______________________________________________
>Insight-developers mailing list
>Insight-developers@public.kitware.com
>http://public.kitware.com/mailman/listinfo/insight-developers