Ticket #1811: firefox-1.5.0.1-system_nss-1.patch
File firefox-1.5.0.1-system_nss-1.patch, 18.3 KB (added by , 18 years ago) |
---|
-
aclocal.m4
Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org> Date: 2006-01-20 Initial Package Version: 1.5 Upstream Status: Unknown Origin: Fedora CVS Rediffed against firefox 1.5.0.1 by Chris Staub. Description: Fixes the --use-system-nss and --with-nss-prefix switches so that they actually work. This patch allows the Mozilla products to use the system installed versions of NSS and NSPR. diff -Naur mozilla.orig/aclocal.m4 mozilla/aclocal.m4
old new 8 8 builtin(include, build/autoconf/libIDL.m4)dnl 9 9 builtin(include, build/autoconf/libIDL-2.m4)dnl 10 10 builtin(include, build/autoconf/nspr.m4)dnl 11 builtin(include, build/autoconf/nss.m4)dnl 11 12 builtin(include, build/autoconf/libart.m4)dnl 12 13 builtin(include, build/autoconf/pkg.m4)dnl 13 14 builtin(include, build/autoconf/freetype2.m4)dnl -
build/autoconf/nss.m4
diff -Naur mozilla.orig/build/autoconf/nss.m4 mozilla/build/autoconf/nss.m4
old new 1 # -*- tab-width: 4; -*- 2 # Configure paths for NSS 3 # Public domain - Chris Seawood <cls@seawood.org> 2001-04-05 4 # Based upon gtk.m4 (also PD) by Owen Taylor 5 6 dnl AM_PATH_NSS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) 7 dnl Test for NSS, and define NSS_CFLAGS and NSS_LIBS 8 AC_DEFUN(AM_PATH_NSS, 9 [dnl 10 11 AC_ARG_WITH(nss-prefix, 12 [ --with-nss-prefix=PFX Prefix where NSS is installed], 13 nss_config_prefix="$withval", 14 nss_config_prefix="") 15 16 AC_ARG_WITH(nss-exec-prefix, 17 [ --with-nss-exec-prefix=PFX 18 Exec prefix where NSS is installed], 19 nss_config_exec_prefix="$withval", 20 nss_config_exec_prefix="") 21 22 if test -n "$nss_config_exec_prefix"; then 23 nss_config_args="$nss_config_args --exec-prefix=$nss_config_exec_prefix" 24 if test -z "$NSS_CONFIG"; then 25 NSS_CONFIG=$nss_config_exec_prefix/bin/nss-config 26 fi 27 fi 28 if test -n "$nss_config_prefix"; then 29 nss_config_args="$nss_config_args --prefix=$nss_config_prefix" 30 if test -z "$NSS_CONFIG"; then 31 NSS_CONFIG=$nss_config_prefix/bin/nss-config 32 fi 33 fi 34 35 unset ac_cv_path_NSS_CONFIG 36 AC_PATH_PROG(NSS_CONFIG, nss-config, no) 37 min_nss_version=ifelse([$1], ,3.0.0,$1) 38 AC_MSG_CHECKING(for NSS - version >= $min_nss_version (skipping)) 39 40 no_nss="" 41 if test "$NSS_CONFIG" = "no"; then 42 no_nss="yes" 43 else 44 NSS_CFLAGS=`$NSS_CONFIG $nss_config_args --cflags` 45 NSS_LIBS=`$NSS_CONFIG $nss_config_args --libs` 46 47 dnl Skip version check for now 48 nss_config_major_version=`$NSS_CONFIG $nss_config_args --version | \ 49 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` 50 nss_config_minor_version=`$NSS_CONFIG $nss_config_args --version | \ 51 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` 52 nss_config_micro_version=`$NSS_CONFIG $nss_config_args --version | \ 53 sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` 54 fi 55 56 if test -z "$no_nss"; then 57 AC_MSG_RESULT(yes) 58 ifelse([$2], , :, [$2]) 59 else 60 AC_MSG_RESULT(no) 61 fi 62 63 64 AC_SUBST(NSS_CFLAGS) 65 AC_SUBST(NSS_LIBS) 66 67 ]) -
config/autoconf.mk.in
diff -Naur mozilla.orig/config/autoconf.mk.in mozilla/config/autoconf.mk.in
old new 229 229 MOZ_INSURE_EXCLUDE_DIRS = @MOZ_INSURE_EXCLUDE_DIRS@ 230 230 231 231 MOZ_NATIVE_NSPR = @MOZ_NATIVE_NSPR@ 232 MOZ_NATIVE_NSS = @MOZ_NATIVE_NSS@ 232 233 233 234 CROSS_COMPILE = @CROSS_COMPILE@ 234 235 … … 384 385 NSPR_CFLAGS = @NSPR_CFLAGS@ 385 386 NSPR_LIBS = @NSPR_LIBS@ 386 387 388 NSS_CONFIG = @NSS_CONFIG@ 389 NSS_CFLAGS = @NSS_CFLAGS@ 390 NSS_LIBS = @NSS_LIBS@ 391 392 ifdef MOZ_NATIVE_NSS 393 NSS_DEP_LIBS = \ 394 $(NULL) 395 NSS_LIBS += \ 396 -lcrmf \ 397 $(NULL) 398 else 399 NSS_DEP_LIBS = \ 400 $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \ 401 $(DIST)/lib/$(DLL_PREFIX)smime3$(DLL_SUFFIX) \ 402 $(DIST)/lib/$(DLL_PREFIX)ssl3$(DLL_SUFFIX) \ 403 $(DIST)/lib/$(DLL_PREFIX)nss3$(DLL_SUFFIX) \ 404 $(DIST)/lib/$(DLL_PREFIX)softokn3$(DLL_SUFFIX) \ 405 $(NULL) 406 NSS_LIBS = \ 407 $(LIBS_DIR) \ 408 $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \ 409 -lsmime3 \ 410 -lssl3 \ 411 -lnss3 \ 412 -lsoftokn3 \ 413 $(NULL) 414 endif 415 416 ifneq (,$(filter OS2 WINNT WINCE, $(OS_ARCH))) 417 ifndef GNU_CC 418 ifndef MOZ_NATIVE_NSS 419 NSS_LIBS = \ 420 $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \ 421 $(DIST)/lib/$(LIB_PREFIX)smime3.$(IMPORT_LIB_SUFFIX) \ 422 $(DIST)/lib/$(LIB_PREFIX)ssl3.$(IMPORT_LIB_SUFFIX) \ 423 $(DIST)/lib/$(LIB_PREFIX)nss3.$(IMPORT_LIB_SUFFIX) \ 424 $(DIST)/lib/$(LIB_PREFIX)softokn3.$(IMPORT_LIB_SUFFIX) \ 425 $(NULL) 426 endif 427 endif 428 endif 429 387 430 LDAP_CFLAGS = @LDAP_CFLAGS@ 388 431 LDAP_LIBS = @LDAP_LIBS@ 389 432 XPCOM_GLUE_LDOPTS = @XPCOM_GLUE_LDOPTS@ -
config/config.mk
diff -Naur mozilla.orig/config/config.mk mozilla/config/config.mk
old new 138 138 FINAL_LINK_COMPS = $(DEPTH)/config/final-link-comps 139 139 FINAL_LINK_COMP_NAMES = $(DEPTH)/config/final-link-comp-names 140 140 141 #142 # NSS libs needed for final link in static build143 #144 145 NSS_LIBS = \146 $(LIBS_DIR) \147 $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \148 -lsmime3 \149 -lssl3 \150 -lnss3 \151 -lsoftokn3 \152 $(NULL)153 154 ifneq (,$(filter OS2 WINNT WINCE, $(OS_ARCH)))155 ifndef GNU_CC156 NSS_LIBS = \157 $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \158 $(DIST)/lib/$(LIB_PREFIX)smime3.$(IMPORT_LIB_SUFFIX) \159 $(DIST)/lib/$(LIB_PREFIX)ssl3.$(IMPORT_LIB_SUFFIX) \160 $(DIST)/lib/$(LIB_PREFIX)nss3.$(IMPORT_LIB_SUFFIX) \161 $(DIST)/lib/$(LIB_PREFIX)softokn3.$(IMPORT_LIB_SUFFIX) \162 $(NULL)163 endif164 endif165 166 NSS_DEP_LIBS = \167 $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \168 $(DIST)/lib/$(DLL_PREFIX)smime3$(DLL_SUFFIX) \169 $(DIST)/lib/$(DLL_PREFIX)ssl3$(DLL_SUFFIX) \170 $(DIST)/lib/$(DLL_PREFIX)nss3$(DLL_SUFFIX) \171 $(DIST)/lib/$(DLL_PREFIX)softokn3$(DLL_SUFFIX) \172 $(NULL)173 174 141 MOZ_UNICHARUTIL_LIBS = $(DIST)/lib/$(LIB_PREFIX)unicharutil_s.$(LIB_SUFFIX) 175 142 MOZ_REGISTRY_LIBS = $(DIST)/lib/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) 176 143 MOZ_WIDGET_SUPPORT_LIBS = $(DIST)/lib/$(LIB_PREFIX)widgetsupport_s.$(LIB_SUFFIX) -
configure
diff -Naur mozilla.orig/configure mozilla/configure
old new 44 44 --with-nspr-exec-prefix=PFX 45 45 Exec prefix where NSPR is installed" 46 46 ac_help="$ac_help 47 --with-system-nss Use system installed NSS" 48 ac_help="$ac_help 49 --with-nss-prefix=PFX Prefix where NSS is installed" 50 ac_help="$ac_help 51 --with-nss-exec-prefix=PFX 52 Exec prefix where NSS is installed" 53 ac_help="$ac_help 47 54 --with-system-jpeg[=PFX] 48 55 Use system libjpeg [installed at prefix PFX]" 49 56 ac_help="$ac_help … … 1023 1030 MOZPNG=10207 1024 1031 MOZZLIB=1.2.3 1025 1032 NSPR_VERSION=4 1033 NSS_VERSION=3 1026 1034 1027 1035 GLIB_VERSION=1.2.0 1028 1036 GTK_VERSION=1.2.0 … … 11308 11316 fi 11309 11317 fi 11310 11318 11319 11320 # Check whether --with-system-nss or --without-system-nss was given. 11321 if test "${with_system_nss+set}" = set; then 11322 withval="$with_system_nss" 11323 if test "$withval" = "yes"; then 11324 _USE_SYSTEM_NSS=1 11325 elif test "$withval" = "no"; then 11326 : 11327 else 11328 { echo "configure: error: Option, system-nss, does not take an argument ($withval)." 1>&2; exit 1; } 11329 fi 11330 fi 11331 11332 11333 if test -n "$_USE_SYSTEM_NSS"; then 11334 11335 # Check whether --with-nss-prefix or --without-nss-prefix was given. 11336 if test "${with_nss_prefix+set}" = set; then 11337 withval="$with_nss_prefix" 11338 nss_config_prefix="$withval" 11339 else 11340 nss_config_prefix="" 11341 fi 11342 11343 11344 # Check whether --with-nss-exec-prefix or --without-nss-exec-prefix was given. 11345 if test "${with_nss_exec_prefix+set}" = set; then 11346 withval="$with_nss_exec_prefix" 11347 nss_config_exec_prefix="$withval" 11348 else 11349 nss_config_exec_prefix="" 11350 fi 11351 11352 11353 if test -n "$nss_config_exec_prefix"; then 11354 nss_config_args="$nss_config_args --exec-prefix=$nss_config_exec_prefix" 11355 if test -z "$NSS_CONFIG"; then 11356 NSS_CONFIG=$nss_config_exec_prefix/bin/nss-config 11357 fi 11358 fi 11359 if test -n "$nss_config_prefix"; then 11360 nss_config_args="$nss_config_args --prefix=$nss_config_prefix" 11361 if test -z "$NSS_CONFIG"; then 11362 NSS_CONFIG=$nss_config_prefix/bin/nss-config 11363 fi 11364 fi 11365 11366 unset ac_cv_path_NSS_CONFIG 11367 # Extract the first word of "nss-config", so it can be a program name with args. 11368 set dummy nss-config; ac_word=$2 11369 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 11370 echo "configure:11363: checking for $ac_word" >&5 11371 if eval "test \"`echo '$''{'ac_cv_path_NSS_CONFIG'+set}'`\" = set"; then 11372 echo $ac_n "(cached) $ac_c" 1>&6 11373 else 11374 case "$NSS_CONFIG" in 11375 /*) 11376 ac_cv_path_NSS_CONFIG="$NSS_CONFIG" # Let the user override the test with a path. 11377 ;; 11378 ?:/*) 11379 ac_cv_path_NSS_CONFIG="$NSS_CONFIG" # Let the user override the test with a dos path. 11380 ;; 11381 *) 11382 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 11383 ac_dummy="$PATH" 11384 for ac_dir in $ac_dummy; do 11385 test -z "$ac_dir" && ac_dir=. 11386 if test -f $ac_dir/$ac_word; then 11387 ac_cv_path_NSS_CONFIG="$ac_dir/$ac_word" 11388 break 11389 fi 11390 done 11391 IFS="$ac_save_ifs" 11392 test -z "$ac_cv_path_NSS_CONFIG" && ac_cv_path_NSS_CONFIG="no" 11393 ;; 11394 esac 11395 fi 11396 NSS_CONFIG="$ac_cv_path_NSS_CONFIG" 11397 if test -n "$NSS_CONFIG"; then 11398 echo "$ac_t""$NSS_CONFIG" 1>&6 11399 else 11400 echo "$ac_t""no" 1>&6 11401 fi 11402 11403 min_nss_version=3.0.0 11404 echo $ac_n "checking for NSS - version >= $min_nss_version (skipping)""... $ac_c" 1>&6 11405 echo "configure:11398: checking for NSS - version >= $min_nss_version (skipping)" >&5 11406 11407 no_nss="" 11408 if test "$NSS_CONFIG" = "no"; then 11409 no_nss="yes" 11410 else 11411 NSS_CFLAGS=`$NSS_CONFIG $nss_config_args --cflags` 11412 NSS_LIBS=`$NSS_CONFIG $nss_config_args --libs` 11413 11414 nss_config_major_version=`$NSS_CONFIG $nss_config_args --version | \ 11415 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` 11416 nss_config_minor_version=`$NSS_CONFIG $nss_config_args --version | \ 11417 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` 11418 nss_config_micro_version=`$NSS_CONFIG $nss_config_args --version | \ 11419 sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` 11420 fi 11421 11422 if test -z "$no_nss"; then 11423 echo "$ac_t""yes" 1>&6 11424 MOZ_NATIVE_NSS=1 11425 else 11426 echo "$ac_t""no" 1>&6 11427 fi 11428 11429 11430 11431 11432 11433 11434 fi 11435 11311 11436 if test -z "$SKIP_LIBRARY_CHECKS"; then 11312 11437 # Check whether --with-system-jpeg or --without-system-jpeg was given. 11313 11438 if test "${with_system_jpeg+set}" = set; then … … 19491 19616 s%@NSPR_CONFIG@%$NSPR_CONFIG%g 19492 19617 s%@NSPR_CFLAGS@%$NSPR_CFLAGS%g 19493 19618 s%@NSPR_LIBS@%$NSPR_LIBS%g 19619 s%@NSS_CONFIG@%$NSS_CONFIG%g 19620 s%@NSS_CFLAGS@%$NSS_CFLAGS%g 19621 s%@NSS_LIBS@%$NSS_LIBS%g 19494 19622 s%@GTK_CONFIG@%$GTK_CONFIG%g 19495 19623 s%@GTK_CFLAGS@%$GTK_CFLAGS%g 19496 19624 s%@GTK_LIBS@%$GTK_LIBS%g … … 19771 19899 s%@MOZ_PNG_CFLAGS@%$MOZ_PNG_CFLAGS%g 19772 19900 s%@MOZ_PNG_LIBS@%$MOZ_PNG_LIBS%g 19773 19901 s%@MOZ_NATIVE_NSPR@%$MOZ_NATIVE_NSPR%g 19902 s%@MOZ_NATIVE_NSS@%$MOZ_NATIVE_NSS%g 19774 19903 s%@COMPILE_CFLAGS@%$COMPILE_CFLAGS%g 19775 19904 s%@COMPILE_CXXFLAGS@%$COMPILE_CXXFLAGS%g 19776 19905 s%@CROSS_COMPILE@%$CROSS_COMPILE%g -
configure.in
diff -Naur mozilla.orig/configure.in mozilla/configure.in
old new 86 86 MOZPNG=10207 87 87 MOZZLIB=1.2.3 88 88 NSPR_VERSION=4 89 NSS_VERSION=3 89 90 90 91 dnl Set the minimum version of toolkit libs used by mozilla 91 92 dnl ======================================================== … … 3491 3492 fi 3492 3493 fi 3493 3494 3495 dnl ======================================================== 3496 dnl = If NSS was not detected in the system, 3497 dnl = use the one in the source tree (mozilla/security/nss) 3498 dnl ======================================================== 3499 3500 MOZ_ARG_WITH_BOOL(system-nss, 3501 [ --with-system-nss Use system installed NSS], 3502 _USE_SYSTEM_NSS=1 ) 3503 3504 if test -n "$_USE_SYSTEM_NSS"; then 3505 AM_PATH_NSS(3.0.0, [MOZ_NATIVE_NSS=1], [MOZ_NATIVE_NSS=]) 3506 fi 3507 3494 3508 if test -z "$SKIP_LIBRARY_CHECKS"; then 3495 3509 dnl system JPEG support 3496 3510 dnl ======================================================== … … 6735 6749 AC_SUBST(NSPR_LIBS) 6736 6750 AC_SUBST(MOZ_NATIVE_NSPR) 6737 6751 6752 AC_SUBST(NSS_CFLAGS) 6753 AC_SUBST(NSS_LIBS) 6754 AC_SUBST(MOZ_NATIVE_NSS) 6755 6738 6756 AC_SUBST(CFLAGS) 6739 6757 AC_SUBST(CXXFLAGS) 6740 6758 AC_SUBST(CPPFLAGS) -
security/manager/Makefile.in
diff -Naur mozilla.orig/security/manager/Makefile.in mozilla/security/manager/Makefile.in
old new 46 46 MODULE = psm 47 47 48 48 PACKAGE_FILE = psm.pkg 49 50 ifndef MOZ_NATIVE_NSS 49 51 PACKAGE_VARS += \ 50 52 NSS3_LIB \ 51 53 SMIME3_LIB \ … … 57 59 $(NULL) 58 60 59 61 LOADABLE_ROOT_MODULE = $(DLL_PREFIX)nssckbi$(DLL_SUFFIX) 62 endif 60 63 61 64 NSS3_LIB = $(DLL_PREFIX)nss3$(DLL_SUFFIX) 62 65 SMIME3_LIB = $(DLL_PREFIX)smime3$(DLL_SUFFIX) … … 150 153 export:: .nss.cleaned 151 154 152 155 .nss.cleaned: .nss.checkout 156 ifndef MOZ_NATIVE_NSS 153 157 $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) clean 154 158 $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) clean 155 159 ifndef SKIP_CHK … … 157 161 $(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS) clean 158 162 endif 159 163 touch $@ 164 endif 160 165 161 166 .nss.checkout: 167 ifndef MOZ_NATIVE_NSS 162 168 touch $(srcdir)/$@ 169 endif 163 170 164 171 dependclean export packages chrome:: 165 172 $(MAKE) -C boot $@ … … 170 177 endif 171 178 172 179 libs:: 180 ifndef MOZ_NATIVE_NSS 173 181 $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) 182 endif 174 183 ifeq ($(OS_ARCH),WINNT) 175 184 cd $(DIST)/lib; cp -f $(LIB_PREFIX)dbm$(MOZ_BITS).$(LIB_SUFFIX) $(LIB_PREFIX)dbm.$(LIB_SUFFIX) 176 185 else 177 186 cd $(DIST)/lib; cp -f $(LIB_PREFIX)mozdbm_s.$(LIB_SUFFIX) $(LIB_PREFIX)dbm.$(LIB_SUFFIX); $(RANLIB) $(LIB_PREFIX)dbm.$(LIB_SUFFIX) 178 187 endif 188 ifndef MOZ_NATIVE_NSS 179 189 $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) 180 190 ifndef SKIP_CHK 181 191 $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) … … 213 223 $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_HYBRID_MODULE) $(DIST)/bin 214 224 endif 215 225 endif 226 endif 216 227 $(MAKE) -C boot $@ 217 228 $(MAKE) -C ssl $@ 218 229 $(MAKE) -C locales $@ … … 221 232 endif 222 233 223 234 install:: 235 ifndef MOZ_NATIVE_NSS 224 236 $(SYSINSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE) $(DESTDIR)$(mozappdir) 225 237 ifndef SKIP_CHK 226 238 $(SYSINSTALL) -m 644 $(DIST)/lib/$(SOFTOKEN3_CHK) $(DESTDIR)$(mozappdir) … … 235 247 $(SYSINSTALL) -m 644 $(DIST)/lib/$(FREEBL_HYBRID_CHK) $(DESTDIR)$(mozappdir) 236 248 $(SYSINSTALL) -m 755 $(DIST)/lib/$(FREEBL_HYBRID_MODULE) $(DESTDIR)$(mozappdir) 237 249 endif 250 endif 238 251 $(MAKE) -C boot $@ 239 252 $(MAKE) -C ssl $@ 240 253 $(MAKE) -C locales $@ … … 249 262 ifdef MOZ_XUL 250 263 $(MAKE) -C pki $@ 251 264 endif 265 ifndef MOZ_NATIVE_NSS 252 266 $(MAKE) -C $(topsrcdir)/security/coreconf $(DEFAULT_GMAKE_FLAGS) clean 253 267 $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) clean 254 268 ifndef SKIP_CHK 255 269 $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) clean 256 270 $(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS) clean 257 271 endif 272 endif 258 273 259 274 echo-requires-recursive:: 260 275 $(MAKE) -C boot $@ 261 276 $(MAKE) -C ssl $@ 262 277 $(MAKE) -C pki $@ 263 278 $(MAKE) -C locales $@ 279 -
security/manager/ssl/src/Makefile.in
diff -Naur mozilla.orig/security/manager/ssl/src/Makefile.in mozilla/security/manager/ssl/src/Makefile.in
old new 123 123 124 124 # Use local includes because they are inserted before INCLUDES 125 125 # so that Mozilla's nss.h is used, not glibc's 126 ifdef MOZ_NATIVE_NSS 127 LOCAL_INCLUDES += $(NSS_CFLAGS) \ 128 $(NULL) 129 else 126 130 LOCAL_INCLUDES += -I$(DIST)/public/nss \ 127 131 $(NULL) 132 endif 128 133 129 134 EXTRA_DSO_LDOPTS += \ 130 135 $(MOZ_UNICHARUTIL_LIBS) \ -
security/manager/ssl/src/nsNSSComponent.cpp
diff -Naur mozilla.orig/security/manager/ssl/src/nsNSSComponent.cpp mozilla/security/manager/ssl/src/nsNSSComponent.cpp
old new 488 488 } 489 489 490 490 491 #ifdef XP_MAC492 #ifdef DEBUG493 #define LOADABLE_CERTS_MODULE NS_LITERAL_CSTRING("NSSckbiDebug.shlb")494 #else495 #define LOADABLE_CERTS_MODULE NS_LITERAL_CSTRING("NSSckbi.shlb")496 #endif /*DEBUG*/497 #endif /*XP_MAC*/498 499 491 static void setOCSPOptions(nsIPrefBranch * pref); 500 492 501 493 NS_IMETHODIMP … … 689 681 690 682 const char *possible_ckbi_locations[] = { 691 683 NS_GRE_DIR, 692 NS_XPCOM_CURRENT_PROCESS_DIR 684 NS_XPCOM_CURRENT_PROCESS_DIR, 685 0 693 686 }; 694 687 695 688 for (size_t il = 0; il < sizeof(possible_ckbi_locations)/sizeof(const char*); ++il) { 696 689 nsCOMPtr<nsILocalFile> mozFile; 697 directoryService->Get( possible_ckbi_locations[il], 698 NS_GET_IID(nsILocalFile), 699 getter_AddRefs(mozFile)); 690 char *fullModuleName = nsnull; 691 692 if (!possible_ckbi_locations[il]) 693 { 694 fullModuleName = PR_GetLibraryName(nsnull, "nssckbi"); 695 } 696 else 697 { 698 directoryService->Get( possible_ckbi_locations[il], 699 NS_GET_IID(nsILocalFile), 700 getter_AddRefs(mozFile)); 700 701 701 if (!mozFile) { 702 continue; 702 if (!mozFile) { 703 continue; 704 } 705 706 nsCAutoString processDir; 707 mozFile->GetNativePath(processDir); 708 fullModuleName = PR_GetLibraryName(processDir.get(), "nssckbi"); 703 709 } 704 710 705 char *fullModuleName = nsnull;706 #ifdef XP_MAC707 nsCAutoString nativePath;708 mozFile->AppendNative(NS_LITERAL_CSTRING("Essential Files"));709 mozFile->AppendNative(LOADABLE_CERTS_MODULE);710 mozFile->GetNativePath(nativePath);711 fullModuleName = (char *) nativePath.get();712 #else713 nsCAutoString processDir;714 mozFile->GetNativePath(processDir);715 fullModuleName = PR_GetLibraryName(processDir.get(), "nssckbi");716 #endif717 711 /* If a module exists with the same name, delete it. */ 718 712 NS_ConvertUCS2toUTF8 modNameUTF8(modName); 719 713 int modType; 720 714 SECMOD_DeleteModule(NS_CONST_CAST(char*, modNameUTF8.get()), &modType); 721 715 SECStatus rv_add = 722 716 SECMOD_AddNewModule(NS_CONST_CAST(char*, modNameUTF8.get()), fullModuleName, 0, 0); 723 #ifndef XP_MAC 724 PR_Free(fullModuleName); // allocated by NSPR 725 #endif 717 PR_FreeLibraryName(fullModuleName); // allocated by NSPR 726 718 if (SECSuccess == rv_add) { 727 719 // found a module, no need to try other directories 728 720 break;