From fca7c45a62542e0f625122222386cbee9b76243f Mon Sep 17 00:00:00 2001 From: athenian200 Date: Wed, 2 Oct 2019 18:26:54 -0500 Subject: MoonchildProductions#1251 - Part 16: Resolve namespace conflicts with dbm on Solaris. https://bugzilla.mozilla.org/show_bug.cgi?id=1513913 Mozilla's solution to this is arguably overkill, since the namespace issue on Solaris only required them to change (or temporarily undefine) __log2. Instead they changed ALL the functions to be something along the lines of dbm_log2. They haven't changed the external interface at all, though. If you're unhappy with this patch, I think I could also use XP_SOLARIS ifdefs to undefine __log2 prior to where it's declared in the dbm headers. The good thing about Mozilla's solution is that it guarantees this namespace issue never occurs again on any platform, though. --- security/nss/lib/dbm/include/ncompat.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'security/nss/lib/dbm/include/ncompat.h') diff --git a/security/nss/lib/dbm/include/ncompat.h b/security/nss/lib/dbm/include/ncompat.h index 9fd434799..f9f631622 100644 --- a/security/nss/lib/dbm/include/ncompat.h +++ b/security/nss/lib/dbm/include/ncompat.h @@ -89,13 +89,13 @@ typedef unsigned int sigset_t; #define SIG_UNBLOCK 2 #define SIG_SETMASK 3 -static int __sigtemp; /* For the use of sigprocmask */ +static int dbm_sigtemp; /* For the use of sigprocmask */ /* Repeated test of oset != NULL is to avoid "*0". */ #define sigprocmask(how, set, oset) \ - ((__sigtemp = \ + ((dbm_sigtemp = \ (((how) == SIG_BLOCK) ? sigblock(0) | *(set) : (((how) == SIG_UNBLOCK) ? sigblock(0) & ~(*(set)) : ((how) == SIG_SETMASK ? *(set) : sigblock(0))))), \ - ((oset) ? (*(oset ? oset : set) = sigsetmask(__sigtemp)) : sigsetmask(__sigtemp)), 0) + ((oset) ? (*(oset ? oset : set) = sigsetmask(dbm_sigtemp)) : sigsetmask(dbm_sigtemp)), 0) #endif /* -- cgit v1.2.3