[pypy-commit] pypy merge-2.7.2: Fix for the new large file tests in pypy.module.mmap.

arigo noreply at buildbot.pypy.org
Sun Jan 29 23:56:21 CET 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: merge-2.7.2
Changeset: r51962:ff6d67b226da
Date: 2012-01-29 23:56 +0100
http://bitbucket.org/pypy/pypy/changeset/ff6d67b226da/

Log:	Fix for the new large file tests in pypy.module.mmap.

diff --git a/pypy/rlib/rmmap.py b/pypy/rlib/rmmap.py
--- a/pypy/rlib/rmmap.py
+++ b/pypy/rlib/rmmap.py
@@ -97,12 +97,14 @@
 else:
     HAVE_LARGEFILE_SUPPORT = False
 
-def external(name, args, result):
+def external(name, args, result, **kwargs):
     unsafe = rffi.llexternal(name, args, result,
-                             compilation_info=CConfig._compilation_info_)
+                             compilation_info=CConfig._compilation_info_,
+                             **kwargs)
     safe = rffi.llexternal(name, args, result,
                            compilation_info=CConfig._compilation_info_,
-                           sandboxsafe=True, threadsafe=False)
+                           sandboxsafe=True, threadsafe=False,
+                           **kwargs)
     return unsafe, safe
 
 def winexternal(name, args, result, **kwargs):
@@ -118,7 +120,8 @@
 if _POSIX:
     has_mremap = cConfig['has_mremap']
     c_mmap, c_mmap_safe = external('mmap', [PTR, size_t, rffi.INT, rffi.INT,
-                               rffi.INT, off_t], PTR)
+                               rffi.INT, off_t], PTR, macro=True)
+    # 'mmap' on linux32 is a macro that calls 'mmap64'
     _, c_munmap_safe = external('munmap', [PTR, size_t], rffi.INT)
     c_msync, _ = external('msync', [PTR, size_t, rffi.INT], rffi.INT)
     if has_mremap:


More information about the pypy-commit mailing list