diff options
author | athenian200 <athenian200@outlook.com> | 2019-10-02 18:26:54 -0500 |
---|---|---|
committer | athenian200 <athenian200@outlook.com> | 2019-10-21 04:53:42 -0500 |
commit | fca7c45a62542e0f625122222386cbee9b76243f (patch) | |
tree | da70360cfbda49a229277009b2170b47033de16f /security/nss/lib/dbm/src/h_func.c | |
parent | 4f6639a1b35d4941f52eb4c8901adf45b35bc10d (diff) | |
download | UXP-fca7c45a62542e0f625122222386cbee9b76243f.tar UXP-fca7c45a62542e0f625122222386cbee9b76243f.tar.gz UXP-fca7c45a62542e0f625122222386cbee9b76243f.tar.lz UXP-fca7c45a62542e0f625122222386cbee9b76243f.tar.xz UXP-fca7c45a62542e0f625122222386cbee9b76243f.zip |
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.
Diffstat (limited to 'security/nss/lib/dbm/src/h_func.c')
-rw-r--r-- | security/nss/lib/dbm/src/h_func.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/nss/lib/dbm/src/h_func.c b/security/nss/lib/dbm/src/h_func.c index 0d8734e8b..897060992 100644 --- a/security/nss/lib/dbm/src/h_func.c +++ b/security/nss/lib/dbm/src/h_func.c @@ -52,7 +52,7 @@ static uint32 hash3(const void *, size_t); static uint32 hash4(const void *, size_t); /* Global default hash function */ -uint32 (*__default_hash)(const void *, size_t) = hash4; +uint32 (*dbm_default_hash)(const void *, size_t) = hash4; /* * HASH FUNCTIONS @@ -205,3 +205,4 @@ hash4(const void *keyarg, register size_t len) } return (h); } + |