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

Commit2a63c16

Browse files
committed
Generate the various .def files for libpq DLLs from a single list of
exportable functions. The .def files are removed from CVS, but willstill be present in distribution tarballs, since we can't assume thatWindows boxes will have sed.
1 parentf68d05d commit2a63c16

File tree

6 files changed

+165
-486
lines changed

6 files changed

+165
-486
lines changed

‎src/interfaces/libpq/.cvsignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
libpqdll.def
2+
libpqddll.def
3+
blibpqdll.def

‎src/interfaces/libpq/Makefile

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
#
33
# Makefile for src/interfaces/libpq library
44
#
5-
# Copyright (c) 1994, Regents of the University of California
5+
# Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
6+
# Portions Copyright (c) 1994, Regents of the University of California
67
#
7-
# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.118 2004/10/1603:26:43 momjian Exp $
8+
# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.119 2004/10/1620:10:56 tgl Exp $
89
#
910
#-------------------------------------------------------------------------
1011

@@ -52,7 +53,7 @@ SHLIB_LINK += -lwsock32 -lws2_32 $(filter -leay32 -lssleay32, $(LIBS))
5253
endif
5354

5455

55-
all:$(PTHREAD_H_WIN32)$(top_builddir)/src/port/pg_config_paths.h all-lib
56+
all:$(PTHREAD_H_WIN32)$(top_builddir)/src/port/pg_config_paths.hdef-filesall-lib
5657

5758
# Shared library stuff
5859
include$(top_srcdir)/src/Makefile.shlib
@@ -79,6 +80,42 @@ encnames.c wchar.c : % : $(backend_src)/utils/mb/%
7980
rm -f$@&&$(LN_S)$<.
8081

8182

83+
# We need several not-quite-identical variants of .DEF files to build libpq
84+
# DLLs for Windows. These are made from the single source file exports.txt.
85+
# Since we can't assume that Windows boxes will have sed, the .DEF files are
86+
# always built and included in distribution tarballs.
87+
88+
distprep: def-files
89+
90+
.PHONY: def-files
91+
92+
def-files:$(srcdir)/libpqdll.def$(srcdir)/libpqddll.def$(srcdir)/blibpqdll.def
93+
94+
$(srcdir)/libpqdll.def: exports.txt
95+
echo'; DEF file for MS VC++'>$@
96+
echo'LIBRARY LIBPQ'>>$@
97+
echo'DESCRIPTION "PostgreSQL Client Library"'>>$@
98+
echo'EXPORTS'>>$@
99+
sed -e'/^#/d' -e's/^\(.* \)\([0-9][0-9]*\)/ \1@ \2/'<$<>>$@
100+
101+
$(srcdir)/libpqddll.def: exports.txt
102+
echo'; DEF file for MS VC++'>$@
103+
echo'LIBRARY LIBPQD'>>$@
104+
echo'DESCRIPTION "PostgreSQL Client Library"'>>$@
105+
echo'EXPORTS'>>$@
106+
sed -e'/^#/d' -e's/^\(.* \)\([0-9][0-9]*\)/ \1@ \2/'<$<>>$@
107+
108+
$(srcdir)/blibpqdll.def: exports.txt
109+
echo'; DEF file for Borland C++ Builder'>$@
110+
echo'LIBRARY BLIBPQ'>>$@
111+
echo'DESCRIPTION "PostgreSQL Client Library"'>>$@
112+
echo'EXPORTS'>>$@
113+
sed -e'/^#/d' -e's/^\(.* \)\([0-9][0-9]*\)/ _\1@ \2/'<$<>>$@
114+
echo''>>$@
115+
echo'; Aliases for MS compatible names'>>$@
116+
sed -e'/^#/d' -e's/^\(.* \)\([0-9][0-9]*\)/ \1= _\1/'<$<| sed's/ *$$//'>>$@
117+
118+
82119
ifneq ($(PTHREAD_H_WIN32), "")
83120
pthread.h :% :$(top_srcdir)/src/interfaces/libpq/pthread.h.win
84121
rm -f$@&&$(LN_S)$<.
@@ -99,5 +136,8 @@ installdirs:
99136
uninstall: uninstall-lib
100137
rm -f$(DESTDIR)$(includedir)/libpq-fe.h$(DESTDIR)$(includedir_internal)/libpq-int.h$(DESTDIR)$(includedir_internal)/pqexpbuffer.h
101138

102-
cleandistcleanmaintainer-clean: clean-lib
139+
cleandistclean: clean-lib
103140
rm -f$(OBJS) crypt.c getaddrinfo.c inet_aton.c noblock.c pgstrcasecmp.c snprintf.c strerror.c open.c thread.c dllist.c md5.c ip.c encnames.c wchar.c pthread.h
141+
142+
maintainer-clean: distclean
143+
rm -f$(srcdir)/libpqdll.def$(srcdir)/libpqddll.def$(srcdir)/blibpqdll.def

‎src/interfaces/libpq/blibpqdll.def

Lines changed: 0 additions & 240 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp