From 86c5a2f98695b8e873755fb525d9fc6f514757b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Fri, 7 Jul 2000 21:27:12 +0200
Subject: [PATCH] Support for Solaris 2.5.1.

Rev: src/encode.c:1.62
---
 src/encode.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/encode.c b/src/encode.c
index a2786c7032..b2f95fb236 100644
--- a/src/encode.c
+++ b/src/encode.c
@@ -25,7 +25,7 @@
 #include "version.h"
 #include "bignum.h"
 
-RCSID("$Id: encode.c,v 1.61 2000/07/07 01:27:16 hubbe Exp $");
+RCSID("$Id: encode.c,v 1.62 2000/07/07 19:27:12 grubba Exp $");
 
 /* #define ENCODE_DEBUG */
 
@@ -35,6 +35,12 @@ RCSID("$Id: encode.c,v 1.61 2000/07/07 01:27:16 hubbe Exp $");
 #define EDB(X)
 #endif
 
+/* The sp macro conflicts with Solaris 2.5.1's <sys/conf.h>. */
+#ifdef sp
+#undef sp
+#define STACKPOINTER_WAS_DEFINED
+#endif /* sp */
+
 #ifdef _AIX
 #include <net/nh.h>
 #endif
@@ -45,6 +51,12 @@ RCSID("$Id: encode.c,v 1.61 2000/07/07 01:27:16 hubbe Exp $");
 
 #include <math.h>
 
+/* Restore the sp macro */
+#ifdef STACKPOINTER_WAS_DEFINED
+#define sp Pike_sp
+#undef STACK_POINTER_WAS_DEFINED
+#endif /* STACKPOINTER_WAS_DEFINED */
+
 #ifdef HAVE_FREXP
 #define FREXP frexp
 #else
-- 
GitLab