Bug 804441: Put our NSPR and NSS header wrappers before OS_INCLUDES, r=ted

This allows inline functions in headers to call NSPR/NSS functions without
causing linking errors.

--HG--
extra : rebase_source : f89df8a53d6e8f624c84fc3b84982c4dd92d5f38
This commit is contained in:
Brian Smith 2012-10-24 14:31:54 -07:00
parent 21403f44c5
commit a61e92f320
4 changed files with 8 additions and 10 deletions

View File

@ -374,14 +374,17 @@ JAVA_GEN_DIR = _javagen
JAVA_DIST_DIR = $(DEPTH)/$(JAVA_GEN_DIR)
JAVA_IFACES_PKG_NAME = org/mozilla/interfaces
OS_INCLUDES += $(NSPR_CFLAGS) $(NSS_CFLAGS) $(MOZ_JPEG_CFLAGS) $(MOZ_PNG_CFLAGS) $(MOZ_ZLIB_CFLAGS)
OS_INCLUDES += $(MOZ_JPEG_CFLAGS) $(MOZ_PNG_CFLAGS) $(MOZ_ZLIB_CFLAGS)
# NSPR_CFLAGS and NSS_CFLAGS must appear ahead of OS_INCLUDES to avoid Linux
# builds wrongly picking up system NSPR/NSS header files.
INCLUDES = \
$(LOCAL_INCLUDES) \
-I$(srcdir) \
-I. \
-I$(DIST)/include \
$(if $(LIBXUL_SDK),-I$(LIBXUL_SDK)/include) \
$(NSPR_CFLAGS) $(NSS_CFLAGS) \
$(OS_INCLUDES) \
$(NULL)

View File

@ -374,14 +374,17 @@ JAVA_GEN_DIR = _javagen
JAVA_DIST_DIR = $(DEPTH)/$(JAVA_GEN_DIR)
JAVA_IFACES_PKG_NAME = org/mozilla/interfaces
OS_INCLUDES += $(NSPR_CFLAGS) $(NSS_CFLAGS) $(MOZ_JPEG_CFLAGS) $(MOZ_PNG_CFLAGS) $(MOZ_ZLIB_CFLAGS)
OS_INCLUDES += $(MOZ_JPEG_CFLAGS) $(MOZ_PNG_CFLAGS) $(MOZ_ZLIB_CFLAGS)
# NSPR_CFLAGS and NSS_CFLAGS must appear ahead of OS_INCLUDES to avoid Linux
# builds wrongly picking up system NSPR/NSS header files.
INCLUDES = \
$(LOCAL_INCLUDES) \
-I$(srcdir) \
-I. \
-I$(DIST)/include \
$(if $(LIBXUL_SDK),-I$(LIBXUL_SDK)/include) \
$(NSPR_CFLAGS) $(NSS_CFLAGS) \
$(OS_INCLUDES) \
$(NULL)

View File

@ -95,9 +95,5 @@ EXPORTS += \
ScopedNSSTypes.h \
$(NULL)
# Use local includes because they are inserted before INCLUDES
# so that Mozilla's nss.h is used, not glibc's
LOCAL_INCLUDES += $(NSS_CFLAGS)
include $(topsrcdir)/config/rules.mk

View File

@ -18,10 +18,6 @@ PROGRAM = ssltunnel$(BIN_SUFFIX)
CPPSRCS = ssltunnel.cpp
# Use local includes because they are inserted before INCLUDES
# so that Mozilla's nss.h is used, not glibc's
LOCAL_INCLUDES += $(NSPR_CFLAGS) $(NSS_CFLAGS)
LIBS = \
$(NSPR_LIBS) \
$(NSS_LIBS) \