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

Commit7585deb

Browse files
committed
I have done the QNX4 port with the current source tree. The number of
backend/Makefiles to be patched could significantly be reduced sincetheyhave been adopted to the QNX4 needs.Andreas Kardos
1 parent9805abb commit7585deb

File tree

37 files changed

+12483
-53
lines changed

37 files changed

+12483
-53
lines changed

‎src/backend/Makefile

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#
3535
#
3636
# IDENTIFICATION
37-
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.41 1999/12/13 22:32:16 momjian Exp $
37+
# $Header: /cvsroot/pgsql/src/backend/Makefile,v 1.42 1999/12/16 01:25:00 momjian Exp $
3838
#
3939
#-------------------------------------------------------------------------
4040

@@ -50,6 +50,10 @@ DIRS += tioga
5050
endif
5151

5252
OBJS =$(DIRS:%=%/SUBSYS.o)
53+
ifeq ($(PORTNAME), qnx4)
54+
# This file chrashes wlink and is therefore not in bootstrap/SUBSYS.o.
55+
OBJS1 = bootstrap/bootstrap.o
56+
endif
5357

5458
# kerberos flags
5559

@@ -75,7 +79,7 @@ all: postgres $(POSTGRES_IMP) global1.bki.source local1_template1.bki.source \
7579

7680
ifneq ($(PORTNAME), win)
7781
postgres: fmgr.h$(OBJS) ../utils/version.o
78-
$(CC) -o postgres$(OBJS) ../utils/version.o$(LDFLAGS)
82+
$(CC) -o postgres$(OBJS)$(OBJS1)../utils/version.o$(LDFLAGS)
7983
else
8084
postgres:$(DLLOBJS) ../utils/dllinit.o postgres.def libpostgres.a
8185
dlltool --dllname$@$(X) --output-exp$@.exp --def postgres.def
@@ -109,7 +113,7 @@ catalog/global1.description catalog/local1_template1.description:
109113
# The postgres.o target is needed by the rule in Makefile.global that
110114
# creates the exports file when MAKE_EXPORTS = true.
111115
postgres.o:$(OBJS)
112-
$(CC)$(LDREL)$(LDOUT) postgres.o$(OBJS)$(LDFLAGS)
116+
$(CC)$(LDREL)$(LDOUT) postgres.o$(OBJS)$(OBJS1)$(LDFLAGS)
113117

114118
############################################################################
115119
# The following targets are specified in make commands that appear in the
@@ -197,21 +201,21 @@ install-lib: $(LIBDIR) \
197201
$(LIBDIR)/pg_geqo.sample
198202

199203
install-headers: fmgr.h$(SRCDIR)/include/config.h
200-
@if [!-d$(HEADERDIR) ];then mkdir$(HEADERDIR);fi
201-
@if [!-d$(HEADERDIR)/port ];then mkdir$(HEADERDIR)/port;fi
202-
@if [!-d$(HEADERDIR)/port/$(PORTNAME) ];\
204+
-@if [!-d$(HEADERDIR) ];then mkdir$(HEADERDIR);fi
205+
-@if [!-d$(HEADERDIR)/port ];then mkdir$(HEADERDIR)/port;fi
206+
-@if [!-d$(HEADERDIR)/port/$(PORTNAME) ];\
203207
then mkdir$(HEADERDIR)/port/$(PORTNAME);fi
204-
@if [!-d$(HEADERDIR)/lib ];\
208+
-@if [!-d$(HEADERDIR)/lib ];\
205209
then mkdir$(HEADERDIR)/lib;fi
206-
@if [!-d$(HEADERDIR)/libpq ];\
210+
-@if [!-d$(HEADERDIR)/libpq ];\
207211
then mkdir$(HEADERDIR)/libpq;fi
208-
@if [!-d$(HEADERDIR)/utils ];\
212+
-@if [!-d$(HEADERDIR)/utils ];\
209213
then mkdir$(HEADERDIR)/utils;fi
210-
@if [!-d$(HEADERDIR)/access ];\
214+
-@if [!-d$(HEADERDIR)/access ];\
211215
then mkdir$(HEADERDIR)/access;fi
212-
@if [!-d$(HEADERDIR)/executor ];\
216+
-@if [!-d$(HEADERDIR)/executor ];\
213217
then mkdir$(HEADERDIR)/executor;fi
214-
@if [!-d$(HEADERDIR)/commands ];\
218+
-@if [!-d$(HEADERDIR)/commands ];\
215219
then mkdir$(HEADERDIR)/commands;fi
216220
$(INSTALL)$(INSTLOPTS) fmgr.h\
217221
$(HEADERDIR)/fmgr.h
@@ -267,7 +271,7 @@ $(HEADERDIR):
267271
# are up to date. It saves the time of doing all the submakes.
268272
.PHONY: quick
269273
quick:$(OBJS)
270-
$(CC) -o postgres$(OBJS)$(LDFLAGS)
274+
$(CC) -o postgres$(OBJS)$(OBJS1)$(LDFLAGS)
271275

