Permission is granted to use, modify, and / or redistribute at will.
*/
+#include <stdio.h>
+
#ifndef REGTEST
-#include <unistd.h>
#include <_PDCLIB_glue.h>
+#include <errno.h>
int _PDCLIB_rename( const char * old, const char * new )
{
- /* Note that the behaviour if new file exists is implementation-defined.
- There is nothing wrong with either overwriting it or failing the
- operation, but you might want to document whichever you chose.
- This example fails if new file exists.
- */
- if ( link( old, new ) == 0 )
- {
- return unlink( old );
- }
- else
- {
- return -1;
- }
+ errno = ENOTSUP;
}
#endif
#ifdef TEST
-/* TODO: Work around the following undef */
-#undef SEEK_SET
#include <_PDCLIB_test.h>
+#include <stdlib.h>
+
int main( void )
{
- TESTCASE( NO_TESTDRIVER );
return TEST_RESULTS;
}