[libjingle/f15] 0.6.0

Tom Callaway spot at fedoraproject.org
Tue Sep 27 15:23:39 UTC 2011


commit 48476bc0195a8a1e62bfab16efaa1cb9f60c5c80
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date:   Tue Sep 27 11:23:27 2011 -0400

    0.6.0

 libjingle-0.6.0-devicemanager-fix.patch |   20 +++
 libjingle-0.6.0-qname-threadsafe.patch  |  284 +++++++++++++++++++++++++++++++
 libjingle-0.6.0-size_t.patch            |   11 ++
 libjingle.spec                          |   14 +-
 sources                                 |    2 +-
 5 files changed, 323 insertions(+), 8 deletions(-)
---
diff --git a/libjingle-0.6.0-devicemanager-fix.patch b/libjingle-0.6.0-devicemanager-fix.patch
new file mode 100644
index 0000000..cc533c4
--- /dev/null
+++ b/libjingle-0.6.0-devicemanager-fix.patch
@@ -0,0 +1,20 @@
+diff -up libjingle-0.6.0/talk/session/phone/devicemanager.cc.alsa libjingle-0.6.0/talk/session/phone/devicemanager.cc
+--- libjingle-0.6.0/talk/session/phone/devicemanager.cc.alsa	2011-09-13 18:47:01.000000000 -0400
++++ libjingle-0.6.0/talk/session/phone/devicemanager.cc	2011-09-27 11:09:52.213322502 -0400
+@@ -25,7 +25,7 @@
+  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
+-#include "talk/session/phone/devicemanager.h"
++#include "config.h"
+ 
+ #if WIN32
+ #include <atlbase.h>
+@@ -58,6 +58,7 @@
+ #include "talk/sound/soundsysteminterface.h"
+ #endif
+ 
++#include "talk/session/phone/devicemanager.h"
+ #include "talk/base/logging.h"
+ #include "talk/base/stringutils.h"
+ #include "talk/base/thread.h"
diff --git a/libjingle-0.6.0-qname-threadsafe.patch b/libjingle-0.6.0-qname-threadsafe.patch
new file mode 100644
index 0000000..25f3a75
--- /dev/null
+++ b/libjingle-0.6.0-qname-threadsafe.patch
@@ -0,0 +1,284 @@
+diff -up libjingle-0.6.0/talk/xmllite/qname.cc.threadsafe libjingle-0.6.0/talk/xmllite/qname.cc
+--- libjingle-0.6.0/talk/xmllite/qname.cc.threadsafe	2011-09-13 18:47:01.000000000 -0400
++++ libjingle-0.6.0/talk/xmllite/qname.cc	2011-09-27 11:10:27.002907179 -0400
+@@ -1,112 +1,23 @@
+-/*
+- * libjingle
+- * Copyright 2004--2005, Google Inc.
+- *
+- * Redistribution and use in source and binary forms, with or without
+- * modification, are permitted provided that the following conditions are met:
+- *
+- *  1. Redistributions of source code must retain the above copyright notice,
+- *     this list of conditions and the following disclaimer.
+- *  2. Redistributions in binary form must reproduce the above copyright notice,
+- *     this list of conditions and the following disclaimer in the documentation
+- *     and/or other materials provided with the distribution.
+- *  3. The name of the author may not be used to endorse or promote products
+- *     derived from this software without specific prior written permission.
+- *
+- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+- */
++// Copyright (c) 2010 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
++
++#include "talk/xmllite/qname.h"
+ 
+-#include <string>
+ #include "talk/base/common.h"
+ #include "talk/xmllite/xmlelement.h"
+-#include "talk/xmllite/qname.h"
+ #include "talk/xmllite/xmlconstants.h"
+ 
+ namespace buzz {
+ 
+-static int QName_Hash(const std::string & ns, const char * local) {
+-  int result = static_cast<int>(ns.size()) * 101;
+-  while (*local) {
+-    result *= 19;
+-    result += *local;
+-    local += 1;
+-  }
+-  return result;
+-}
+-
+-static const int bits = 9;
+-static QName::Data * get_qname_table() {
+-  static QName::Data qname_table[1 << bits];
+-  return qname_table;
+-}
+-
+-static QName::Data *
+-AllocateOrFind(const std::string & ns, const char * local) {
+-  int index = QName_Hash(ns, local);
+-  int increment = index >> (bits - 1) | 1;
+-  QName::Data * qname_table = get_qname_table();
+-  for (;;) {
+-    index &= ((1 << bits) - 1);
+-    if (!qname_table[index].Occupied()) {
+-      return new QName::Data(ns, local);
+-    }
+-    if (qname_table[index].localPart_ == local &&
+-        qname_table[index].namespace_ == ns) {
+-      qname_table[index].AddRef();
+-      return qname_table + index;
+-    }
+-    index += increment;
+-  }
+-}
+-
+-static QName::Data *
+-Add(const std::string & ns, const char * local) {
+-  int index = QName_Hash(ns, local);
+-  int increment = index >> (bits - 1) | 1;
+-  QName::Data * qname_table = get_qname_table();
+-  for (;;) {
+-    index &= ((1 << bits) - 1);
+-    if (!qname_table[index].Occupied()) {
+-      qname_table[index].namespace_ = ns;
+-      qname_table[index].localPart_ = local;
+-      qname_table[index].AddRef(); // AddRef twice so it's never deleted
+-      qname_table[index].AddRef();
+-      return qname_table + index;
+-    }
+-    if (qname_table[index].localPart_ == local &&
+-        qname_table[index].namespace_ == ns) {
+-      qname_table[index].AddRef();
+-      return qname_table + index;
+-    }
+-    index += increment;
+-  }
+-}
+-
+-QName::~QName() {
+-  data_->Release();
+-}
+-
+-QName::QName() : data_(QN_EMPTY.data_) {
+-  data_->AddRef();
+-}
++QName::QName() : namespace_(QN_EMPTY.namespace_),
++                 local_part_(QN_EMPTY.local_part_) {}
+ 
+-QName::QName(bool add, const std::string & ns, const char * local) :
+-  data_(add ? Add(ns, local) : AllocateOrFind(ns, local)) {}
++QName::QName(const std::string & ns, const std::string & local) :
++  namespace_(ns), local_part_(local) {}
+ 
+ QName::QName(bool add, const std::string & ns, const std::string & local) :
+-  data_(add ? Add(ns, local.c_str()) : AllocateOrFind(ns, local.c_str())) {}
+-
+-QName::QName(const std::string & ns, const char * local) :
+-  data_(AllocateOrFind(ns, local)) {}
++  namespace_(ns), local_part_(local) {}
+ 
+ static std::string
+ QName_LocalPart(const std::string & name) {
+@@ -125,38 +36,30 @@ QName_Namespace(const std::string & name
+ }
+ 
+ QName::QName(const std::string & mergedOrLocal) :
+-  data_(AllocateOrFind(QName_Namespace(mergedOrLocal),
+-                 QName_LocalPart(mergedOrLocal).c_str())) {}
++  namespace_(QName_Namespace(mergedOrLocal)),
++  local_part_(QName_LocalPart(mergedOrLocal)) {}
+ 
+ std::string
+ QName::Merged() const {
+-  if (data_->namespace_ == STR_EMPTY)
+-    return data_->localPart_;
+-
+-  std::string result(data_->namespace_);
+-  result.reserve(result.length() + 1 + data_->localPart_.length());
+-  result += ':';
+-  result += data_->localPart_;
+-  return result;
++  if (namespace_ == STR_EMPTY)
++    return local_part_;
++  return namespace_ + ':' + local_part_;
+ }
+ 
+ bool
+ QName::operator==(const QName & other) const {
+-  return other.data_ == data_ ||
+-      (data_->localPart_ == other.data_->localPart_ &&
+-       data_->namespace_ == other.data_->namespace_);
++  return
++    local_part_ == other.local_part_ &&
++    namespace_ == other.namespace_;
+ }
+ 
+ int
+ QName::Compare(const QName & other) const {
+-  if (data_ == other.data_)
+-    return 0;
+-
+-  int result = data_->localPart_.compare(other.data_->localPart_);
++  int result = local_part_.compare(other.local_part_);
+   if (result)
+     return result;
+ 
+-  return data_->namespace_.compare(other.data_->namespace_);
++  return namespace_.compare(other.namespace_);
+ }
+ 
+-}
++}  // namespace buzz
+diff -up libjingle-0.6.0/talk/xmllite/qname.h.threadsafe libjingle-0.6.0/talk/xmllite/qname.h
+--- libjingle-0.6.0/talk/xmllite/qname.h.threadsafe	2011-09-13 18:47:01.000000000 -0400
++++ libjingle-0.6.0/talk/xmllite/qname.h	2011-09-27 11:14:11.961092612 -0400
+@@ -1,88 +1,38 @@
+-/*
+- * libjingle
+- * Copyright 2004--2005, Google Inc.
+- *
+- * Redistribution and use in source and binary forms, with or without 
+- * modification, are permitted provided that the following conditions are met:
+- *
+- *  1. Redistributions of source code must retain the above copyright notice, 
+- *     this list of conditions and the following disclaimer.
+- *  2. Redistributions in binary form must reproduce the above copyright notice,
+- *     this list of conditions and the following disclaimer in the documentation
+- *     and/or other materials provided with the distribution.
+- *  3. The name of the author may not be used to endorse or promote products 
+- *     derived from this software without specific prior written permission.
+- *
+- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
+- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
+- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 
+- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+- */
++// Copyright (c) 2010 The Chromium Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style license that can be
++// found in the LICENSE file.
+ 
+-#ifndef _qname_h_
+-#define _qname_h_
++#ifndef TALK_XMLLITE_QNAME_H_
++#define TALK_XMLLITE_QNAME_H_
+ 
+ #include <string>
+-#include "talk/base/criticalsection.h"
+ 
+ namespace buzz {
+ 
+-
++// Default libjingle's implementation of QName class is not threadsafe. This
++// one is.
+ class QName
+ {
+ public:
+-  explicit QName();
+-  QName(const QName & qname) : data_(qname.data_) { data_->AddRef(); }
+-  explicit QName(bool add, const std::string & ns, const char * local);
+-  explicit QName(bool add, const std::string & ns, const std::string & local);
+-  explicit QName(const std::string & ns, const char * local);
++  QName();
++  QName(const std::string & ns, const std::string & local);
++  QName(bool add, const std::string & ns, const std::string & local);
+   explicit QName(const std::string & mergedOrLocal);
+-  QName & operator=(const QName & qn) {
+-    qn.data_->AddRef();
+-    data_->Release();
+-    data_ = qn.data_;
+-    return *this;
+-  }
+-  ~QName();
+ 
+-  const std::string & Namespace() const { return data_->namespace_; }
+-  const std::string & LocalPart() const { return data_->localPart_; }
++  const std::string & Namespace() const { return namespace_; }
++  const std::string & LocalPart() const { return local_part_; }
+   std::string Merged() const;
+   int Compare(const QName & other) const;
+   bool operator==(const QName & other) const;
+   bool operator!=(const QName & other) const { return !operator==(other); }
+   bool operator<(const QName & other) const { return Compare(other) < 0; }
+ 
+-  class Data {
+-  public:
+-    Data(const std::string & ns, const std::string & local) :
+-      namespace_(ns),
+-      localPart_(local),
+-      refcount_(1) {}
+-
+-    Data() : refcount_(0) {}
+-
+-    std::string namespace_;
+-    std::string localPart_;
+-    void AddRef() { talk_base::AtomicOps::Increment(&refcount_); }
+-    void Release() { if (!talk_base::AtomicOps::Decrement(&refcount_)) { delete this; } }
+-    bool Occupied() { return !!refcount_; }
+-
+-  private:
+-    int refcount_;
+-  };
+-
+ private:
+-  Data * data_;
++  std::string namespace_;
++  std::string local_part_;
+ };
+ 
+ 
+-}
++}  // namespace buzz
+ 
+-#endif
++#endif  // TALK_XMLLITE_QNAME_H_
diff --git a/libjingle-0.6.0-size_t.patch b/libjingle-0.6.0-size_t.patch
new file mode 100644
index 0000000..4604c81
--- /dev/null
+++ b/libjingle-0.6.0-size_t.patch
@@ -0,0 +1,11 @@
+diff -up libjingle-0.6.0/talk/p2p/base/pseudotcp.h.size_t libjingle-0.6.0/talk/p2p/base/pseudotcp.h
+--- libjingle-0.6.0/talk/p2p/base/pseudotcp.h.size_t	2011-09-13 18:47:00.000000000 -0400
++++ libjingle-0.6.0/talk/p2p/base/pseudotcp.h	2011-09-27 11:15:48.274865394 -0400
+@@ -29,6 +29,7 @@
+ #define TALK_P2P_BASE_PSEUDOTCP_H_
+ 
+ #include <list>
++#include <cstdlib>
+ 
+ #include "talk/base/basictypes.h"
+ #include "talk/base/stream.h"
diff --git a/libjingle.spec b/libjingle.spec
index 515a060..3502310 100644
--- a/libjingle.spec
+++ b/libjingle.spec
@@ -1,5 +1,5 @@
 Name:           libjingle
