summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/postgresql/files/postgresql-8.1.10-sh.patch')
-rw-r--r--dev-db/postgresql/files/postgresql-8.1.10-sh.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/dev-db/postgresql/files/postgresql-8.1.10-sh.patch b/dev-db/postgresql/files/postgresql-8.1.10-sh.patch
new file mode 100644
index 0000000..6350771
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-8.1.10-sh.patch
@@ -0,0 +1,34 @@
+--- src/include/storage/s_lock.h 2005-01-01 07:03:42.000000000 +0900
++++ src/include/storage/s_lock.h 2005-08-17 23:09:19.000000000 +0900
+@@ -300,6 +300,31 @@
+ #endif /* __s390__ || __s390x__ */
+
+
++#if defined(__sh__)
++#define HAS_TEST_AND_SET
++
++typedef unsigned char slock_t;
++
++#define TAS(lock) tas(lock)
++
++static __inline__ int
++tas(volatile slock_t *lock)
++{
++ register int _res = 1;
++
++ __asm__ __volatile__(
++ "tas.b @%1\n\t"
++ "movt %0\n\t"
++ "xor #1,%0"
++: "=z"(_res)
++: "r"(lock)
++: "t","memory");
++ return _res;
++}
++
++#endif /* __sh__ */
++
++
+ #if defined(__sparc__)
+ #define HAS_TEST_AND_SET
+