mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
Bracket #define sigsetjmp() to avoid redefinition. Linux starts out with
sigsetjmp as a macro, so gives compiler warning without bracketing.
This commit is contained in:
@ -7,7 +7,7 @@
|
|||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.29 1997/11/24 05:08:01 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.30 1998/01/01 05:40:28 thomas Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -199,14 +199,20 @@ static char *values[MAXATTR]; /* cooresponding attribute values */
|
|||||||
int numattr; /* number of attributes for cur. rel */
|
int numattr; /* number of attributes for cur. rel */
|
||||||
extern int fsyncOff; /* do not fsync the database */
|
extern int fsyncOff; /* do not fsync the database */
|
||||||
|
|
||||||
#ifndef HAVE_SIGSETJMP
|
/* The test for HAVE_SIGSETJMP fails on Linux 2.0.x because the test
|
||||||
static jmp_buf Warn_restart;
|
* explicitly disallows sigsetjmp being a #define, which is how it
|
||||||
|
* is declared in Linux. So, to avoid compiler warnings about
|
||||||
|
* sigsetjmp() being redefined, let's not redefine unless necessary.
|
||||||
|
* - thomas 1997-12-27
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if !defined(HAVE_SIGSETJMP) && !defined(sigsetjmp)
|
||||||
|
static jmp_buf Warn_restart;
|
||||||
#define sigsetjmp(x,y) setjmp(x)
|
#define sigsetjmp(x,y) setjmp(x)
|
||||||
#define siglongjmp longjmp
|
#define siglongjmp longjmp
|
||||||
|
|
||||||
#else
|
#else
|
||||||
static sigjmp_buf Warn_restart;
|
static sigjmp_buf Warn_restart;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int DebugMode;
|
int DebugMode;
|
||||||
|
Reference in New Issue
Block a user