Bug 1128413, Part 4: Fix warnings in mozilla-config.h and gcc-stl-wrapper.template.h, r=glandium

This commit is contained in:
Brian Smith 2015-02-02 17:35:19 -08:00
parent 5c3f56a357
commit 21d66c0293
6 changed files with 24 additions and 16 deletions

View File

@ -10,7 +10,7 @@
// For some reason, Apple's GCC refuses to honor -fno-exceptions when
// compiling ObjC.
#if __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS)
#if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS)
# error "STL code can only be used with -fno-exceptions"
#endif

View File

@ -622,8 +622,8 @@ See https://developer.mozilla.org/en/Windows_Build_Prerequisites.])
])
if test "$ac_cv_have_dllimport_exception_bug" = "no"; then
WRAP_STL_INCLUDES=1
MOZ_MSVC_STL_WRAP__Throw=1
AC_DEFINE(MOZ_MSVC_STL_WRAP__Throw)
MOZ_MSVC_STL_WRAP_Throw=1
AC_DEFINE(MOZ_MSVC_STL_WRAP_Throw)
fi
else
AC_CACHE_CHECK(for overridable _RAISE,
@ -646,8 +646,8 @@ See https://developer.mozilla.org/en/Windows_Build_Prerequisites.])
])
if test "$ac_cv_have__RAISE" = "yes"; then
WRAP_STL_INCLUDES=1
MOZ_MSVC_STL_WRAP__RAISE=1
AC_DEFINE(MOZ_MSVC_STL_WRAP__RAISE)
MOZ_MSVC_STL_WRAP_RAISE=1
AC_DEFINE(MOZ_MSVC_STL_WRAP_RAISE)
else
AC_MSG_ERROR([Gecko exception wrapping doesn't understand your your MSVC/SDK. Please file a bug describing this error and your build configuration.])
fi
@ -767,8 +767,8 @@ AC_SUBST(INTEL_CXX)
AC_SUBST(STL_FLAGS)
AC_SUBST(WRAP_STL_INCLUDES)
AC_SUBST(MOZ_MSVC_STL_WRAP__Throw)
AC_SUBST(MOZ_MSVC_STL_WRAP__RAISE)
AC_SUBST(MOZ_MSVC_STL_WRAP_Throw)
AC_SUBST(MOZ_MSVC_STL_WRAP_RAISE)
dnl ========================================================
dnl Checks for programs.

View File

@ -11,7 +11,7 @@ EXPORTS.mozilla += [
'mozalloc_oom.h',
]
if CONFIG['MOZ_MSVC_STL_WRAP__RAISE'] or CONFIG['MOZ_MSVC_STL_WRAP__Throw']:
if CONFIG['MOZ_MSVC_STL_WRAP_RAISE'] or CONFIG['MOZ_MSVC_STL_WRAP_Throw']:
build_msvc_wrappers = 1
else:
build_msvc_wrappers = 0

View File

@ -8,9 +8,9 @@
#ifndef mozilla_throw_msvc_h
#define mozilla_throw_msvc_h
#if defined(MOZ_MSVC_STL_WRAP__RAISE)
#if defined(MOZ_MSVC_STL_WRAP_RAISE)
# include "msvc_raise_wrappers.h"
#elif defined(MOZ_MSVC_STL_WRAP__Throw)
#elif defined(MOZ_MSVC_STL_WRAP_Throw)
# include "msvc_throw_wrapper.h"
#else
# error "Unknown STL wrapper tactic"

View File

@ -3,8 +3,15 @@
* Do not edit.
*/
#ifndef _MOZILLA_CONFIG_H_
#define _MOZILLA_CONFIG_H_
#ifndef MOZILLA_CONFIG_H
#define MOZILLA_CONFIG_H
#if defined(__clang__)
#pragma clang diagnostic push
#if __has_warning("-Wreserved-id-macro")
#pragma clang diagnostic ignored "-Wreserved-id-macro"
#endif
#endif
@ALLDEFINES@
@ -25,6 +32,10 @@
#define __STDC_FORMAT_MACROS
#endif
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
/*
* Force-include Char16.h in order to define PRUnichar as char16_t everywhere.
* Note that this should be the first #include to make sure that prtypes.h does
@ -60,5 +71,4 @@
#include "base/win/sdkdecls.h"
#endif
#endif /* _MOZILLA_CONFIG_H_ */
#endif /* MOZILLA_CONFIG_H */

View File

@ -9,9 +9,7 @@ if CONFIG['CLANG_CXX']:
'-Wno-missing-prototypes',
'-Wno-missing-variable-declarations',
'-Wno-padded',
'-Wno-reserved-id-macro', # XXX: Will be removed in bug 1128413, Part 4.
'-Wno-shadow', # XXX: Clang's rules are too strict for constructors.
'-Wno-undef', # XXX: Will be removed in bug 1128413, Part 4.
'-Wno-weak-vtables', # We rely on the linker to merge the duplicate vtables.
]
elif CONFIG['_MSC_VER']: