From 1ac6d462b2062041e5bb139181f4ce9cccd7327a Mon Sep 17 00:00:00 2001
From: "Thomas G. Lockhart" <lockhart@fourpalms.org>
Date: Thu, 1 Jan 1998 05:40:28 +0000
Subject: [PATCH] Bracket #define sigsetjmp() to avoid redefinition.  Linux
 starts out with  sigsetjmp as a macro, so gives compiler warning without
 bracketing.

---
 src/backend/bootstrap/bootstrap.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index 0e0c071db82..e620b3fdbac 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -7,7 +7,7 @@
  * Copyright (c) 1994, Regents of the University of California
  *
  * 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 */
 extern int	fsyncOff;			/* do not fsync the database */
 
-#ifndef HAVE_SIGSETJMP
-static jmp_buf Warn_restart;
+/* The test for HAVE_SIGSETJMP fails on Linux 2.0.x because the test
+ *  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 siglongjmp longjmp
+
 #else
 static sigjmp_buf Warn_restart;
-
 #endif
 
 int			DebugMode;
-- 
GitLab