X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=platform%2Fwin32%2Ffunctions%2F_PDCLIB%2F_PDCLIB_rename.c;h=e068b215ea3caae41280143a9ac173fc681c5212;hp=a65715dfc4f9dd591b43e0dd5e380024cdf92bfb;hb=da0f3f353d417fed71f358a48d5d5394145e460d;hpb=5fd032eae66fba700cb9927840222b068c62361e diff --git a/platform/win32/functions/_PDCLIB/_PDCLIB_rename.c b/platform/win32/functions/_PDCLIB/_PDCLIB_rename.c index a65715d..e068b21 100644 --- a/platform/win32/functions/_PDCLIB/_PDCLIB_rename.c +++ b/platform/win32/functions/_PDCLIB/_PDCLIB_rename.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /* _PDCLIB_rename( const char *, const char * ) This file is part of the Public Domain C Library (PDCLib). @@ -9,18 +7,25 @@ #include #ifndef REGTEST -#include <_PDCLIB_glue.h> +#include "_PDCLIB_glue.h" #include +#include +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 #ifdef TEST -#include <_PDCLIB_test.h> +#include "_PDCLIB_test.h" #include