summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorheracles <heracles@localhost>2007-09-29 20:19:39 +0000
committerheracles <heracles@localhost>2007-09-29 20:19:39 +0000
commitfd2964a12dc2d02c2787a7d9c54a77c5c8748fd1 (patch)
tree1122534be534d48d788dcd6f9b6b5a2df55c45d1 /dev-db/postgresql/files/postgresql-8.2.5-sh.patch
parenttesting dev-db/libpq-*: minor bumps (diff)
downloadtesting-fd2964a12dc2d02c2787a7d9c54a77c5c8748fd1.tar.gz
testing-fd2964a12dc2d02c2787a7d9c54a77c5c8748fd1.tar.bz2
testing-fd2964a12dc2d02c2787a7d9c54a77c5c8748fd1.zip
testing dev-db/postgresql-*: minor bumpsHEADmaster
svn path=/testing/; revision=289
Diffstat (limited to 'dev-db/postgresql/files/postgresql-8.2.5-sh.patch')
-rw-r--r--dev-db/postgresql/files/postgresql-8.2.5-sh.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/dev-db/postgresql/files/postgresql-8.2.5-sh.patch b/dev-db/postgresql/files/postgresql-8.2.5-sh.patch
new file mode 100644
index 0000000..295bb6c
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-8.2.5-sh.patch
@@ -0,0 +1,34 @@
+--- postgresql-8.2.3.orig/src/include/storage/s_lock.h 2006-06-08 00:24:45.000000000 +0200
++++ postgresql-8.2.3/src/include/storage/s_lock.h 2007-03-29 12:25:56.000000000 +0200
+@@ -299,6 +299,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__) /* Sparc */
+ #define HAS_TEST_AND_SET
+