[pypy-svn] r79629 - in pypy/trunk: . ctypes_configure lib_pypy pypy pypy/jit/backend pypy/jit/metainterp/optimizeopt pypy/module/array/benchmark pypy/module/array/test pypy/module/fcntl/test pypy/module/imp pypy/rlib pypy/rlib/test pypy/rpython/lltypesystem pypy/rpython/module pypy/rpython/tool pypy/translator/platform pypy/translator/tool

antocuni at codespeak.net antocuni at codespeak.net
Mon Nov 29 12:16:06 CET 2010


Author: antocuni
Date: Mon Nov 29 12:16:04 2010
New Revision: 79629

Modified:
   pypy/trunk/   (props changed)
   pypy/trunk/ctypes_configure/configure.py
   pypy/trunk/lib_pypy/ctypes_support.py
   pypy/trunk/pypy/   (props changed)
   pypy/trunk/pypy/jit/backend/detect_cpu.py
   pypy/trunk/pypy/jit/metainterp/optimizeopt/optimizer.py   (props changed)
   pypy/trunk/pypy/module/array/benchmark/Makefile   (props changed)
   pypy/trunk/pypy/module/array/benchmark/intimg.c   (props changed)
   pypy/trunk/pypy/module/array/benchmark/intimgtst.c   (props changed)
   pypy/trunk/pypy/module/array/benchmark/intimgtst.py   (props changed)
   pypy/trunk/pypy/module/array/benchmark/loop.c   (props changed)
   pypy/trunk/pypy/module/array/benchmark/sum.c   (props changed)
   pypy/trunk/pypy/module/array/benchmark/sumtst.c   (props changed)
   pypy/trunk/pypy/module/array/benchmark/sumtst.py   (props changed)
   pypy/trunk/pypy/module/array/test/test_array_old.py   (props changed)
   pypy/trunk/pypy/module/fcntl/test/test_fcntl.py
   pypy/trunk/pypy/module/imp/importing.py
   pypy/trunk/pypy/rlib/rdynload.py
   pypy/trunk/pypy/rlib/rerased.py   (props changed)
   pypy/trunk/pypy/rlib/test/test_rerased.py   (props changed)
   pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py
   pypy/trunk/pypy/rpython/module/ll_time.py
   pypy/trunk/pypy/rpython/tool/rffi_platform.py
   pypy/trunk/pypy/translator/platform/__init__.py
   pypy/trunk/pypy/translator/tool/cbuild.py
Log:
issue551 solved

merge the freebsd-compat branch, which contains DragonSA's patch to make pypy working on freebsd 8 and 9



Modified: pypy/trunk/ctypes_configure/configure.py
==============================================================================
--- pypy/trunk/ctypes_configure/configure.py	(original)
+++ pypy/trunk/ctypes_configure/configure.py	Mon Nov 29 12:16:04 2010
@@ -559,6 +559,7 @@
 C_HEADER = """
 #include <stdio.h>
 #include <stddef.h>   /* for offsetof() */
+#include <stdint.h>   /* FreeBSD: for uint64_t */
 
 void dump(char* key, int value) {
     printf("%s: %d\\n", key, value);

Modified: pypy/trunk/lib_pypy/ctypes_support.py
==============================================================================
--- pypy/trunk/lib_pypy/ctypes_support.py	(original)
+++ pypy/trunk/lib_pypy/ctypes_support.py	Mon Nov 29 12:16:04 2010
@@ -25,7 +25,7 @@
     def _where_is_errno():
         return standard_c_lib.__errno_location()
 
-elif sys.platform == 'darwin':
+elif sys.platform in ('darwin', 'freebsd7', 'freebsd8', 'freebsd9'):
     standard_c_lib.__error.restype = ctypes.POINTER(ctypes.c_int)
     def _where_is_errno():
         return standard_c_lib.__error()

Modified: pypy/trunk/pypy/jit/backend/detect_cpu.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/detect_cpu.py	(original)
+++ pypy/trunk/pypy/jit/backend/detect_cpu.py	Mon Nov 29 12:16:04 2010
@@ -31,7 +31,8 @@
                 'i86pc': 'x86',    # Solaris/Intel
                 'x86':   'x86',    # Apple
                 'Power Macintosh': 'ppc',
-                'x86_64': 'x86', 
+                'x86_64': 'x86',
+                'amd64': 'x86'     # freebsd
                 }[mach]
     except KeyError:
         return mach

Modified: pypy/trunk/pypy/module/fcntl/test/test_fcntl.py
==============================================================================
--- pypy/trunk/pypy/module/fcntl/test/test_fcntl.py	(original)
+++ pypy/trunk/pypy/module/fcntl/test/test_fcntl.py	Mon Nov 29 12:16:04 2010
@@ -63,7 +63,7 @@
         if sys.platform in ('netbsd1', 'netbsd2', 'netbsd3', 
                             'Darwin1.2', 'darwin',
                             'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5',
-                            'freebsd6', 'freebsd7', 
+                            'freebsd6', 'freebsd7', 'freebsd8', 'freebsd9',
                             'bsdos2', 'bsdos3', 'bsdos4',
                             'openbsd', 'openbsd2', 'openbsd3'):
             if struct.calcsize('l') == 8:
@@ -159,7 +159,7 @@
 
         if "linux" in sys.platform:
             TIOCGPGRP = 0x540f
-        elif "darwin" in sys.platform or "freebsd6" == sys.platform:
+        elif "darwin" in sys.platform or "freebsd" in sys.platform:
             TIOCGPGRP = 0x40047477
         else:
             skip("don't know how to test ioctl() on this platform")

Modified: pypy/trunk/pypy/module/imp/importing.py
==============================================================================
--- pypy/trunk/pypy/module/imp/importing.py	(original)
+++ pypy/trunk/pypy/module/imp/importing.py	Mon Nov 29 12:16:04 2010
@@ -76,7 +76,7 @@
 
     return SEARCH_ERROR, None, None
 
-if sys.platform in ['linux2', 'freebsd']:
+if sys.platform == 'linux2' or 'freebsd' in sys.platform:
     def case_ok(filename):
         return True
 else:

Modified: pypy/trunk/pypy/rlib/rdynload.py
==============================================================================
--- pypy/trunk/pypy/rlib/rdynload.py	(original)
+++ pypy/trunk/pypy/rlib/rdynload.py	Mon Nov 29 12:16:04 2010
@@ -14,7 +14,7 @@
 _MINGW = platform.name == "mingw32"
 _WIN32 = _MSVC or _MINGW
 _MAC_OS = platform.name == "darwin"
-_FREEBSD_7 = platform.name == "freebsd7"
+_FREEBSD = platform.name == "freebsd"
 
 if _WIN32:
     from pypy.rlib import rwin32
@@ -27,7 +27,7 @@
 else: 
     pre_include_bits = []
 
-if _FREEBSD_7 or _WIN32:
+if _FREEBSD or _WIN32:
     libraries = []
 else:
     libraries = ['dl']

Modified: pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py
==============================================================================
--- pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py	(original)
+++ pypy/trunk/pypy/rpython/lltypesystem/ll2ctypes.py	Mon Nov 29 12:16:04 2010
@@ -1294,7 +1294,7 @@
             def _where_is_errno():
                 return standard_c_lib.__errno_location()
 
-        elif sys.platform in ('darwin', 'freebsd7'):
+        elif sys.platform in ('darwin', 'freebsd7', 'freebsd8', 'freebsd9'):
             standard_c_lib.__error.restype = ctypes.POINTER(ctypes.c_int)
             def _where_is_errno():
                 return standard_c_lib.__error()

Modified: pypy/trunk/pypy/rpython/module/ll_time.py
==============================================================================
--- pypy/trunk/pypy/rpython/module/ll_time.py	(original)
+++ pypy/trunk/pypy/rpython/module/ll_time.py	Mon Nov 29 12:16:04 2010
@@ -41,7 +41,7 @@
         RUSAGE = platform.Struct('struct rusage', [('ru_utime', TIMEVAL),
                                                    ('ru_stime', TIMEVAL)])
 
-if sys.platform == 'freebsd7':
+if "freebsd" in sys.platform:
     libraries = ['compat']
 else:
     libraries = []

Modified: pypy/trunk/pypy/rpython/tool/rffi_platform.py
==============================================================================
--- pypy/trunk/pypy/rpython/tool/rffi_platform.py	(original)
+++ pypy/trunk/pypy/rpython/tool/rffi_platform.py	Mon Nov 29 12:16:04 2010
@@ -639,6 +639,7 @@
 C_HEADER = """
 #include <stdio.h>
 #include <stddef.h>   /* for offsetof() */
+#include <stdint.h>   /* FreeBSD: for uint64_t */
 
 void dump(char* key, int value) {
     printf("%s: %d\\n", key, value);

Modified: pypy/trunk/pypy/translator/platform/__init__.py
==============================================================================
--- pypy/trunk/pypy/translator/platform/__init__.py	(original)
+++ pypy/trunk/pypy/translator/platform/__init__.py	Mon Nov 29 12:16:04 2010
@@ -217,13 +217,13 @@
         host_factory = Darwin_i386
     else:
         host_factory = Darwin_x86_64
-elif sys.platform == 'freebsd7':
-    from pypy.translator.platform.freebsd7 import Freebsd7, Freebsd7_64
+elif "freebsd" in sys.platform:
+    from pypy.translator.platform.freebsd import Freebsd, Freebsd_64
     import platform
     if platform.architecture()[0] == '32bit':
-        host_factory = Freebsd7
+        host_factory = Freebsd
     else:
-        host_factory = Freebsd7_64
+        host_factory = Freebsd_64
 elif os.name == 'nt':
     from pypy.translator.platform.windows import Windows
     host_factory = Windows

Modified: pypy/trunk/pypy/translator/tool/cbuild.py
==============================================================================
--- pypy/trunk/pypy/translator/tool/cbuild.py	(original)
+++ pypy/trunk/pypy/translator/tool/cbuild.py	Mon Nov 29 12:16:04 2010
@@ -309,6 +309,7 @@
 #define _POSIX_C_SOURCE 200112L
 /* Define on FreeBSD to activate all library features */
 #define __BSD_VISIBLE 1
+#define __XSI_VISIBLE 700
 /* Windows: winsock/winsock2 mess */
 #define WIN32_LEAN_AND_MEAN
 '''



More information about the Pypy-commit mailing list