Commits

Armin Rigo committed 0a232c1 Merge

Merged in oberstet/pypy (pull request #196)

fixes for issues 1637 and 1638

  • Participants
  • Parent commits 72762ff, dc5fc8d

Comments (0)

Files changed (2)

lib_pypy/_sqlite3.py

 if _has_load_extension():
     _ffi.cdef("int sqlite3_enable_load_extension(sqlite3 *db, int onoff);")
 
-_lib = _ffi.verify("""
-#include <sqlite3.h>
-""", libraries=['sqlite3']
-)
+if sys.platform.startswith('freebsd'):
+    _lib = _ffi.verify("""
+    #include <sqlite3.h>
+    """, libraries=['sqlite3']],
+         include_dirs=['/usr/local/include'],
+         library_dirs=['/usr/local/lib']
+    )
+else:
+    _lib = _ffi.verify("""
+    #include <sqlite3.h>
+    """, libraries=['sqlite3']
+    )
 
 exported_sqlite_symbols = [
     'SQLITE_ALTER_TABLE',

pypy/module/test_lib_pypy/cffi_tests/test_verify.py

         #include <malloc.h>
         #define alloca _alloca
         #else
-        #include <alloca.h>
+        # ifdef __FreeBSD__
+        #  include <stdlib.h>
+        # else
+        #  include <alloca.h>
+        # endif
         #endif
         static int (*python_callback)(int how_many, int *values);
         static int c_callback(int how_many, ...) {