Jon Trulson <j...@radscan.com> writes:
> I can add this, but for safety/clarity, can you change the comparison from:
>
> #if __SUNPRO_CC == 0x5100
>
> to
>
> #if defined(__SUNPRO_CC) && __SUNPRO_CC == 0x5100
>
> This is a little clearer and won't emit warnings under -Wundef on
> non-studio c compilers...
Certainly!
-- Matthew R. Trower
>From f1885df8e56ec40d3b7bac1cd04e8414fdd291ee Mon Sep 17 00:00:00 2001
From: "Matthew R. Trower" <d...@blackshard.net>
Date: Wed, 13 Jun 2018 22:16:14 -0500
Subject: [PATCH] nsgml: Resolve symbol collision when building with SunStudio
12.1
---
cde/programs/nsgmls/Ptr.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/cde/programs/nsgmls/Ptr.h b/cde/programs/nsgmls/Ptr.h
index d8f2970a..24baf063 100644
--- a/cde/programs/nsgmls/Ptr.h
+++ b/cde/programs/nsgmls/Ptr.h
@@ -93,7 +93,14 @@ public:
const T &operator*() const { return *Ptr<T>::pointer(); }
void swap(ConstPtr<T> &p) { Ptr<T>::swap(p); }
using Ptr<T>::isNull;
+
+#if defined(__SUNPRO_CC) && __SUNPRO_CC == 0x5100
+ /* Needed to avoid symbol export collision */
+ void clear() { Ptr<T>::clear(); }
+#else
using Ptr<T>::clear;
+#endif
+
Boolean operator==(const Ptr<T> &p) const { return Ptr<T>::operator==(p); }
Boolean operator!=(const Ptr<T> &p) const { return Ptr<T>::operator!=(p); }
Boolean operator==(const ConstPtr<T> &p) const {
--
2.16.2
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel