Skip to content

Commit

Permalink
Bug 1128413, Part 4: Fix warnings in mozilla-config.h and gcc-stl-wra…
Browse files Browse the repository at this point in the history
…pper.template.h, r=glandium

--HG--
extra : rebase_source : 7ba4fb8a0bd11648908e2790e86ce3bb4517aeb7
  • Loading branch information
briansmith committed Feb 3, 2015
1 parent 3920fcd commit 1bb835d
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 16 deletions.
2 changes: 1 addition & 1 deletion config/gcc-stl-wrapper.template.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 6 additions & 6 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion memory/mozalloc/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions memory/mozalloc/throw_msvc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
18 changes: 14 additions & 4 deletions mozilla-config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@

Expand All @@ -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
Expand Down Expand Up @@ -60,5 +71,4 @@
#include "base/win/sdkdecls.h"
#endif

#endif /* _MOZILLA_CONFIG_H_ */

#endif /* MOZILLA_CONFIG_H */
2 changes: 0 additions & 2 deletions security/pkix/warnings.mozbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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']:
Expand Down

0 comments on commit 1bb835d

Please sign in to comment.