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

Commit 1ac6d46

Browse files
author
Thomas G. Lockhart
committed
Bracket #define sigsetjmp() to avoid redefinition. Linux starts out with
sigsetjmp as a macro, so gives compiler warning without bracketing.
1 parent b180144 commit 1ac6d46

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/backend/bootstrap/bootstrap.c

+10-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.29 1997/11/24 05:08:01 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.30 1998/01/01 05:40:28 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -199,14 +199,20 @@ static char *values[MAXATTR]; /* cooresponding attribute values */
199199
int numattr; /* number of attributes for cur. rel */
200200
extern int fsyncOff; /* do not fsync the database */
201201

202-
#ifndef HAVE_SIGSETJMP
203-
static jmp_buf Warn_restart;
202+
/* The test for HAVE_SIGSETJMP fails on Linux 2.0.x because the test
203+
* explicitly disallows sigsetjmp being a #define, which is how it
204+
* is declared in Linux. So, to avoid compiler warnings about
205+
* sigsetjmp() being redefined, let's not redefine unless necessary.
206+
* - thomas 1997-12-27
207+
*/
204208

209+
#if !defined(HAVE_SIGSETJMP) && !defined(sigsetjmp)
210+
static jmp_buf Warn_restart;
205211
#define sigsetjmp(x,y) setjmp(x)
206212
#define siglongjmp longjmp
213+
207214
#else
208215
static sigjmp_buf Warn_restart;
209-
210216
#endif
211217

212218
int DebugMode;

0 commit comments

Comments
 (0)