Bug 982761 - Fix linkage of _1 placeholder in std::bind polyfill. r=briansmith
authorBrian Smith <brian@briansmith.org>
Thu, 13 Mar 2014 16:55:28 -0700
changeset 191894 b753b98bcf5509947b2d6f63d597a9a934dd6992
parent 191893 a25a6bf64a5f048c0c677094478fc2ec99340911
child 191895 b7761b7514f73fac04de664f8db546f400f2bd6e
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbriansmith
bugs982761
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 982761 - Fix linkage of _1 placeholder in std::bind polyfill. r=briansmith
security/insanity/include/insanity/bind.h
security/insanity/lib/pkixbind.cpp
security/insanity/moz.build
--- a/security/insanity/include/insanity/bind.h
+++ b/security/insanity/include/insanity/bind.h
@@ -36,17 +36,18 @@ namespace insanity {
 
 using std::bind;
 using std::ref;
 using std::cref;
 using std::placeholders::_1;
 
 #else
 
-class Placeholder1 { } _1;
+class Placeholder1 { };
+extern Placeholder1 _1;
 
 template <typename V>       V&  ref(V& v)       { return v; }
 template <typename V> const V& cref(const V& v) { return v; }
 
 namespace internal {
 
 template <typename R, typename P1, typename B1>
 class Bind1
new file mode 100644
--- /dev/null
+++ b/security/insanity/lib/pkixbind.cpp
@@ -0,0 +1,28 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
+/* Copyright 2013 Mozilla Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _MSC_VER
+
+#include "insanity/bind.h"
+
+namespace insanity {
+
+Placeholder1 _1;
+  
+} // namespace insanity
+
+#endif // _MSC_VER
--- a/security/insanity/moz.build
+++ b/security/insanity/moz.build
@@ -1,15 +1,16 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 UNIFIED_SOURCES += [
+    'lib/pkixbind.cpp',
     'lib/pkixbuild.cpp',
     'lib/pkixcheck.cpp',
     'lib/pkixder.cpp',
     'lib/pkixkey.cpp',
     'lib/pkixocsp.cpp',
 ]
 
 LOCAL_INCLUDES += [