From: | Neale(dot)Ferguson(at)softwareAG-usa(dot)com |
---|---|
To: | pgsql-ports(at)postgresql(dot)org |
Subject: | Linux for S/390 Patches |
Date: | 2000-11-17 06:44:24 |
Message-ID: | 200011171352.eAHDqOs42594@mail.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-ports |
I have used the latest snapshot to create the following patches to provide
support for Linux on S/390. As you can see the additions are trivial. The
build went without a hitch. The regression tests went well with only geometry
failing due to a difference in the 13th decimal place; and in inet for reasons
I haven't explored fully.
Diffs:
======
--- ./src/include/port/linux.h 2000/11/16 21:48:46 1.1
+++ ./src/include/port/linux.h 2000/11/16 21:50:32
@@ -31,6 +31,11 @@
#elif defined(__ia64__)
typedef unsigned int slock_t;
#define HAS_TEST_AND_SET
+#elif defined(__s390__)
+typedef unsigned int slock_t;
+
+#define HAS_TEST_AND_SET
+
#endif
--- ./src/include/storage/s_lock.h 2000/11/16 21:50:55 1.1
+++ ./src/include/storage/s_lock.h 2000/11/16 21:53:20
@@ -126,10 +126,33 @@
return (int) _res;
}
#endif /* __arm__ */
+#if defined(__s390__)
+/*
+ * S/390 Linux
+ */
+#define TAS(lock) tas(lock)
+
+static inline int
+tas(volatile slock_t *lock)
+{
+ int _res;
+
+ __asm__ __volatile(" la 1,1\n"
+ " l 2,%2\n"
+ " slr 0,0\n"
+ " cs 0,1,0(2)\n"
+ " lr %1,0"
+ : "=m" (lock), "=d" (_res)
+ : "m" (lock)
+ : "0", "1", "2");
+
+ return (_res);
+}
+#endif /* __s390__ */
#if defined(__sparc__)
#define TAS(lock) tas(lock)
regress.out
===========
boolean .. ok
char .. ok
name .. ok
varchar .. ok
text .. ok
int2 .. ok
int4 .. ok
int8 .. ok
oid .. ok
float4 .. ok
float8 .. ok
numeric .. ok
strings .. ok
numerology .. ok
point .. ok
lseg .. ok
box .. ok
path .. ok
polygon .. ok
circle .. ok
date .. ok
time .. ok
timestamp .. ok
interval .. ok
abstime .. ok
reltime .. ok
tinterval .. ok
inet .. failed
comments .. ok
oidjoins .. ok
type_sanity .. ok
opr_sanity .. ok
geometry .. failed
horology .. ok
create_function_1 .. ok
create_type .. ok
create_table .. ok
create_function_2 .. ok
copy .. ok
constraints .. ok
triggers .. ok
create_misc .. ok
create_aggregate .. ok
create_operator .. ok
create_index .. ok
inherit .. ok
create_view .. ok
sanity_check .. ok
errors .. ok
select .. ok
select_into .. ok
select_distinct .. ok
select_distinct_on .. ok
select_implicit .. ok
select_having .. ok
subselect .. ok
union .. ok
case .. ok
join .. ok
aggregates .. ok
transactions .. ok
random .. ok
portals .. ok
arrays .. ok
btree_index .. ok
hash_index .. ok
misc .. ok
select_views .. ok
alter_table .. ok
portals_p2 .. ok
rules .. ok
foreign_key .. ok
limit .. ok
plpgsql .. ok
temp .. ok
regression.diffs
================
*** 54,63 ****
ten | cidr | broadcast | inet | broadcast
-----+--------------+------------------+------------------+------------------
| 192.168.1/24 | 192.168.1.255/24 | 192.168.1.226/24 | 192.168.1.255/24
! | 192.168.1/24 | 192.168.1.255/24 | 192.168.1.226 | 255.255.255.255
| 10/8 | 10.255.255.255/8 | 10.1.2.3/8 | 10.255.255.255/8
! | 10.0.0.0/32 | 255.255.255.255 | 10.1.2.3/8 | 10.255.255.255/8
! | 10.1.2.3/32 | 255.255.255.255 | 10.1.2.3 | 255.255.255.255
| 10.1.2/24 | 10.1.2.255/24 | 10.1.2.3/24 | 10.1.2.255/24
| 10.1/16 | 10.1.255.255/16 | 10.1.2.3/16 | 10.1.255.255/16
| 10/8 | 10.255.255.255/8 | 10.1.2.3/8 | 10.255.255.255/8
--- 54,63 ----
ten | cidr | broadcast | inet | broadcast
-----+--------------+------------------+------------------+------------------
| 192.168.1/24 | 192.168.1.255/24 | 192.168.1.226/24 | 192.168.1.255/24
! | 192.168.1/24 | 192.168.1.255/24 | 192.168.1.226 | 192.168.1.226
| 10/8 | 10.255.255.255/8 | 10.1.2.3/8 | 10.255.255.255/8
! | 10.0.0.0/32 | 10.0.0.0 | 10.1.2.3/8 | 10.255.255.255/8
! | 10.1.2.3/32 | 10.1.2.3 | 10.1.2.3 | 10.1.2.3
| 10.1.2/24 | 10.1.2.255/24 | 10.1.2.3/24 | 10.1.2.255/24
| 10.1/16 | 10.1.255.255/16 | 10.1.2.3/16 | 10.1.255.255/16
| 10/8 | 10.255.255.255/8 | 10.1.2.3/8 | 10.255.255.255/8
From | Date | Subject | |
---|---|---|---|
Next Message | rugang | 2000-11-17 08:22:36 | PostgreSql's making error in Windows NT4.0 Server |
Previous Message | Thomas Lockhart | 2000-11-17 04:31:45 | Re: [PORTS] Updated RPMset available (7.0.3-2) |