From 99f976459a327ebe695ff34dea7797455275ec38 Mon Sep 17 00:00:00 2001 From: gombasg Date: Tue, 20 Jun 2006 12:58:50 +0000 Subject: [PATCH] Use alternate _DC_CopyFile() implementation on Windows git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@721 a7169a2c-3604-0410-bc95-c702d8d87f7a --- dcapi/common/util.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dcapi/common/util.c b/dcapi/common/util.c index ac28ce18f4..a36302e53f 100644 --- a/dcapi/common/util.c +++ b/dcapi/common/util.c @@ -5,11 +5,16 @@ #include #include #include -#include #include #include #include +#ifdef _WIN32 +#include +#else +#include +#endif + #include #include @@ -25,6 +30,14 @@ * Functions */ +#ifdef _WIN32 +int _DC_copyFile(const char *src, const char *dst) +{ + if (CopyFile(src, dst, FALSE)) + return 0; + return DC_ERR_SYSTEM; +} +#else int _DC_copyFile(const char *src, const char *dst) { struct stat s; @@ -95,6 +108,7 @@ error: errno = ret; return DC_ERR_SYSTEM; } +#endif /* _WIN32 */ long long _DC_processSuffix(const char *suffix) {