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

Commit 927e588

Browse files
committed
Added a #define NEED_SIG_JMP to config.h
Removed #ifdef's for OPENLINK_PATCH. We enable it by default, and nobody *has* to enable the functionality, but no reason to retain the "old code"
1 parent 6c3dff4 commit 927e588

File tree

1 file changed

+10
-29
lines changed

1 file changed

+10
-29
lines changed

src/backend/bootstrap/bootstrap.c

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,13 @@
77
* Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.6 1996/08/17 06:41:10 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.7 1996/10/18 05:47:12 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414
#include <string.h>
1515
#include <unistd.h>
1616
#include "libpq/pqsignal.h" /* substitute for <signal.h> */
17-
#if defined(PORTNAME_linux)
18-
#ifndef __USE_POSIX
19-
#define __USE_POSIX
20-
#endif
21-
#endif /* defined(PORTNAME_linux) */
2217
#include <setjmp.h>
2318

2419
#define BOOTSTRAP_INCLUDE /* mask out stuff in tcop/tcopprot.h */
@@ -136,11 +131,9 @@ static char *relname; /* current relation name */
136131
AttributeTupleForm attrtypes[MAXATTR]; /* points to attribute info */
137132
static char *values[MAXATTR]; /* cooresponding attribute values */
138133
int numattr; /* number of attributes for cur. rel */
139-
#ifdef OPENLINK_PATCHES
140134
extern int fsyncOff; /* do not fsync the database */
141-
#endif
142135

143-
#if defined(WIN32) || defined(PORTNAME_next)
136+
#ifdef NEED_SIG_JMP
144137
static jmp_buf Warn_restart;
145138
#define sigsetjmp(x,y) setjmp(x)
146139
#define siglongjmp longjmp
@@ -198,17 +191,11 @@ void err_out()
198191
*/
199192
static void
200193
usage()
201-
{
202-
#ifdef OPENLINK_PATCHES
203-
fprintf(stderr,"Usage: postgres -boot [-d] [-C] [-F] [-O] [-Q] [-P portno] [dbName]\n");
204-
#else
205-
fprintf(stderr,"Usage: postgres -boot [-d] [-C] [-O] [-Q] [-P portno] [dbName]\n");
206-
#endif
194+
fprintf(stderr,"Usage: postgres -boot [-d] [-C] [-F] [-O] [-Q] ");
195+
fprintf(stderr,"[-P portno] [dbName]\n");
207196
fprintf(stderr," d: debug mode\n");
208197
fprintf(stderr," C: disable version checking\n");
209-
#ifdef OPENLINK_PATCHES
210198
fprintf(stderr," F: turn off fsync\n");
211-
#endif
212199
fprintf(stderr," O: set BootstrapProcessing mode\n");
213200
fprintf(stderr," P portno: specify port number\n");
214201

@@ -245,10 +232,10 @@ BootstrapMain(int argc, char *argv[])
245232
* ----------------
246233
*/
247234
signal(SIGINT, (sig_func) die);
248-
#ifndef WIN32
235+
#ifndef win32
249236
signal(SIGHUP, (sig_func) die);
250237
signal(SIGTERM, (sig_func) die);
251-
#endif /* WIN32 */
238+
#endif /* win32 */
252239

253240
/* --------------------
254241
* initialize globals
@@ -265,23 +252,17 @@ BootstrapMain(int argc, char *argv[])
265252
Noversion = 0;
266253
dbName = NULL;
267254

268-
#ifdef OPENLINK_PATCHES
269255
while ((flag = getopt(argc, argv, "dCOQP:F")) != EOF) {
270-
#else
271-
while ((flag = getopt(argc, argv, "dCOQP")) != EOF) {
272-
#endif
273256
switch (flag) {
274257
case 'd':
275258
DebugMode = 1; /* print out debuggin info while parsing */
276259
break;
277260
case 'C':
278261
Noversion = 1;
279262
break;
280-
#ifdef OPENLINK_PATCHES
281263
case 'F':
282264
fsyncOff = 1;
283265
break;
284-
#endif
285266
case 'O':
286267
override = true;
287268
break;
@@ -322,10 +303,10 @@ BootstrapMain(int argc, char *argv[])
322303
exitpg(1);
323304
}
324305

325-
#ifdef WIN32
306+
#ifdef win32
326307
_nt_init();
327308
_nt_attach();
328-
#endif /* WIN32 */
309+
#endif /* win32 */
329310

330311

331312
/* ----------------
@@ -349,13 +330,13 @@ BootstrapMain(int argc, char *argv[])
349330
* abort processing resumes here - What to do in WIN32?
350331
* ----------------
351332
*/
352-
#ifndef WIN32
333+
#ifndef win32
353334
signal(SIGHUP, handle_warn);
354335

355336
if (sigsetjmp(Warn_restart, 1) != 0) {
356337
#else
357338
if (setjmp(Warn_restart) != 0) {
358-
#endif /* WIN32 */
339+
#endif /* win32 */
359340
Warnings++;
360341
AbortCurrentTransaction();
361342
}

0 commit comments

Comments
 (0)