提交 4cb1fb6f 编写于 作者: B Bruce Momjian

Update for QNX.

上级 8d49a660
PostgresSQL on QNX 4 PostgresSQL on QNX 4
-------------------- --------------------
PosgresSQL 6.5.2 could be ported to QNX 4.25.
This port is an important step because PostgreSQL is now the only free This port is an important step because PostgreSQL is now the only free
relational database with full SQL and ODBC support available for QNX 4. relational database with full SQL and ODBC support available for QNX 4.
The only commercial databases available are Empress RDBMS and Velocis The only commercial databases available are Empress RDBMS and Velocis
Database Server (not supported for Digital Unix). Database Server (not supported for Digital Unix).
The most expensive topics where the emulation of System V semaphore sets, The most effort required the emulation of System V semaphore sets,
shared memory and IPC and of some IEEE floating-point functionality. For shared memory and IPC and of some IEEE floating-point functionality. For
the Watcom compiler spinlocks have been implemented using POSIX semaphores. the Watcom compiler spinlocks have been implemented using POSIX semaphores.
A lot of make files had to be changed because $(LD) doesn't support the
-r option on QNX 4.
It is recomended to use the GNU C compiler instead of the Watcom compiler It is recomended to use the GNU C compiler instead of the Watcom compiler
because the Watcom compiler doesn't support a int8 datatype (long or because the Watcom compiler doesn't support a int8 datatype (long or
...@@ -24,7 +20,7 @@ have to be made which are not described here. ...@@ -24,7 +20,7 @@ have to be made which are not described here.
QNX 4 does not offer native support of shared libraries. Therefore the related QNX 4 does not offer native support of shared libraries. Therefore the related
functionality cannot be used. Shared library support could probably be functionality cannot be used. Shared library support could probably be
implemented. implemented in future.
QNX 4 does not support UNIX domain sockets. Connections can only be made QNX 4 does not support UNIX domain sockets. Connections can only be made
with TCP/IP sockets. Therefore postmaster must always be started with the with TCP/IP sockets. Therefore postmaster must always be started with the
...@@ -36,6 +32,7 @@ Prerequisites: ...@@ -36,6 +32,7 @@ Prerequisites:
The following prerequisites have been used: The following prerequisites have been used:
QNX 4.25 QNX 4.25
Watcom C 10.6
GNU make GNU make
flex-2.5.4a.tar.gz (flex) flex-2.5.4a.tar.gz (flex)
egcs111-qnx4-r20.tar[.gz] (GNU C) egcs111-qnx4-r20.tar[.gz] (GNU C)
...@@ -77,25 +74,17 @@ modifications of the code the following links should be made: ...@@ -77,25 +74,17 @@ modifications of the code the following links should be made:
ln -s /usr/local/bin/perl /usr/local/bin/perl5 ln -s /usr/local/bin/perl /usr/local/bin/perl5
ln -s /usr/include/errno.h /usr/include/sys/errno.h ln -s /usr/include/errno.h /usr/include/sys/errno.h
ln -s /usr/include/ioctl.h /usr/include/sys/ioctl.h ln -s /usr/include/ioctl.h /usr/include/sys/ioctl.h
ln -s /usr/src/pgsql/src/backend/port/qnx4/ipc.h /usr/include/sys/ipc.h
ln -s /usr/src/pgsql/src/backend/port/qnx4/sem.h /usr/include/sys/sem.h
ln -s /usr/src/pgsql/src/backend/port/qnx4/shm.h /usr/include/sys/shm.h
The sources can be unpacked by For ecgs-2.91.60 the file
cd /usr/src
gunzip -c postgresql-6.5.2.tar.gz | tar xvf -
mv postgresql-6.5.2 pgsql
gunzip -c postgresql-6.5.2-qnx4-gcc-patch.tar.gz | tar xvf -
Furthermore the header files ipc.h, sem.h and shm.h must be installed.
They are not available on QNX 4. stl_alloc.h must be modified
(extern "C++" { ... }).
su
cd /usr
gunzip -c qnx4-gcc-header-patch.tar.gz | tar xvf -
exit
Possibly the file
/usr/local/lib/gcc-lib/i386-pc-qnx4/egcs-2.91.60/include/g++/stl_alloc.h /usr/local/lib/gcc-lib/i386-pc-qnx4/egcs-2.91.60/include/g++/stl_alloc.h
must be copied to the right path in your environment. had to be patched (extern "C++" { ... } // extern "C++").
If this ist the case the path has to be adopted in src/Makefile.custom too See attached patch.
(CXXFLAGS).
If you use another ecpg version the include/g++ path in Makefile.qnx4
(CXXFLAGS) has to be adopted.
If all prerequisites are available postgres can be built and installed by If all prerequisites are available postgres can be built and installed by
cd pgsql/src cd pgsql/src
...@@ -109,6 +98,23 @@ exit ...@@ -109,6 +98,23 @@ exit
All other steps can be carried out as stated in the INSTALL file. All other steps can be carried out as stated in the INSTALL file.
Make problems:
--------------
Sometimes the Watcom library manager wlib crashes with SIGSEGV on some
object files. This is a general problem and not PostgreSQL related.
Currently bootstrap.o causes such a crash. The workaround is not to include
the object file into the SUBSYS.o but link it directly. For further information
see backend/Makefile and backend/bootstrap/Makefile.
libpgsql.a currently cannot be generated because of the same problem. But this
doesn't matter since shared libraries are not supported.
Currently yacc fails on interfaces/ecpg/preproc/preproc.y because of
exceeded maximum table size. You can generate the preproc.h and preproc.c
files on another platform and use them. This is only a problem when you use
the current source tree since preproc.h and preporc.c are included in official
distributions.
Regression tests: Regression tests:
----------------- -----------------
...@@ -122,7 +128,7 @@ int8, float4: ...@@ -122,7 +128,7 @@ int8, float4:
Exponent expression "e+nnn" instead of "e+nn". Can be ignored. Exponent expression "e+nnn" instead of "e+nn". Can be ignored.
float8: float8:
Exponent expression "e+nnn" instead of "e+nn" and some slight deviation Exponent expression "e+nnn" instead of "e+nn" and some slight difference
in the last digit. in the last digit.
Can be ignored. Can be ignored.
...@@ -143,7 +149,8 @@ Subject of further investigation. ...@@ -143,7 +149,8 @@ Subject of further investigation.
numeric, numeric_big: numeric, numeric_big:
ERROR: Cannot create unique index. Table contains non-unique values ERROR: Cannot create unique index. Table contains non-unique values
Subject of further investigation. Subject of further investigation. Probably because of the missing indices
these tests take a long time.
The reached state of this port should be sufficient for lot of applications. The reached state of this port should be sufficient for lot of applications.
...@@ -151,4 +158,31 @@ Have fun! ...@@ -151,4 +158,31 @@ Have fun!
Andreas Kardos Andreas Kardos
kardos@repas-aeg.de kardos@repas-aeg.de
1999-12-09 1999-12-16
---------------------------------------------------------------------------
*** ./stl_alloc.h.orig Sat Feb 28 05:17:28 1998
--- ./stl_alloc.h Tue Nov 23 04:14:09 1999
***************
*** 120,125 ****
--- 120,126 ----
#pragma set woff 1174
#endif
+ extern "C++" {
// Malloc-based allocator. Typically slower than default alloc below.
// Typically thread-safe and more storage efficient.
#ifdef __STL_STATIC_TEMPLATE_MEMBER_BUG
***************
*** 682,687 ****
--- 683,689 ----
# endif
#endif /* ! __USE_MALLOC */
+ } // extern "C++"
#if defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
#pragma reset woff 1174
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for the bootstrap module # Makefile for the bootstrap module
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.18 1999/12/16 01:25:01 momjian Exp $ # $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.19 1999/12/16 16:52:46 momjian Exp $
# #
# #
# We must build bootparse.c and bootscanner.c with yacc and lex and sed, # We must build bootparse.c and bootscanner.c with yacc and lex and sed,
...@@ -32,17 +32,20 @@ endif ...@@ -32,17 +32,20 @@ endif
BOOTYACCS= bootstrap_tokens.h bootparse.c BOOTYACCS= bootstrap_tokens.h bootparse.c
ifneq ($(PORTNAME), qnx4)
OBJS= bootparse.o bootscanner.o bootstrap.o OBJS= bootparse.o bootscanner.o bootstrap.o
else ifeq ($(PORTNAME), qnx4)
# wlink crashes with bootstrap.o # wlink currently crashes with bootstrap.o
OBJS= bootparse.o bootscanner.o OBJS1= bootparse.o bootscanner.o
endif endif
all: SUBSYS.o all: SUBSYS.o
SUBSYS.o: $(OBJS) SUBSYS.o: $(OBJS)
ifneq ($(PORTNAME), qnx4)
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS) $(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS)
else
$(LD) $(LDREL) $(LDOUT) SUBSYS.o $(OBJS1)
endif
# bootstrap.o's dependency on bootstrap_tokens.h is computed by the # bootstrap.o's dependency on bootstrap_tokens.h is computed by the
# make depend, but we state it here explicitly anyway because # make depend, but we state it here explicitly anyway because
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# Makefile for port/sparc # Makefile for port/sparc
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/Makefile,v 1.1 1999/12/16 01:25:06 momjian Exp $ # $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/Makefile,v 1.1 1999/12/16 16:52:52 momjian Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/ipc.h,v 1.1 1999/12/16 01:25:06 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/ipc.h,v 1.1 1999/12/16 16:52:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/isnan.c,v 1.1 1999/12/16 01:25:06 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/isnan.c,v 1.1 1999/12/16 16:52:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/rint.c,v 1.1 1999/12/16 01:25:06 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/rint.c,v 1.1 1999/12/16 16:52:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/sem.c,v 1.1 1999/12/16 01:25:06 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.c,v 1.1 1999/12/16 16:52:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/sem.h,v 1.1 1999/12/16 01:25:06 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.h,v 1.1 1999/12/16 16:52:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/shm.c,v 1.1 1999/12/16 01:25:06 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/shm.c,v 1.1 1999/12/16 16:52:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/shm.h,v 1.1 1999/12/16 01:25:06 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/shm.h,v 1.1 1999/12/16 16:52:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
此差异已折叠。
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/tstrint.c,v 1.1 1999/12/16 01:25:06 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstrint.c,v 1.1 1999/12/16 16:52:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/tstsem.c,v 1.1 1999/12/16 01:25:06 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstsem.c,v 1.1 1999/12/16 16:52:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/qnx/Attic/tstshm.c,v 1.1 1999/12/16 01:25:06 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstshm.c,v 1.1 1999/12/16 16:52:52 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
......
#!/bin/sh #!/bin/sh
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.34 1999/12/16 01:25:23 momjian Exp $ # $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.35 1999/12/16 16:52:53 momjian Exp $
# #
if [ $# -eq 0 ] if [ $# -eq 0 ]
then then
...@@ -110,7 +110,6 @@ do ...@@ -110,7 +110,6 @@ do
echo "----------------------"; \ echo "----------------------"; \
echo "" ) >> regression.diffs echo "" ) >> regression.diffs
echo failed echo failed
echo "diff ${DIFFOPT} -C3 ${EXPECTED} results/${i}.out"
else else
echo ok echo ok
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册