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

Commitc2e73db

Browse files
committed
Various patches for shared libraries under i386-solaris by:
Christoph Kaesling <ck@dog.pfalz.sub.de>
1 parent6304e2c commitc2e73db

File tree

4 files changed

+79
-15
lines changed

4 files changed

+79
-15
lines changed

‎src/interfaces/libpgtcl/Makefile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.10 1997/03/17 22:05:08 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.11 1997/03/25 09:19:41 scrappy Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -30,24 +30,26 @@ ifeq ($(CC), gcc)
3030
endif
3131

3232

33+
shlib :=
34+
install-shlib-dep :=
35+
3336
ifeq ($(PORTNAME), linux)
3437
ifdef LINUX_ELF
3538
ifeq ($(CC), gcc)
3639
CFLAGS += -fpic -fPIC
3740
endif
41+
shlib := libpgtcl.so.1
42+
install-shlib-dep := install-shlib
43+
LDFLAGS += -L ../libpq -lpq
3844
endif
3945
endif
4046

47+
ifeq ($(PORTNAME), i386_solaris)
48+
CFLAGS+= -fPIC
49+
endif
50+
4151
OBJS= pgtcl.o pgtclCmds.o pgtclId.o
4252

43-
ifdefLINUX_ELF
44-
shlib := libpgtcl.so.1
45-
install-shlib-dep := install-shlib
46-
LDFLAGS += -L ../libpq -lpq
47-
else
48-
shlib :=
49-
install-shlib-dep :=
50-
endif
5153

5254
all: libpgtcl.a$(shlib)
5355

‎src/interfaces/libpq++/Makefile

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.6 1997/02/13 10:00:23 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile,v 1.7 1997/03/25 09:20:32 scrappy Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -39,7 +39,17 @@ endif
3939

4040
OBJS = pgenv.o pgconnection.o pgtransdb.o pgcursordb.o pglobject.o
4141

42-
all:$(LIBNAME).a install examples
42+
# Shared library stuff
43+
SHLIB :=
44+
INSTALL-SHLIB-DEP :=
45+
ifeq ($(PORTNAME), i386_solaris)
46+
INSTALL-SHLIB-DEP := install-shlib
47+
SHLIB := libpq++.so.1
48+
LDFLAGS_SL = -G -z text
49+
CFLAGS += -fPIC
50+
endif
51+
52+
all:$(LIBNAME).a$(SHLIB) install examples
4353

4454
$(LIBNAME).a:$(OBJS)
4555
ifdefMK_NO_LORDER
@@ -49,14 +59,17 @@ else
4959
endif
5060
$(RANLIB) $(LIBNAME).a
5161

62+
$(SHLIB):$(OBJS)
63+
$(LD)$(LDFLAGS)$(LDFLAGS_SL) -o$@$(OBJS)
64+
5265
.PHONY: examples
5366
examples:
5467
$(MAKE) -C examples all
5568

5669
.PHONY: beforeinstall-headers install-headers
57-
.PHONY: install install-$(LIBNAME) doc
70+
.PHONY: installbeforeinstall-libinstall-$(LIBNAME) doc
5871

59-
install: install-headers install-$(LIBNAME) doc
72+
install: install-headers install-$(LIBNAME)$(INSTALL-SHLIB-DEP)doc
6073

6174
LIBPGXXDIR =$(LIBNAME)
6275
LIBPGXXHEADERDIR =$(HEADERDIR)/$(LIBPGXXDIR)
@@ -79,9 +92,18 @@ beforeinstall-headers:
7992
@if [!-d$(HEADERDIR) ];then mkdir$(HEADERDIR);fi
8093
@if [!-d$(LIBPGXXHEADERDIR) ];then mkdir$(LIBPGXXHEADERDIR);fi
8194

82-
install-$(LIBNAME):$(LIBNAME).a
95+
beforeinstall-lib:
96+
@if [!-d$(DESTDIR)/$(LIBDIR) ];then mkdir$(DESTDIR)/$(LIBDIR);fi
97+
98+
install-$(LIBNAME):$(LIBNAME).a beforeinstall-lib
8399
$(INSTALL)$(INSTL_LIB_OPTS)$(LIBNAME).a$(DESTDIR)$(LIBDIR)/$(LIBNAME).a
84100

101+
install-shlib:$(SHLIBNAME) beforeinstall-lib
102+
$(INSTALL)$(INSTL_SHLIB_OPTS)$(SHLIB)$(DESTDIR)/$(LIBDIR)/$(SHLIB)
103+
rm -f$(DESTDIR)/$(LIBDIR)/libpq++.so
104+
ln -sf$(SHLIB)$(DESTDIR)/$(LIBDIR)/libpq++.so
105+
106+
85107
doc:
86108
$(MAKE) -C man install
87109

‎src/interfaces/libpq/Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.32 1997/03/25 09:08:05 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.33 1997/03/25 09:20:12 scrappy Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -42,6 +42,12 @@ ifeq ($(PORTNAME), BSD44_derived)
4242
LDFLAGS_SL = -x -Bshareable -Bforcearchive
4343
CFLAGS += -fpic -DPIC
4444
endif
45+
ifeq ($(PORTNAME), i386_solaris)
46+
install-shlib-dep := install-shlib
47+
shlib := libpq.so.1
48+
LDFLAGS_SL = -G -z text
49+
CFLAGS += -fPIC
50+
endif
4551

4652
all: libpq.a$(shlib) c.h
4753

@@ -71,6 +77,8 @@ pqcomprim.c: ../backend/libpq/pqcomprim.c
7177

7278
$(shlib):$(OBJS)
7379
$(LD)$(LDFLAGS)$(LDFLAGS_SL) -o$@$(OBJS)
80+
ln -sf$@ libpq.so
81+
7482

7583
c.h: ../include/c.h
7684
rm -f c.h

‎src/port/i386_solaris.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,35 @@
44
# defineSYSV_DIRENT
55
# defineHAS_TEST_AND_SET
66
typedefunsignedcharslock_t;
7+
8+
#include<sys/isa_defs.h>
9+
10+
#ifndefBYTE_ORDER
11+
#defineBYTE_ORDER LITTLE_ENDIAN
12+
#endif
13+
14+
#ifndefNAN
15+
16+
#ifndef__nan_bytes
17+
#define__nan_bytes { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }
18+
#endif/* __nan_bytes */
19+
20+
#ifdef__GNUC__
21+
#defineNAN \
22+
(__extension__ ((union { unsigned char __c[8]; \
23+
double __d; }) \
24+
{ __nan_bytes }).__d)
25+
26+
#else/* Not GCC. */
27+
#defineNAN (*(__const double *) __nan)
28+
#endif/* GCC. */
29+
#endif/* NAN */
30+
31+
#ifndefindex
32+
#defineindex strchr
33+
#endif
34+
35+
#ifndefHAVE_RUSAGE
36+
#defineHAVE_RUSAGE 1
37+
#endif
38+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp