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

Commitfa8a9f3

Browse files
author
Michael Meskes
committed
Also created export list for pgytpeslib and compatlib.
Set pgtypes library version to 3.0.Set compat library version to 3.0.
1 parentf83e44a commitfa8a9f3

File tree

6 files changed

+202
-14
lines changed

6 files changed

+202
-14
lines changed

‎src/interfaces/ecpg/ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,5 +2259,8 @@ Wed, 03 Oct 2007 10:48:39 +0200
22592259
- Cleaned up ecpglib and renamed functions that do not need to be
22602260
exported.
22612261
- Created export list for ecpglib.
2262+
- Also created export list for pgytpeslib and compatlib.
2263+
- Set pgtypes library version to 3.0.
2264+
- Set compat library version to 3.0.
22622265
- Set ecpg library version to 6.0.
22632266
- Set ecpg version to 4.4.

‎src/interfaces/ecpg/compatlib/Makefile

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/Makefile,v 1.27 2007/01/20 17:16:17 petere Exp $
7+
# $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/Makefile,v 1.28 2007/10/03 13:20:19 meskes Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -13,8 +13,8 @@ top_builddir = ../../../..
1313
include$(top_builddir)/src/Makefile.global
1414

1515
NAME= ecpg_compat
16-
SO_MAJOR_VERSION=2
17-
SO_MINOR_VERSION=3
16+
SO_MAJOR_VERSION=3
17+
SO_MINOR_VERSION=0
1818
DLTYPE= library
1919

2020
overrideCPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include\
@@ -23,13 +23,62 @@ override CFLAGS += $(PTHREAD_CFLAGS)
2323
SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes$(libpq) -lm\
2424
$(PTHREAD_LIBS)
2525

26-
OBJS= informix.o
26+
OBJS= informix.o$(filter snprintf.o,$(LIBOBJS))
27+
28+
ifneq ($(PORTNAME), win32)
29+
DLL_DEFFILE=libecpg_compatdll.def
30+
endif
2731

2832
all: all-lib
2933

3034
# Shared library stuff
3135
include$(top_srcdir)/src/Makefile.shlib
3236

37+
# We need several not-quite-identical variants of .DEF files to build libecpg
38+
# DLLs for Windows. These are made from the single source file exports.txt.
39+
# Since we can't assume that Windows boxes will have sed, the .DEF files are
40+
# always built and included in distribution tarballs.
41+
42+
.PHONY: def-files
43+
def-files:$(srcdir)/libecpg_compat.def$(srcdir)/blibecpg_compatdll.def
44+
$(srcdir)/libecpg_compat.def: exports.txt
45+
echo'; DEF file for MS VC++'>$@
46+
echo'LIBRARY LIBECPG_COMPAT'>>$@
47+
echo'EXPORTS'>>$@
48+
sed -e'/^#/d' -e's/^\(.* \)\([0-9][0-9]*\)/ \1@ \2/'<$<>>$@
49+
50+
$(srcdir)/blibecpg_compatdll.def: exports.txt
51+
echo'; DEF file for Borland C++ Builder'>$@
52+
echo'LIBRARY BLIBECPG_COMPAT'>>$@
53+
echo'EXPORTS'>>$@
54+
sed -e'/^#/d' -e's/^\(.* \)\([0-9][0-9]*\)/ _\1@ \2/'<$<>>$@
55+
echo''>>$@
56+
echo'; Aliases for MS compatible names'>>$@
57+
sed -e'/^#/d' -e's/^\(.* \)\([0-9][0-9]*\)/ \1= _\1/'<$<| sed's/ *$$//'>>$@
58+
59+
# Where possible, restrict the symbols exported by the library to just the
60+
# official list, so as to avoid unintentional ABI changes.
61+
62+
ifeq ($(PORTNAME), darwin)
63+
$(shlib): exports.list
64+
65+
exports.list: exports.txt
66+
$(AWK)'/^[^#]/ {printf "_%s\n",$$1}'$<>$@
67+
68+
exported_symbols_list = -exported_symbols_list exports.list
69+
endif
70+
71+
ifeq ($(PORTNAME), linux)
72+
$(shlib): exports.list
73+
74+
exports.list: exports.txt
75+
echo'{ global:'>$@
76+
$(AWK)'/^[^#]/ {printf "%s;\n",$$1}'$<>>$@
77+
echo' local: *; };'>>$@
78+
79+
exported_symbols_list = -Wl,--version-script=exports.list
80+
endif
81+
3382
install: all installdirs install-lib
3483

3584
installdirs:
@@ -38,4 +87,4 @@ installdirs:
3887
uninstall: uninstall-lib
3988

4089
cleandistcleanmaintainer-clean: clean-lib
41-
rm -f$(OBJS)
90+
rm -f$(OBJS) snprintf.c
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/exports.txt,v 1.1 2007/10/03 13:20:19 meskes Exp $
2+
# Functions to be exported by ecpg_compatlib DLL
3+
ECPG_informix_get_var1
4+
ECPG_informix_set_var2
5+
decadd3
6+
deccmp4
7+
deccopy5
8+
deccvasc6
9+
deccvdbl7
10+
deccvint8
11+
deccvlong9
12+
decdiv10
13+
decmul11
14+
decsub12
15+
dectoasc13
16+
dectodbl14
17+
dectoint15
18+
dectolong16
19+
dtcurrent17
20+
dtcvasc18
21+
dtcvfmtasc19
22+
dtsub20
23+
dttoasc21
24+
dttofmtasc22
25+
intoasc23
26+
rdatestr24
27+
rdayofweek25
28+
rdefmtdate26
29+
rfmtdate27
30+
rfmtlong28
31+
rgetmsg29
32+
risnull30
33+
rjulmdy31
34+
rmdyjul32
35+
rsetnull33
36+
rstrdate34
37+
rtoday35
38+
rtypalign36
39+
rtypmsize37
40+
rtypwidth38
41+
rupshift39
42+

‎src/interfaces/ecpg/compatlib/informix.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.51 2007/10/0312:34:29 mha Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.52 2007/10/0313:20:19 meskes Exp $ */
22

3-
#include<stdlib.h>
4-
#include<string.h>
5-
#include<errno.h>
63
#include<math.h>
74
#include<ctype.h>
85
#include<limits.h>
96

107
#definePOSTGRES_ECPG_INTERNAL
11-
#include<postgres_fe.h>
8+
#include"postgres_fe.h"
129
#include<ecpgtype.h>
1310
#include<ecpg_informix.h>
1411
#include<pgtypes_error.h>

‎src/interfaces/ecpg/pgtypeslib/Makefile

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.33 2007/09/27 19:53:44 tgl Exp $
7+
# $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/Makefile,v 1.34 2007/10/03 13:20:19 meskes Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -13,8 +13,8 @@ top_builddir = ../../../..
1313
include$(top_builddir)/src/Makefile.global
1414

1515
NAME= pgtypes
16-
SO_MAJOR_VERSION=2
17-
SO_MINOR_VERSION=3
16+
SO_MAJOR_VERSION=3
17+
SO_MINOR_VERSION=0
1818
DLTYPE= library
1919

2020
overrideCPPFLAGS := -I../include -I$(top_srcdir)/src/interfaces/ecpg/include\
@@ -30,11 +30,60 @@ OBJS= numeric.o datetime.o common.o dt_common.o timestamp.o interval.o \
3030
pgstrcasecmp.o\
3131
$(filter rint.o snprintf.o,$(LIBOBJS))
3232

33+
ifneq ($(PORTNAME), win32)
34+
DLL_DEFFILE=libpgtypesdll.def
35+
endif
36+
3337
all: all-lib
3438

3539
# Shared library stuff
3640
include$(top_srcdir)/src/Makefile.shlib
3741

