apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1774923 - /apr/apr/trunk/mmap/win32/mmap.c
Date Sun, 18 Dec 2016 18:13:22 GMT
Author: ivan
Date: Sun Dec 18 18:13:22 2016
New Revision: 1774923

URL: http://svn.apache.org/viewvc?rev=1774923&view=rev
Log:
Use CreateFileMappingW on Unicode capable Windows.

* mmap/win32/mmap.c
  (apr_mmap_create): Use CreateFileMappingW() if APR_HAS_UNICODE_FS and   
  IF_WIN_OS_IS_UNICODE.

Modified:
    apr/apr/trunk/mmap/win32/mmap.c

Modified: apr/apr/trunk/mmap/win32/mmap.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/mmap/win32/mmap.c?rev=1774923&r1=1774922&r2=1774923&view=diff
==============================================================================
--- apr/apr/trunk/mmap/win32/mmap.c (original)
+++ apr/apr/trunk/mmap/win32/mmap.c Sun Dec 18 18:13:22 2016
@@ -108,8 +108,20 @@ APR_DECLARE(apr_status_t) apr_mmap_creat
      * of the mapped region!
      */
 
-    (*new)->mhandle = CreateFileMapping(file->filehand, NULL, fmaccess,
-                                        0, 0, NULL);
+#if APR_HAS_UNICODE_FS
+    IF_WIN_OS_IS_UNICODE
+    {
+        (*new)->mhandle = CreateFileMappingW(file->filehand, NULL, fmaccess,
+                                             0, 0, NULL);
+    }
+#endif
+#if APR_HAS_ANSI_FS
+    ELSE_WIN_OS_IS_ANSI
+    {
+        (*new)->mhandle = CreateFileMappingA(file->filehand, NULL, fmaccess,
+                                             0, 0, NULL);
+    }
+#endif
     if (!(*new)->mhandle || (*new)->mhandle == INVALID_HANDLE_VALUE)
     {
         *new = NULL;



Mime
View raw message