-Version:        0.5.8
+Version:        0.6.0
 Release:        1%{?dist}
 Summary:        GoogleTalk implementation of Jingle
 Group:          System Environment/Libraries
@@ -34,7 +34,7 @@ Patch6:		libjingle-0.5.1-unixfilesystemfix.patch
 Patch7:		libjingle-0.5.8-system-expat.patch
 Patch8:		libjingle-0.5.8-system-srtp.patch
 # Fix devicemanager.cc to compile
-Patch9:		libjingle-0.5.8-devicemanager-fix.patch
+Patch9:		libjingle-0.6.0-devicemanager-fix.patch
 # Fix v4llookup.cc to compile
 Patch10:	libjingle-0.5.8-v4llookup-fix.patch
 # Fix type and definition conflicts with Chromium
@@ -42,15 +42,13 @@ Patch11:        libjingle-0.5.1-fixconflict.patch
 # Fix 64bit typedefs to not conflict with Chromium, nspr
 Patch12:        libjingle-0.5.1-64bittypes.patch
 # From Chromium, make qname threadsafe
-Patch13:	libjingle-0.5.1-qname-threadsafe.patch
+Patch13:	libjingle-0.6.0-qname-threadsafe.patch
 # Make sure linux.h/linux.cc pulls in config.h for LINUX define
 Patch14:	libjingle-0.5.8-config-linux.patch
