Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d6dfbec

Browse files
committed
Moved the following definitions to include/config.h from Makefile.global:
NAMEDATALEN OIDDATALEN EUROPEAN_DATES HBA DEADLOCK_TIMEOUT OPENLINK_PATCHES NULL_PATCH ARRAY_PATCH Attempting to document and centralize as many of the "defines" as possible... kinda useless to have defines if nobody knows they exist, eh?
1 parent 87bb8da commit d6dfbec

File tree

2 files changed

+35
-57
lines changed

2 files changed

+35
-57
lines changed

src/Makefile.global

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.35 1996/09/23 18:17:42 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.36 1996/10/08 00:08:56 scrappy Exp $
1111
#
1212
# NOTES
1313
# This is seen by any Makefiles that include mk/postgres.mk. To
@@ -107,22 +107,6 @@ HEADERDIR= $(POSTGRESDIR)/include
107107
# The port to run the postmaster on
108108
POSTPORT= 5432
109109

110-
# NAMEDATALEN is the max length for system identifiers (e.g. table names,
111-
# attribute names, function names, etc.)
112-
#
113-
# These MUST be set here. DO NOT COMMENT THESE OUT
114-
# Setting these too high will result in excess space usage for system catalogs
115-
# Setting them too low will make the system unusable.
116-
# values between 16 and 64 that are multiples of four are recommended.
117-
#
118-
# NOTE also that databases with different NAMEDATALEN's cannot interoperate!
119-
#
120-
NAMEDATALEN = 32
121-
# OIDNAMELEN should be set to NAMEDATALEN + sizeof(Oid)
122-
OIDNAMELEN = 36
123-
124-
CFLAGS+= -DNAMEDATALEN=$(NAMEDATALEN) -DOIDNAMELEN=$(OIDNAMELEN)
125-
126110
##############################################################################
127111
#
128112
# FEATURES
@@ -139,11 +123,6 @@ CDEBUG= -O
139123
# multi-byte types to generate a bus error.
140124
ENFORCE_ALIGNMENT= true
141125

142-
# turn this on if you prefer European style dates instead of American
143-
# style dates
144-
#EUROPEAN_DATES = true
145-
146-
# Comment out PROFILE to disable profiling.
147126
#
148127
# XXX define on MIPS if you want to be able to use pixie.
149128
# note that this disables dynamic loading!
@@ -167,14 +146,6 @@ READLINE_LIB= -L/home/tools/lib -lreadline
167146
#HISTORY_INC= -I/home/tools/include -I/home/tools/include/readline
168147
#HISTORY_LIB= -L/home/tools/lib -lhistory
169148

170-
# If you do not plan to use Host based authentication,
171-
# comment out the following line
172-
HBA = 1
173-
174-
ifdef HBA
175-
HBAFLAGS= -DHBA
176-
endif
177-
178149
# If you plan to use Kerberos for authentication...
179150
#
180151
# Comment out KRBVERS if you do not use Kerberos.
@@ -288,26 +259,11 @@ CFLAGS+= $(CFLAGS_BE)
288259
LDADD+= $(LDADD_BE)
289260
LDFLAGS+= $(LDFLAGS_BE)
290261

291-
# enable patches to array update code (moved to config.h)
292-
#CFLAGS += -DARRAY_PATCH
293-
# enable patches to null insert/update code
294-
CFLAGS += -DNULL_PATCH
295-
# enable patches for varchar and fsync
296-
CFLAGS += -DOPENLINK_PATCHES
297-
298262
##############################################################################
299263
#
300264
# Miscellaneous configuration
301265
#
302266

303-
# This is the time, in seconds, at which a given backend server
304-
# will wait on a lock before deciding to abort the transaction
305-
# (this is what we do in lieu of deadlock detection).
306-
#
307-
# Low numbers are not recommended as they will tend to cause
308-
# false aborts if many transactions are long-lived.
309-
CFLAGS+= -DDEADLOCK_TIMEOUT=60
310-
311267
srcdir= $(SRCDIR)
312268
includedir= $(HEADERDIR)
313269
objdir= obj

src/include/config.h

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/* the purpose of this file is to reduce the use of #ifdef's through
32
* the code base by those porting the software, an dto facilitate the
43
* eventual use of autoconf to build the server
@@ -39,26 +38,37 @@
3938
* because it is used in both the prototypes as well as the definitions.
4039
* Note also the long name. We expect that this won't collide with
4140
* other names causing compiler warnings.
42-
*/
41+
*/
4342

4443
#ifndef SIGNAL_ARGS
4544
#define SIGNAL_ARGS int postgres_signal_arg
4645
#endif
4746

48-
# NAMEDATALEN is the max length for system identifiers (e.g. table names,
49-
# attribute names, function names, etc.)
50-
#
51-
# These MUST be set here. DO NOT COMMENT THESE OUT
52-
# Setting these too high will result in excess space usage for system catalogs
53-
# Setting them too low will make the system unusable.
54-
# values between 16 and 64 that are multiples of four are recommended.
55-
#
56-
# NOTE also that databases with different NAMEDATALEN's cannot interoperate!
57-
#
47+
/* NAMEDATALEN is the max length for system identifiers (e.g. table names,
48+
* attribute names, function names, etc.)
49+
*
50+
* These MUST be set here. DO NOT COMMENT THESE OUT
51+
* Setting these too high will result in excess space usage for system catalogs
52+
* Setting them too low will make the system unusable.
53+
* values between 16 and 64 that are multiples of four are recommended.
54+
*
55+
* NOTE also that databases with different NAMEDATALEN's cannot interoperate!
56+
*/
5857
#define NAMEDATALEN 32
5958
# OIDNAMELEN should be set to NAMEDATALEN + sizeof(Oid)
6059
#define OIDNAMELEN 36
6160

61+
/* turn this on if you prefer European style dates instead of American
62+
* style dates
63+
*/
64+
#define EUROPEAN_DATES FALSE
65+
66+
/*
67+
* If you do not plan to use Host based authentication,
68+
* comment out the following line
69+
*/
70+
#define HBA
71+
6272
/*
6373
* On architectures for which we have not implemented spinlocks (or
6474
* cannot do so), we use System V semaphores. We also use them for
@@ -87,6 +97,18 @@
8797
/* #define LOARRAY */
8898
#define ESCAPE_PATCH
8999
#define ARRAY_PATCH
100+
#define NULL_PATCH
101+
#define OPENLINK_PATCHES
102+
103+
/* This is the time, in seconds, at which a given backend server
104+
* will wait on a lock before deciding to abort the transaction
105+
* (this is what we do in lieu of deadlock detection).
106+
*
107+
* Low numbers are not recommended as they will tend to cause
108+
* false aborts if many transactions are long-lived.
109+
*/
110+
#define DEADLOCK_TIMEOUT 60
111+
90112

91113
/* Fixes use of indexes infunctions */
92114
#define INDEXSCAN_PATCH

0 commit comments

Comments
 (0)