Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcb0032c

Browse files
committed
Update for QNX from Kardos, Dr. Andrea
1 parentf7f41c7 commitcb0032c

File tree

3 files changed

+162
-2
lines changed

3 files changed

+162
-2
lines changed

‎doc/README.qnx4

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
PostgresSQL on QNX 4
2+
--------------------
3+
4+
PosgresSQL 6.5.2 could be ported to QNX 4.25.
5+
6+
This port is an important step because PostgreSQL is now the only free
7+
relational database with full SQL and ODBC support available for QNX 4.
8+
The only commercial databases available are Empress RDBMS and Velocis
9+
Database Server (not supported for Digital Unix).
10+
11+
The most expensive topics where the emulation of System V semaphore sets,
12+
shared memory and IPC and of some IEEE floating-point functionality. For
13+
the Watcom compiler spinlocks have been implemented using POSIX semaphores.
14+
A lot of make files had to be changed because $(LD) doesn't support the
15+
-r option on QNX 4.
16+
17+
It is recomended to use the GNU C compiler instead of the Watcom compiler
18+
because the Watcom compiler doesn't support a int8 datatype (long or
19+
long long int) and it does not have a C++ frontend.
20+
It could be managed to build postgres using the Watcom compiler but it crashes
21+
quite early. These problems probably could be solved. The only advantage would
22+
be support of Tk and pgaccess. For the Watcom compiler some more modifications
23+
have to be made which are not described here.
24+
25+
QNX 4 does not offer native support of shared libraries. Therefore the related
26+
functionality cannot be used. Shared library support could probably be
27+
implemented.
28+
29+
QNX 4 does not support UNIX domain sockets. Connections can only be made
30+
with TCP/IP sockets. Therefore postmaster must always be started with the
31+
-i option. Furthermore it would be useful to set the PGHOST variable.
32+
33+
Prerequisites:
34+
--------------
35+
36+
The following prerequisites have been used:
37+
38+
QNX 4.25
39+
GNU make
40+
flex-2.5.4a.tar.gz (flex)
41+
egcs111-qnx4-r20.tar[.gz] (GNU C)
42+
perl 5.004_04
43+
tcl8.0.3.tar.Z (Tcl)
44+
45+
flex can be built without any problems using the Watcom or GNU C compilers.
46+
47+
GNU C can be installed by
48+
/etc/install -u egcs111-qnx4-r20.tar[.gz]
49+
50+
Although Tcl can be built after some slight code changes using the Watcom
51+
compiler, the GNU C compiler should be used instead. Otherwise it would be
52+
impossible to link postgres built with GNU C together with libtcl8.0.a built
53+
with the Watcom compiler.
54+
To make unix/tclUnixTest.c compilable uncomment
55+
#include <sys/resource.h>
56+
in it or
57+
touch /usr/include/sys/resource.h
58+
In unix/Makefile.in replace
59+
( echo cd $(TOP_DIR)/tests\; source all ) | ./tcltest
60+
by
61+
( echo cd ../tests\; source all ) | ./tcltest
62+
After that Tcl can be built and tested as stated in README.
63+
64+
Tk cannot be built with GNU C due to the lack of a stack version of the
65+
X11 library. With the Watcom compiler Tk could be built but this is not useful
66+
because of the link problems mentioned above.
67+
68+
Therefore the Tk interface and the pgaccess tool cannot be supported for a GNU C
69+
version of PostgreSQL on QNX 4.
70+
71+
PostgreSQL:
72+
-----------
73+
74+
On QNX 4 some headers are not in the directories expected. To avoid
75+
modifications of the code the following links should be made:
76+
77+
ln -s /usr/local/bin/perl /usr/local/bin/perl5
78+
ln -s /usr/include/errno.h /usr/include/sys/errno.h
79+
ln -s /usr/include/ioctl.h /usr/include/sys/ioctl.h
80+
81+
The sources can be unpacked by
82+
cd /usr/src
83+
gunzip -c postgresql-6.5.2.tar.gz | tar xvf -
84+
mv postgresql-6.5.2 pgsql
85+
gunzip -c postgresql-6.5.2-qnx4-gcc-patch.tar.gz | tar xvf -
86+
87+
Furthermore the header files ipc.h, sem.h and shm.h must be installed.
88+
They are not available on QNX 4. stl_alloc.h must be modified
89+
(extern "C++" { ... }).
90+
su
91+
cd /usr
92+
gunzip -c qnx4-gcc-header-patch.tar.gz | tar xvf -
93+
exit
94+
Possibly the file
95+
/usr/local/lib/gcc-lib/i386-pc-qnx4/egcs-2.91.60/include/g++/stl_alloc.h
96+
must be copied to the right path in your environment.
97+
If this ist the case the path has to be adopted in src/Makefile.custom too
98+
(CXXFLAGS).
99+
100+
If all prerequisites are available postgres can be built and installed by
101+
cd pgsql/src
102+
./configure --with-tcl --with-perl --with-x
103+
gmake all > make.log 2>&1
104+
gmake install > make.install.log 2>&1
105+
su
106+
cd interfaces/perl5
107+
gmake install
108+
exit
109+
110+
All other steps can be carried out as stated in the INSTALL file.
111+
112+
Regression tests:
113+
-----------------
114+
115+
The majority of regression tests succeeded. The following tests failed:
116+
117+
int2, int4:
118+
Error message "Result too large" instead of "Numerical result out of range".
119+
Can be ignored.
120+
121+
int8, float4:
122+
Exponent expression "e+nnn" instead of "e+nn". Can be ignored.
123+
124+
float8:
125+
Exponent expression "e+nnn" instead of "e+nn" and some slight deviation
126+
in the last digit.
127+
Can be ignored.
128+
129+
geometry:
130+
Some slight deviation in the last digit and "0" instead of "-0".
131+
Can be ignored.
132+
133+
datetime, abstime, tinterval, horology:
134+
Differences for years outside the normal Unix range, e.g. 1968
135+
instead of 2105
136+
Can be ignored.
137+
138+
create_function_2, triggers, misc, plpgsql:
139+
Error messages due to the lack of shared library support.
140+
141+
rules:
142+
Subject of further investigation.
143+
144+
numeric, numeric_big:
145+
ERROR: Cannot create unique index. Table contains non-unique values
146+
Subject of further investigation.
147+
148+
The reached state of this port should be sufficient for lot of applications.
149+
150+
Have fun!
151+
152+
Andreas Kardos
153+
kardos@repas-aeg.de
154+
1999-12-09

‎src/backend/utils/adt/arrayfuncs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.49 1999/11/22 17:56:29 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.50 1999/12/09 15:56:16 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1832,7 +1832,9 @@ _LOtransfer(char **destfd,
18321832
intisDestLO)
18331833
{
18341834
#defineMAX_READ (512 * 1024)
1835+
#if !defined(min)
18351836
#definemin(a,b) (a < b ? a : b)
1837+
#endif
18361838
structvarlena*v=NULL;
18371839
inttmp,
18381840
inc,

‎src/backend/utils/adt/chunk.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.23 1999/07/17 20:17:54 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/chunk.c,v 1.24 1999/12/09 15:56:16 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -28,8 +28,12 @@
2828
#defineMANY 10000
2929
#defineMAXPAT 20
3030
#definequot_ceil(x,y)(((x)+(y)-1)/(y))
31+
#if !defined(min)
3132
#definemin(x,y)(((x) < (y))? (x) : (y))
33+
#endif
34+
#if !defined(max)
3235
#definemax(x,y)(((x) > (y))? (x) : (y))
36+
#endif
3337

3438
staticCHUNK_INFOcInfo;
3539

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp