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

Commit7492fb1

Browse files
author
Bryan Henderson
committed
Fix bug: libpq clients (which include libpq-fe.h) won't compile.
Plus: sigjmp_buf/jmp_buf is backwards, so backend doesn't compile.
1 parent41b3674 commit7492fb1

File tree

3 files changed

+45
-41
lines changed

3 files changed

+45
-41
lines changed

‎src/include/config.h

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
#endif
8484

8585
#if defined(hpux)
86-
# defineSIGJMP_BUF
86+
# defineJMP_BUF
8787
# defineUSE_POSIX_TIME
8888
# defineHAVE_TZSET
8989
# defineNEED_CBRT
@@ -129,7 +129,7 @@
129129
__USE_BSD is set by bsd/signal.h, and __USE_BSD_SIGNAL appears not to
130130
be used.
131131
*/
132-
# defineSIGJMP_BUF
132+
# defineJMP_BUF
133133
# defineUSE_POSIX_TIME
134134
# defineHAVE_TZSET
135135
# defineNEED_CBRT
@@ -141,7 +141,7 @@
141141

142142
/* does anybody use this? */
143143
#if defined(next)
144-
# defineSIGJMP_BUF
144+
# defineJMP_BUF
145145
# defineNEED_SIG_JMP
146146
# defineSB_PAD 56
147147
typedefstructmutexslock_t;
@@ -184,7 +184,7 @@
184184
#endif
185185

186186
#if defined(win32)
187-
# defineSIGJMP_BUF
187+
# defineJMP_BUF
188188
# defineNEED_SIG_JMP
189189
# defineNO_UNISTD_H
190190
# defineUSES_WINSOCK
@@ -217,20 +217,6 @@
217217
# defineSIGNAL_ARGS int postgres_signal_arg
218218
#endif
219219

220-
/* NAMEDATALEN is the max length for system identifiers (e.g. table names,
221-
* attribute names, function names, etc.)
222-
*
223-
* These MUST be set here. DO NOT COMMENT THESE OUT
224-
* Setting these too high will result in excess space usage for system catalogs
225-
* Setting them too low will make the system unusable.
226-
* values between 16 and 64 that are multiples of four are recommended.
227-
*
228-
* NOTE also that databases with different NAMEDATALEN's cannot interoperate!
229-
*/
230-
#defineNAMEDATALEN 32
231-
/* OIDNAMELEN should be set to NAMEDATALEN + sizeof(Oid) */
232-
#defineOIDNAMELEN 36
233-
234220
/*
235221
* DEF_PGPORT is the TCP port number on which the Postmaster listens by
236222
* default. This can be overriden by command options, environment variables,

‎src/include/postgres.h

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1995, Regents of the University of California
88
*
9-
* $Id: postgres.h,v 1.2 1996/11/04 06:35:36 scrappy Exp $
9+
* $Id: postgres.h,v 1.3 1996/12/10 07:03:40 bryanh Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -36,6 +36,7 @@
3636
#ifndefPOSTGRES_H
3737
#definePOSTGRES_H
3838

39+
#include"postgres_ext.h"
3940
#include"config.h"
4041
#include"c.h"
4142
#include"utils/elog.h"
@@ -53,8 +54,6 @@ typedef doublefloat8;
5354

5455
typedefint4aclitem;
5556

56-
57-
typedefuint32Oid;
5857
#defineInvalidOid0
5958
#defineOidIsValid(objectId) ((bool) (objectId != InvalidOid))
6059

@@ -105,26 +104,6 @@ typedef char16*Char16;
105104
typedefint2int28[8];
106105
typedefOidoid8[8];
107106

108-
/* char16 is distinct from Name.
109-
now, you can truly change the max length of system names
110-
by altering the NAMEDATALEN define below.
111-
don't set the value too high because tuples are still constrained
112-
to be less than 8K
113-
*/
114-
115-
/* NAMEDATALEN is the maximum string length (counting terminating null)
116-
of a Name */
117-
/* defined in Makefile.global */
118-
/* if you change the value of NAMEDATALEN, you may need to change the
119-
alignment of the 'name' type in pg_type.h */
120-
#ifndefNAMEDATALEN
121-
#defineNAMEDATALEN 16
122-
#endif/* NAMEDATALEN */
123-
/* OIDNAMELEN should be NAMEDATALEN + sizeof(Oid) */
124-
#ifndefOIDNAMELEN
125-
#defineOIDNAMELEN 20
126-
#endif/* OIDNAMELEN */
127-
128107
typedefstructnameData {
129108
chardata[NAMEDATALEN];
130109
}NameData;

‎src/include/postgres_ext.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*-------------------------------------------------------------------------
2+
*
3+
* postgres_ext.h--
4+
*
5+
* This file contains declarations of things that are visible
6+
* external to Postgres. For example, the Oid type is part of a
7+
* structure that is passed to the front end via libpq, and is
8+
* accordingly referenced in libpq-fe.h.
9+
*
10+
* Declarations which are specific to a particular interface should
11+
* go in the header file for that interface (such as libpq-fe.h). This
12+
* file is only for fundamental Postgres declarations.
13+
*
14+
* User-written C functions don't count as "external to Postgres."
15+
* Those function much as local modifications to the backend itself, and
16+
* use header files that are otherwise internal to Postgres to interface
17+
* with the backend.
18+
*
19+
* $Id: postgres_ext.h,v 1.1 1996/12/10 07:03:43 bryanh Exp $
20+
*
21+
*-------------------------------------------------------------------------
22+
*/
23+
24+
#ifndefPOSTGRES_EXT_H
25+
#definePOSTGRES_EXT_H
26+
27+
typedefunsignedintOid;
28+
29+
/* NAMEDATALEN is the max length for system identifiers (e.g. table names,
30+
* attribute names, function names, etc.)
31+
*
32+
* NOTE that databases with different NAMEDATALEN's cannot interoperate!
33+
*/
34+
#defineNAMEDATALEN 32
35+
36+
/* OIDNAMELEN should be set to NAMEDATALEN + sizeof(Oid) */
37+
#defineOIDNAMELEN 36
38+
39+
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp