]> pd.if.org Git - pdclib/blobdiff - platform/win32/functions/_PDCLIB/_PDCLIB_rename.c
Removed SVN keyword tags.
[pdclib] / platform / win32 / functions / _PDCLIB / _PDCLIB_rename.c
index a65715dfc4f9dd591b43e0dd5e380024cdf92bfb..0ea277d4536107284e95482a0cdda57d5841fcb2 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /* _PDCLIB_rename( const char *, const char * )
 
    This file is part of the Public Domain C Library (PDCLib).
 #ifndef REGTEST
 #include <_PDCLIB_glue.h>
 #include <errno.h>
+#include <windows.h>
 
+void _PDCLIB_w32errno( void );
 int _PDCLIB_rename( const char * old, const char * new )
 {
-    errno = ENOTSUP;
+
+    BOOL ok = MoveFile(old, new);
+    if(!ok) {
+        _PDCLIB_w32errno();
+    }
+    return !ok;
 }
 
 #endif