Skip to content

Commit

Permalink
Bug 1629553 Prefix pk11wrap (SHLIB|LIBRARY)_VERSION with NSS_ r=rrelyea
Browse files Browse the repository at this point in the history
In the manifest.mn the LIBRARY_VERSION is normally used to define
the major version of the build shared library. This ust works for
the pk11wrap case, because pk11wrap is a static library. But it's
still very confusing when reading the manifest.mn. Also the
referenced define in the code is just named SHLIB_VERSION.

So this prefixes the defines and the variables with NSS_, because
it tries to load the NSS library, just as the SOFTOKEN_.*_VERSION
is used to load the versioned softokn library.

Differential Revision: https://phabricator.services.mozilla.com/D70689

--HG--
extra : moz-landing-system : lando
  • Loading branch information
jmglogow committed May 5, 2020
1 parent 58e8502 commit 05d292c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/pk11wrap/manifest.mn
Expand Up @@ -49,10 +49,10 @@ CSRCS = \

LIBRARY_NAME = pk11wrap

LIBRARY_VERSION = 3
NSS_LIBRARY_VERSION = 3
SOFTOKEN_LIBRARY_VERSION = 3
DEFINES += -DSHLIB_SUFFIX=\"$(DLL_SUFFIX)\" -DSHLIB_PREFIX=\"$(DLL_PREFIX)\" \
-DSHLIB_VERSION=\"$(LIBRARY_VERSION)\" \
-DNSS_SHLIB_VERSION=\"$(NSS_LIBRARY_VERSION)\" \
-DSOFTOKEN_SHLIB_VERSION=\"$(SOFTOKEN_LIBRARY_VERSION)\"

# only add module debugging in opt builds if DEBUG_PKCS11 is set
Expand Down
2 changes: 1 addition & 1 deletion lib/pk11wrap/pk11load.c
Expand Up @@ -355,7 +355,7 @@ SECMOD_SetRootCerts(PK11SlotInfo *slot, SECMODModule *mod)

#ifndef NSS_STATIC_SOFTOKEN
static const char *my_shlib_name =
SHLIB_PREFIX "nss" SHLIB_VERSION "." SHLIB_SUFFIX;
SHLIB_PREFIX "nss" NSS_SHLIB_VERSION "." SHLIB_SUFFIX;
static const char *softoken_shlib_name =
SHLIB_PREFIX "softokn" SOFTOKEN_SHLIB_VERSION "." SHLIB_SUFFIX;
static const PRCallOnceType pristineCallOnce;
Expand Down
2 changes: 1 addition & 1 deletion lib/pk11wrap/pk11wrap.gyp
Expand Up @@ -60,7 +60,7 @@
'defines': [
'SHLIB_SUFFIX=\"<(dll_suffix)\"',
'SHLIB_PREFIX=\"<(dll_prefix)\"',
'SHLIB_VERSION=\"3\"',
'NSS_SHLIB_VERSION=\"3\"',
'SOFTOKEN_SHLIB_VERSION=\"3\"'
]
},
Expand Down

0 comments on commit 05d292c

Please sign in to comment.