-# Chromium 12 forks libjingle. Again. :P
-Patch15:	libjingle-0.5.8-chromium14-changes.patch
 # Fix 0.5.2 compilation
 Patch16:	libjingle-0.5.2-compilefix.patch
 # Fix missing cstdlib for size_t
-Patch17:	libjingle-0.5.2-size_t.patch
+Patch17:	libjingle-0.6.0-size_t.patch
 # Fix obsolete macro usage
 Patch18:	libjingle-0.5.8-fixmacro.patch
 
@@ -104,7 +102,6 @@ developing applications that use %{name}.
 %patch12 -p1 -b .64bit
 %patch13 -p1 -b .threadsafe
 %patch14 -p1 -b .config
-%patch15 -p1 -b .chromium14
 %patch16 -p1 -b .compilefix
 %patch17 -p1 -b .size_t
 %patch18 -p1 -b .fixmacro
@@ -152,6 +149,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Tue Sep 27 2011 Tom Callaway <spot at fedoraproject.org> - 0.6.0-1
+- update to 0.6.0
+
 * Tue Jul 26 2011 Tom Callaway <spot at fedoraproject.org> - 0.5.8-1
 - update to 0.5.8
 - merge Google's unpublished Chromium 14 changes
diff --git a/sources b/sources
index 8d27f4c..f7f0eec 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-59a03002c94984379e692e50d58edb91  libjingle-0.5.8.zip
+3d453c38a5345532aad230dbd9ac3bde  libjingle-0.6.0.zip


More information about the scm-commits mailing list