From cvs-return-6123-apmail-apr-cvs-archive=apr.apache.org@apr.apache.org Fri Sep 24 23:15:42 2004 Return-Path: Delivered-To: apmail-apr-cvs-archive@www.apache.org Received: (qmail 18384 invoked from network); 24 Sep 2004 23:15:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 24 Sep 2004 23:15:42 -0000 Received: (qmail 18910 invoked by uid 500); 24 Sep 2004 23:17:52 -0000 Delivered-To: apmail-apr-cvs-archive@apr.apache.org Received: (qmail 18863 invoked by uid 500); 24 Sep 2004 23:17:51 -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 18849 invoked by uid 99); 24 Sep 2004 23:17:50 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Date: 24 Sep 2004 23:15:38 -0000 Message-ID: <20040924231538.18368.qmail@minotaur.apache.org> From: stas@apache.org To: apr-cvs@apache.org Subject: cvs commit: apr CHANGES X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N stas 2004/09/24 16:15:38 Modified: file_io/win32 Tag: APR_0_9_BRANCH filedup.c . Tag: APR_0_9_BRANCH CHANGES Log: fix apr_file_dup and apr_file_dup2 win32 implementations to create a mutex Submitted by: Steve Hay Reviewed by: stas Revision Changes Path No revision No revision 1.54.2.3 +14 -0 apr/file_io/win32/filedup.c Index: filedup.c =================================================================== RCS file: /home/cvs/apr/file_io/win32/filedup.c,v retrieving revision 1.54.2.2 retrieving revision 1.54.2.3 diff -u -u -r1.54.2.2 -r1.54.2.3 --- filedup.c 13 Feb 2004 09:33:44 -0000 1.54.2.2 +++ filedup.c 24 Sep 2004 23:15:38 -0000 1.54.2.3 @@ -44,6 +44,13 @@ (*new_file)->buffered = FALSE; (*new_file)->ungetchar = old_file->ungetchar; +#if APR_HAS_THREADS + if (old_file->mutex) { + apr_thread_mutex_create(&((*new_file)->mutex), + APR_THREAD_MUTEX_DEFAULT, p); + } +#endif + apr_pool_cleanup_register((*new_file)->pool, (void *)(*new_file), file_cleanup, apr_pool_cleanup_null); @@ -113,6 +120,13 @@ new_file->append = old_file->append; new_file->buffered = FALSE; new_file->ungetchar = old_file->ungetchar; + +#if APR_HAS_THREADS + if (old_file->mutex) { + apr_thread_mutex_create(&(new_file->mutex), + APR_THREAD_MUTEX_DEFAULT, p); + } +#endif return APR_SUCCESS; #endif /* !defined(_WIN32_WCE) */ No revision No revision 1.426.2.34 +3 -0 apr/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/apr/CHANGES,v retrieving revision 1.426.2.33 retrieving revision 1.426.2.34 diff -u -u -r1.426.2.33 -r1.426.2.34 --- CHANGES 23 Sep 2004 06:28:24 -0000 1.426.2.33 +++ CHANGES 24 Sep 2004 23:15:38 -0000 1.426.2.34 @@ -1,5 +1,8 @@ Changes with APR 0.9.5 + *) fix apr_file_dup and apr_file_dup2 win32 implementations + to create a mutex [Steve Hay ] + *) Makes the threads to behave like on posix. If the thread is created without APR_DETACH expect that the thread_join will be called, so don't close the handle in advance, if the thread has already finished.