~ubuntu-branches/ubuntu/quantal/enigmail/quantal-security

« back to all changes in this revision

Viewing changes to config/gcc-stl-wrapper.template.h

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2013-09-13 16:02:15 UTC
  • mfrom: (0.12.16)
  • Revision ID: package-import@ubuntu.com-20130913160215-u3g8nmwa0pdwagwc
Tags: 2:1.5.2-0ubuntu0.12.10.1
* New upstream release v1.5.2 for Thunderbird 24

* Build enigmail using a stripped down Thunderbird 17 build system, as it's
  now quite difficult to build the way we were doing previously, with the
  latest Firefox build system
* Add debian/patches/no_libxpcom.patch - Don't link against libxpcom, as it
  doesn't exist anymore (but exists in the build system)
* Add debian/patches/use_sdk.patch - Use the SDK version of xpt.py and
  friends
* Drop debian/patches/ipc-pipe_rename.diff (not needed anymore)
* Drop debian/patches/makefile_depth.diff (not needed anymore)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
 
 * vim: sw=2 ts=8 et :
3
 
 */
4
 
/* This Source Code Form is subject to the terms of the Mozilla Public
5
 
 * License, v. 2.0. If a copy of the MPL was not distributed with this
6
 
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7
 
 
8
 
#ifndef mozilla_${HEADER}_h
9
 
#define mozilla_${HEADER}_h
10
 
 
11
 
// For some reason, Apple's GCC refuses to honor -fno-exceptions when
12
 
// compiling ObjC.
13
 
#if __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS)
14
 
#  error "STL code can only be used with -fno-exceptions"
15
 
#endif
16
 
 
17
 
// Silence "warning: #include_next is a GCC extension"
18
 
#pragma GCC system_header
19
 
 
20
 
// mozalloc.h wants <new>; break the cycle by always explicitly
21
 
// including <new> here.  NB: this is a tad sneaky.  Sez the gcc docs:
22
 
//
23
 
//    `#include_next' does not distinguish between <file> and "file"
24
 
//    inclusion, nor does it check that the file you specify has the
25
 
//    same name as the current file. It simply looks for the file
26
 
//    named, starting with the directory in the search path after the
27
 
//    one where the current file was found.
28
 
#include_next <new>
29
 
 
30
 
// See if we're in code that can use mozalloc.  NB: this duplicates
31
 
// code in nscore.h because nscore.h pulls in prtypes.h, and chromium
32
 
// can't build with that being included before base/basictypes.h.
33
 
#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC)
34
 
#  include "mozilla/mozalloc.h"
35
 
#else
36
 
#  error "STL code can only be used with infallible ::operator new()"
37
 
#endif
38
 
 
39
 
#if defined(DEBUG) && !defined(_GLIBCXX_DEBUG)
40
 
// Enable checked iterators and other goodies
41
 
//
42
 
// FIXME/bug 551254: gcc's debug STL implementation requires -frtti.
43
 
// Figure out how to resolve this with -fno-rtti.  Maybe build with
44
 
// -frtti in DEBUG builds?
45
 
//
46
 
//  # define _GLIBCXX_DEBUG 1
47
 
#endif
48
 
 
49
 
#pragma GCC visibility push(default)
50
 
#include_next <${HEADER}>
51
 
#pragma GCC visibility pop
52
 
 
53
 
// gcc calls a __throw_*() function from bits/functexcept.h when it
54
 
// wants to "throw an exception".  functexcept exists nominally to
55
 
// support -fno-exceptions, but since we'll always use the system
56
 
// libstdc++, and it's compiled with exceptions, then in practice
57
 
// these __throw_*() functions will always throw exceptions (shades of
58
 
// -fshort-wchar).  We don't want that and so define our own inlined
59
 
// __throw_*().
60
 
#ifndef mozilla_throw_gcc_h
61
 
#  include "mozilla/throw_gcc.h"
62
 
#endif
63
 
 
64
 
#endif  // if mozilla_${HEADER}_h