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

Commit7f36a2a

Browse files
author
Bryan Henderson
committed
Fix bug: libpq clients (which include libpq-fe.h) won't compile.
1 parent2697c27 commit7f36a2a

File tree

2 files changed

+16
-19
lines changed

2 files changed

+16
-19
lines changed

‎src/interfaces/libpq/Makefile

Lines changed: 12 additions & 15 deletions
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.21 1996/11/26 07:38:46 bryanh Exp $
10+
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.22 1996/12/10 07:05:09 bryanh Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -40,7 +40,7 @@ shlib := libpq.so.1
4040
endif
4141
endif
4242

43-
all: libpq.a$(shlib)postgres.hc.h
43+
all: libpq.a$(shlib) c.h
4444

4545
libpq.a:$(OBJS)
4646
ifdefMK_NO_LORDER
@@ -64,16 +64,6 @@ fe-lobj.o: ../backend/fmgr.h
6464
libpq.so.1:$(OBJS)
6565
$(CC)$(LDFLAGS) -shared$(OBJS) -o libpq.so.1
6666

67-
postgres.h: ../include/postgres.h
68-
# Note: ../backend/include/postgres.h needs to be named something different
69-
# to avoid confusion with this thing we're building now.
70-
#
71-
# hardwire NAMEDATALEN and OIDNAMELEN into the postgres.h for this installation
72-
rm -f postgres.h
73-
echo "#define NAMEDATALEN $(NAMEDATALEN)" >> postgres.h
74-
echo "#define OIDNAMELEN $(OIDNAMELEN)" >> postgres.h
75-
cat ../include/postgres.h >> postgres.h
76-
7767
c.h: ../include/c.h
7868
rm -f c.h
7969
echo"#undef PORTNAME"> c.h
@@ -85,12 +75,20 @@ c.h: ../include/c.h
8575

8676
install: install-headers install-libpq$(install-shlib-dep)
8777

88-
install-headers: beforeinstall-headers postgres.h c.h\
78+
# Many of the headers we install below have nothing to do with libpq,
79+
# so should be installed by someone else.
80+
#
81+
install-headers: beforeinstall-headers c.h\
82+
../include/postgres.h ../include/postgres_ext.h \
8983
../include/config.h ../include/libpq/pqcomm.h \
9084
../include/libpq/libpq-fs.h ../include/lib/dllist.h \
9185
../include/utils/geo-decls.h libpq-fe.h
9286
$(INSTALL) $(INSTLOPTS) ../include/config.h \
9387
$(HEADERDIR)/config.h
88+
$(INSTALL) $(INSTLOPTS) ../include/postgres.h \
89+
$(HEADERDIR)/postgres.h
90+
$(INSTALL) $(INSTLOPTS) ../include/postgres_ext.h \
91+
$(HEADERDIR)/postgres_ext.h
9492
$(INSTALL) $(INSTLOPTS) ../include/libpq/pqcomm.h \
9593
$(HEADERDIR)/libpq/pqcomm.h
9694
$(INSTALL) $(INSTLOPTS) ../include/libpq/libpq-fs.h \
@@ -111,7 +109,6 @@ ifeq ($(PORTNAME), hpux)
111109
$(HEADERDIR)/port/hpux/fixade.h
112110
endif
113111
$(INSTALL) $(INSTLOPTS) c.h $(HEADERDIR)/c.h
114-
$(INSTALL) $(INSTLOPTS) postgres.h $(HEADERDIR)/postgres.h
115112

116113
beforeinstall-headers:
117114
@if [!-d$(HEADERDIR) ];then mkdir$(HEADERDIR);fi
@@ -146,7 +143,7 @@ depend dep:
146143

147144
.PHONY: clean
148145
clean:
149-
rm -f libpq.a libpq.so.1$(OBJS) c.h postgres.h
146+
rm -f libpq.a libpq.so.1$(OBJS) c.h
150147

151148
ifeq (depend,$(wildcard depend))
152149
include depend

‎src/interfaces/libpq/libpq-fe.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: libpq-fe.h,v 1.14 1996/12/04 03:06:33 bryanh Exp $
9+
* $Id: libpq-fe.h,v 1.15 1996/12/10 07:05:12 bryanh Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -23,7 +23,7 @@ extern "C" {
2323
*include stuff common to fe and be
2424
* ----------------
2525
*/
26-
/*#include "libpq/libpq.h" */
26+
#include"postgres_ext.h"
2727
#include"libpq/pqcomm.h"
2828
#include"lib/dllist.h"
2929

@@ -76,7 +76,7 @@ typedef struct {
7676
typedefstructpgresAttDesc {
7777
char*name;/* type name */
7878
Oidadtid;/* type id */
79-
int2adtsize;/* type size */
79+
shortadtsize;/* type size */
8080
}PGresAttDesc;
8181

8282
/* use char* for Attribute values,
@@ -214,7 +214,7 @@ extern int PQnfields(PGresult *res);
214214
externchar*PQfname(PGresult*res,intfield_num);
215215
externintPQfnumber(PGresult*res,constchar*field_name);
216216
externOidPQftype(PGresult*res,intfield_num);
217-
externint2PQfsize(PGresult*res,intfield_num);
217+
externshortPQfsize(PGresult*res,intfield_num);
218218
externchar*PQcmdStatus(PGresult*res);
219219
externconstchar*PQoidStatus(PGresult*res);
220220
externchar*PQgetvalue(PGresult*res,inttup_num,intfield_num);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp