diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2002-01-11 10:19:03 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2002-01-11 10:19:03 +0000 |
commit | 33da1873fc49c74f1a298086c49a0db4ee02ea5a (patch) | |
tree | 6a087ab21595025b31bdc0f65c35592557dbc96d /file_io | |
parent | 6620efa32e3160356c3b4eb70ac9c293db0528cb (diff) | |
download | libapr-33da1873fc49c74f1a298086c49a0db4ee02ea5a.tar.gz |
Allow apr_file_dup() to behave as before, for a while longer
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62751 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r-- | file_io/win32/filedup.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/file_io/win32/filedup.c b/file_io/win32/filedup.c index be2966e9e..22a728d8f 100644 --- a/file_io/win32/filedup.c +++ b/file_io/win32/filedup.c @@ -64,6 +64,14 @@ APR_DECLARE(apr_status_t) apr_file_dup(apr_file_t **new_file, { HANDLE hproc = GetCurrentProcess(); HANDLE newhand = NULL; + + /* XXX Dirty, ugly backward compatibility hack + * This is the reason that dup2 was introduced, + * need to remove this thunk on short order! + */ + if (*new_file) { + return apr_file_dup2(new_file, old_file, p); + } if (!DuplicateHandle(hproc, old_file->filehand, hproc, &newhand, 0, FALSE, |