272276
#
273277
# Build the file, "./ID", used by the "gid" (grep-for-identifier) tool

‎src/backend/bootstrap/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for the bootstrap module
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.17 1999/12/13 22:32:35 momjian Exp $
7+
# $Header: /cvsroot/pgsql/src/backend/bootstrap/Makefile,v 1.18 1999/12/16 01:25:01 momjian Exp $
88
#
99
#
1010
# We must build bootparse.c and bootscanner.c with yacc and lex and sed,
@@ -32,7 +32,12 @@ endif
3232

3333
BOOTYACCS= bootstrap_tokens.h bootparse.c
3434

35+
ifneq ($(PORTNAME), qnx4)
3536
OBJS= bootparse.o bootscanner.o bootstrap.o
37+
else
38+
# wlink crashes with bootstrap.o
39+
OBJS= bootparse.o bootscanner.o
40+
endif
3641

3742
all: SUBSYS.o
3843

‎src/backend/port/Makefile.in

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# be converted to Method 2.
1414
#
1515
# IDENTIFICATION
16-
# $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.in,v 1.19 1999/12/13 22:33:05 momjian Exp $
16+
# $Header: /cvsroot/pgsql/src/backend/port/Attic/Makefile.in,v 1.20 1999/12/16 01:25:02 momjian Exp $
1717
#
1818
#-------------------------------------------------------------------------
1919

@@ -25,11 +25,19 @@ CFLAGS+= -I..
2525
OBJS = dynloader.o @INET_ATON@ @STRERROR@ @MISSING_RANDOM@ @SRANDOM@
2626
OBJS+= @GETHOSTNAME@ @GETRUSAGE@ @STRCASECMP@ @STRDUP@ @TAS@ @ISINF@
2727
OBJS+= @STRTOL@ @STRTOUL@ @SNPRINTF@
28+
ifeq ($(PORTNAME), qnx4)
29+
OBJS += getrusage.o qnx4/SUBSYS.o
30+
endif
2831
all: SUBSYS.o
2932

3033
SUBSYS.o:$(OBJS)
3134
$(LD)$(LDREL)$(LDOUT) SUBSYS.o$(OBJS)
3235

36+
qnx4/SUBSYS.o: qnx4.dir
37+
38+
qnx4.dir:
39+
$(MAKE) -C qnx4 all
40+
3341
.PHONY: clean dep
3442

3543
distcleanclean:

‎src/backend/port/dynloader/ID

684 KB
Binary file not shown.

‎src/backend/port/dynloader/qnx4.c

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* dynloader.c
4+
* dynamic loader for QNX4 using the shared library mechanism
5+
*
6+
* Copyright (c) 1999, repas AEG Automation GmbH
7+
*
8+
*
9+
* IDENTIFICATION
10+
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/qnx4.c,v 1.1 1999/12/16 01:25:04 momjian Exp $
11+
*
12+
*NOTES
13+
*
14+
*-------------------------------------------------------------------------
15+
*/
16+
/* System includes */
17+
/*
18+
#include <stdio.h>
19+
#include <a.out.h>
20+
#include <dl.h>
21+
*/
22+
#include"postgres.h"
23+
#include"fmgr.h"
24+
#include"utils/dynamic_loader.h"
25+
#include"dynloader.h"
26+
27+
void*
28+
pg_dlopen(char*filename)
29+
{
30+
return (void*)NULL;
31+
}
32+
33+
func_ptr
34+
pg_dlsym(void*handle,char*funcname)
35+
{
36+
returnNULL;
37+
}
38+
39+
void
40+
pg_dlclose(void*handle)
41+
{
42+
}
43+
44+
char*
45+
pg_dlerror()
46+
{
47+
staticcharerrmsg[]="Failed to load shared library due to lack of shared library support.";
48+
49+
returnerrmsg;
50+
}

‎src/backend/port/dynloader/qnx4.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* dynloader.h
4+
* dynamic loader for QNX4 using the shared library mechanism
5+
*
6+
* Copyright (c) 1999, repas AEG Automation GmbH
7+
*
8+
*
9+
* IDENTIFICATION
10+
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/qnx4.h,v 1.1 1999/12/16 01:25:04 momjian Exp $
11+
*
12+
*NOTES
13+
*
14+
*-------------------------------------------------------------------------
15+
*/
16+
/* System includes */
17+
void*pg_dlopen(char*filename);
18+
func_ptrpg_dlsym(void*handle,char*funcname);
19+
voidpg_dlclose(void*handle);
20+
char*pg_dlerror();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp