6f77cce928
enables FTS3, SOUNDEX and RTREE options, remove the now non-relevant 'thread override lock' thing. Simplify Makefile a bit. Tested by sthen@ on arm, jasper@ on mips64el, sebastia@ on the vax (yay!) and myself on sparc64/ppc/amd64. ok sebastia@ jasper@ espie@
33 lines
1.2 KiB
Plaintext
33 lines
1.2 KiB
Plaintext
$OpenBSD: patch-src_pthread_stub_c,v 1.2 2011/01/09 19:11:34 landry Exp $
|
|
--- src/pthread_stub.c.orig Tue Nov 23 23:07:52 2010
|
|
+++ src/pthread_stub.c Tue Nov 23 23:08:24 2010
|
|
@@ -0,0 +1,28 @@
|
|
+/* stubs for pthreads function, quick and dirty */
|
|
+#if SQLITE_THREADSAFE && !defined(SQLITE_TEST)
|
|
+
|
|
+#include <pthread.h>
|
|
+
|
|
+#define WEAKALIAS(f,g ) extern f __attribute__((__weak__, __alias__(#g)))
|
|
+
|
|
+static pthread_t _sqlite_self_stub()
|
|
+{
|
|
+ return 0;
|
|
+}
|
|
+
|
|
+static int _sqlite_zero_stub()
|
|
+{
|
|
+ return 0;
|
|
+}
|
|
+
|
|
+WEAKALIAS(pthread_t pthread_self(void), _sqlite_self_stub);
|
|
+WEAKALIAS(int pthread_mutex_init(pthread_mutex_t *a, const pthread_mutexattr_t *b), _sqlite_zero_stub);
|
|
+WEAKALIAS(int pthread_mutex_destroy(pthread_mutex_t *a), _sqlite_zero_stub);
|
|
+WEAKALIAS(int pthread_mutex_lock(pthread_mutex_t *a), _sqlite_zero_stub);
|
|
+WEAKALIAS(int pthread_mutex_trylock(pthread_mutex_t *a), _sqlite_zero_stub);
|
|
+WEAKALIAS(int pthread_mutex_unlock(pthread_mutex_t *a), _sqlite_zero_stub);
|
|
+WEAKALIAS(int pthread_mutexattr_init(pthread_mutexattr_t *a), _sqlite_zero_stub);
|
|
+WEAKALIAS(int pthread_mutexattr_settype(pthread_mutexattr_t *a, int b), _sqlite_zero_stub);
|
|
+WEAKALIAS(int pthread_mutexattr_destroy(pthread_mutexattr_t *a), _sqlite_zero_stub);
|
|
+
|
|
+#endif
|