From cvs-return-2937-apmail-apr-cvs-archive=apr.apache.org@apr.apache.org Tue Feb 12 01:32:56 2002 Return-Path: Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 57555 invoked by uid 500); 12 Feb 2002 01:32:56 -0000 Mailing-List: contact cvs-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Reply-To: dev@apr.apache.org Delivered-To: mailing list cvs@apr.apache.org Received: (qmail 57544 invoked from network); 12 Feb 2002 01:32:56 -0000 Date: 12 Feb 2002 01:32:55 -0000 Message-ID: <20020212013255.77365.qmail@icarus.apache.org> From: wrowe@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr/file_io/win32 open.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N wrowe 02/02/11 17:32:55 Modified: file_io/win32 open.c Log: stdfoo handles are unsupported on WinCE. Submitted by Mladen Turk . I believe the patch for CE is wrong is one respect, IIRC we should fall over from MoveFile to CopyFile if the file device varied. Confirmation? Revision Changes Path 1.94 +20 -0 apr/file_io/win32/open.c Index: open.c =================================================================== RCS file: /home/cvs/apr/file_io/win32/open.c,v retrieving revision 1.93 retrieving revision 1.94 diff -u -r1.93 -r1.94 --- open.c 12 Feb 2002 00:07:34 -0000 1.93 +++ open.c 12 Feb 2002 01:32:55 -0000 1.94 @@ -59,10 +59,14 @@ #include "apr_strings.h" #include "apr_portable.h" #include "apr_thread_mutex.h" +#if APR_HAVE_ERRNO_H #include +#endif #include #include +#if APR_HAVE_SYS_STAT_H #include +#endif #include "misc.h" #if APR_HAS_UNICODE_FS @@ -466,8 +470,12 @@ / sizeof(apr_wchar_t), topath)) { return rv; } +#ifndef _WIN32_WCE if (MoveFileExW(wfrompath, wtopath, MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED)) +#else + if (MoveFileW(wfrompath, wtopath)) +#endif return APR_SUCCESS; #else if (MoveFileEx(frompath, topath, MOVEFILE_REPLACE_EXISTING | @@ -530,6 +538,9 @@ APR_DECLARE(apr_status_t) apr_file_open_stderr(apr_file_t **thefile, apr_pool_t *cont) { +#ifdef _WIN32_WCE + return APR_ENOTIMPL; +#else apr_os_file_t file_handle; file_handle = GetStdHandle(STD_ERROR_HANDLE); @@ -537,10 +548,14 @@ return APR_EINVAL; return apr_os_file_put(thefile, &file_handle, 0, cont); +#endif } APR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile, apr_pool_t *cont) { +#ifdef _WIN32_WCE + return APR_ENOTIMPL; +#else apr_os_file_t file_handle; file_handle = GetStdHandle(STD_OUTPUT_HANDLE); @@ -548,10 +563,14 @@ return APR_EINVAL; return apr_os_file_put(thefile, &file_handle, 0, cont); +#endif } APR_DECLARE(apr_status_t) apr_file_open_stdin(apr_file_t **thefile, apr_pool_t *cont) { +#ifdef _WIN32_WCE + return APR_ENOTIMPL; +#else apr_os_file_t file_handle; file_handle = GetStdHandle(STD_INPUT_HANDLE); @@ -559,6 +578,7 @@ return APR_EINVAL; return apr_os_file_put(thefile, &file_handle, 0, cont); +#endif } APR_POOL_IMPLEMENT_ACCESSOR_X(file, cntxt);