42+
# We need several not-quite-identical variants of .DEF files to build libecpg
43+
# DLLs for Windows. These are made from the single source file exports.txt.
44+
# Since we can't assume that Windows boxes will have sed, the .DEF files are
45+
# always built and included in distribution tarballs.
46+
47+
.PHONY: def-files
48+
def-files:$(srcdir)/libpgtypes.def$(srcdir)/blibpgtypesdll.def
49+
$(srcdir)/libpgtypes.def: exports.txt
50+
echo'; DEF file for MS VC++'>$@
51+
echo'LIBRARY LIBPGTYPES'>>$@
52+
echo'EXPORTS'>>$@
53+
sed -e'/^#/d' -e's/^\(.* \)\([0-9][0-9]*\)/ \1@ \2/'<$<>>$@
54+
55+
$(srcdir)/blibpgtypesdll.def: exports.txt
56+
echo'; DEF file for Borland C++ Builder'>$@
57+
echo'LIBRARY BLIBPGTYPES'>>$@
58+
echo'EXPORTS'>>$@
59+
sed -e'/^#/d' -e's/^\(.* \)\([0-9][0-9]*\)/ _\1@ \2/'<$<>>$@
60+
echo''>>$@
61+
echo'; Aliases for MS compatible names'>>$@
62+
sed -e'/^#/d' -e's/^\(.* \)\([0-9][0-9]*\)/ \1= _\1/'<$<| sed's/ *$$//'>>$@
63+
64+
# Where possible, restrict the symbols exported by the library to just the
65+
# official list, so as to avoid unintentional ABI changes.
66+
67+
ifeq ($(PORTNAME), darwin)
68+
$(shlib): exports.list
69+
70+
exports.list: exports.txt
71+
$(AWK)'/^[^#]/ {printf "_%s\n",$$1}'$<>$@
72+
73+
exported_symbols_list = -exported_symbols_list exports.list
74+
endif
75+
76+
ifeq ($(PORTNAME), linux)
77+
$(shlib): exports.list
78+
79+
exports.list: exports.txt
80+
echo'{ global:'>$@
81+
$(AWK)'/^[^#]/ {printf "%s;\n",$$1}'$<>>$@
82+
echo' local: *; };'>>$@
83+
84+
exported_symbols_list = -Wl,--version-script=exports.list
85+
endif
86+
3887
# We use some port modules verbatim, but since we need to
3988
# compile with appropriate options to build a shared lib, we can't
4089
# necessarily use the same object files as the backend uses. Instead,
@@ -51,4 +100,4 @@ installdirs:
51100
uninstall: uninstall-lib
52101

53102
cleandistcleanmaintainer-clean: clean-lib
54-
rm -f$(OBJS) pgstrcasecmp.c rint.c snprintf.c
103+
rm -f$(OBJS) pgstrcasecmp.c rint.c snprintf.c exports.list
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# $PostgreSQL: pgsql/src/interfaces/ecpg/pgtypeslib/exports.txt,v 1.1 2007/10/03 13:20:19 meskes Exp $
2+
# Functions to be exported by pgtypeslib DLL
3+
PGTYPESdate_dayofweek1
4+
PGTYPESdate_defmt_asc2
5+
PGTYPESdate_fmt_asc3
6+
PGTYPESdate_free4
7+
PGTYPESdate_from_asc5
8+
PGTYPESdate_from_timestamp6
9+
PGTYPESdate_julmdy7
10+
PGTYPESdate_mdyjul8
11+
PGTYPESdate_new9
12+
PGTYPESdate_to_asc10
13+
PGTYPESdate_today11
14+
PGTYPESdecimal_free12
15+
PGTYPESdecimal_new13
16+
PGTYPESinterval_copy14
17+
PGTYPESinterval_free15
18+
PGTYPESinterval_from_asc16
19+
PGTYPESinterval_new17
20+
PGTYPESinterval_to_asc18
21+
PGTYPESnumeric_add19
22+
PGTYPESnumeric_cmp20
23+
PGTYPESnumeric_copy21
24+
PGTYPESnumeric_div22
25+
PGTYPESnumeric_free23
26+
PGTYPESnumeric_from_asc24
27+
PGTYPESnumeric_from_decimal25
28+
PGTYPESnumeric_from_double26
29+
PGTYPESnumeric_from_int27
30+
PGTYPESnumeric_from_long28
31+
PGTYPESnumeric_mul29
32+
PGTYPESnumeric_new30
33+
PGTYPESnumeric_sub31
34+
PGTYPESnumeric_to_asc32
35+
PGTYPESnumeric_to_decimal33
36+
PGTYPESnumeric_to_double34
37+
PGTYPESnumeric_to_int35
38+
PGTYPESnumeric_to_long36
39+
PGTYPEStimestamp_add_interval37
40+
PGTYPEStimestamp_current38
41+
PGTYPEStimestamp_defmt_asc39
42+
PGTYPEStimestamp_defmt_scan40
43+
PGTYPEStimestamp_fmt_asc41
44+
PGTYPEStimestamp_from_asc42
45+
PGTYPEStimestamp_sub43
46+
PGTYPEStimestamp_sub_interval44
47+
PGTYPEStimestamp_to_asc45
48+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp