Add patch for graph-tool compilation error regarding ambiguous chrono with boost 1.63

diff --git a/src/graph/draw/graph_cairo_draw.cc b/src/graph/draw/graph_cairo_draw.cc
index c4cd8a2..9ba442b 100644
--- a/src/graph/draw/graph_cairo_draw.cc
+++ b/src/graph/draw/graph_cairo_draw.cc
@@ -29,7 +29,6 @@

 #include <iostream>
 #include <array>
-#include <chrono>

 #include "hash_map_wrap.hh"
 #include "demangle.hh"
@@ -44,6 +43,8 @@

 #include <boost/mpl/map/map50.hpp>

+#include <chrono>
+
 using namespace std;
 using namespace boost;
 using namespace graph_tool;
@@ -1563,11 +1564,11 @@ void draw_vertices(Graph&, pair<VertexIterator, VertexIterator> v_range,
         vs.draw(cr);
         count++;

-        if (chrono::high_resolution_clock::now() > max_time)
+        if (std::chrono::high_resolution_clock::now() > max_time)
         {
             yield(boost::python::object(count));
-            max_time = chrono::high_resolution_clock::now() +
-                chrono::milliseconds(dt);
+            max_time = std::chrono::high_resolution_clock::now() +
+                std::chrono::milliseconds(dt);
         }
     }
 }
@@ -1613,11 +1614,11 @@ void draw_edges(Graph& g, pair<EdgeIterator, EdgeIterator> e_range,
                                                                      edefaults));
         es.draw(cr, res);

-        if (chrono::high_resolution_clock::now() > max_time)
+        if (std::chrono::high_resolution_clock::now() > max_time)
         {
             yield(boost::python::object(count));
-            max_time = chrono::high_resolution_clock::now() +
-                chrono::milliseconds(dt);
+            max_time = std::chrono::high_resolution_clock::now() +
+                std::chrono::milliseconds(dt);
         }
     }
 }
@@ -1819,11 +1820,11 @@ boost::python::object cairo_draw(GraphInterface& gi,
                 eorder = no_order();

             size_t count = 0;
-            auto mtime = chrono::high_resolution_clock::now();
+            auto mtime = std::chrono::high_resolution_clock::now();
             if (max_time < 0)
-                mtime = chrono::high_resolution_clock::time_point::max();
+                mtime = std::chrono::high_resolution_clock::time_point::max();
             else
-                mtime += chrono::milliseconds(max_time);
+                mtime += std::chrono::milliseconds(max_time);
             int64_t dt = max_time;

             Cairo::Context cr(PycairoContext_GET(ocr.ptr()));


Patch from GCI student Daniel Marth, fixes custom cursor rememts when the mouse is outside the work area. Checked with student's provided testbed application.

diff -NaurbE libsdl-1.2-hg/src/video/bwindow/SDL_sysevents.cc libsdl-1.2-hg-gci/src/video/bwindow/SDL_sysevents.cc
--- libsdl-1.2-hg/src/video/bwindow/SDL_sysevents.cc	2010-12-06 18:12:49.755761152 +0100
+++ libsdl-1.2-hg-gci/src/video/bwindow/SDL_sysevents.cc	2010-12-06 18:10:31.250871808 +0100
@@ -36,6 +36,7 @@
 #include "../../events/SDL_sysevents.h"
 #include "../../events/SDL_events_c.h"
 #include "SDL_sysevents_c.h"
+#include "../SDL_cursor_c.h"

 void BE_PumpEvents(_THIS)
 {
@@ -203,11 +204,13 @@
 				if (transit == B_EXITED_VIEW) {
 					if ( SDL_GetAppState() & SDL_APPMOUSEFOCUS ) {
 						SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS);
+						SDL_EraseCursor(SDL_VideoSurface);
 						be_app->SetCursor(B_HAND_CURSOR);
 					}
 				} else {
 					if ( !(SDL_GetAppState() & SDL_APPMOUSEFOCUS) ) {
 						SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
+						SDL_EraseCursor(SDL_VideoSurface);
 						SDL_SetCursor(NULL);
 					}


diff --git a/Source/platform/fonts/mac/ComplexTextControllerCoreText.mm b/Source/platform/fonts/mac/ComplexTextControllerCoreText.mm
index d2ce51f..33e2b9b 100644
--- a/Source/platform/fonts/mac/ComplexTextControllerCoreText.mm
+++ b/Source/platform/fonts/mac/ComplexTextControllerCoreText.mm
@@ -223,7 +223,7 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp,
         static CFDictionaryRef ltrTypesetterOptions = CFDictionaryCreate(kCFAllocatorDefault, optionKeys, ltrOptionValues, WTF_ARRAY_LENGTH(optionKeys), &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
         static CFDictionaryRef rtlTypesetterOptions = CFDictionaryCreate(kCFAllocatorDefault, optionKeys, rtlOptionValues, WTF_ARRAY_LENGTH(optionKeys), &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);

-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if 0
         ProviderInfo info = { cp, length, stringAttributes.get() };
         RetainPtr<CTTypesetterRef> typesetter(AdoptCF, WKCreateCTTypesetterWithUniCharProviderAndOptions(&provideStringAndAttributes, 0, &info, m_run.ltr() ? ltrTypesetterOptions : rtlTypesetterOptions));
 #else


Add profyling commit for ioctl v4l_fill_fmtdesc call

From 72064c30574df63d52c3d0baeb9f9b585064f548 Mon Sep 17 00:00:00 2001
From: Evgeni Raikhel <evgeni.raikhel@intel.com>
Date: Thu, 30 Aug 2018 17:29:13 +0300
Subject: [PATCH] Debug ioctl fmt desc

The patch is useful to profile kernel calls invocation after applying kernel patches

---
 drivers/media/v4l2-core/v4l2-ioctl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index cab63bb..e8b6590 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1105,6 +1105,9 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
 	const char *descr = NULL;
 	u32 flags = 0;

+	printk(KERN_DEBUG "LRS dbg: read format description for pixel_format: %x\n",
+					fmt->pixelformat);
+
 	/*
 	 * We depart from the normal coding style here since the descriptions
 	 * should be aligned so it is easy to see which descriptions will be
--
2.7.4


Add patch to Letters.pm for custom pickupday tag in notices

Patch for C4::Letters - adding a <<pickupday>> tag for use in Notices and Slips
Use case: a printable pickup number with reserve_id can then be used as such

<<pickupday>>/<<reserves.reserve_id>>

diff --git a/Letters.pm b/lib/C4/Letters.pm
index 26f3e46..40fccf0 100644
--- a/Letters.pm
+++ b/lib/C4/Letters.pm
@@ -807,6 +807,11 @@ sub _parseletter {
     if ( $table eq 'reserves' && $values->{'waitingdate'} ) {
         my @waitingdate = split /-/, $values->{'waitingdate'};

+        # Deichman mod: add a custom tag '<<pickupday>>' for hold pickup day to use in slips
+        if ($letter->{content} && $letter->{content} =~ /<<pickupday>>/) {
+            $letter->{content} =~ s/<<pickupday>>/$waitingdate[-1]/go;
+        }
+
         $values->{'expirationdate'} = '';
         if ( C4::Context->preference('ReservesMaxPickUpDelay') ) {
             my $dt = dt_from_string();


From f4410610f872c262d8afb883d2aef738acfbff17 Mon Sep 17 00:00:00 2001
From: Wieland Hoffmann <themineo@gmail.com>
Date: Fri, 29 May 2015 10:10:54 +0200
Subject: [PATCH] Wrap index_entity in profile.runctx(...) calls

---
 sir/indexing.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sir/indexing.py b/sir/indexing.py
index add455b..a2736b6 100644
--- a/sir/indexing.py
+++ b/sir/indexing.py
@@ -1,6 +1,7 @@
 # Copyright (c) 2014, 2015 Lukas Lalinsky, Wieland Hoffmann
 # License: MIT, see LICENSE for details
 import multiprocessing
+import profile

 from . import config, querying, util
@@ -8,6 +9,7 @@ from .schema import SCHEMA
 from ConfigParser import NoOptionError
 from functools import partial
 from logging import getLogger
+from os import getpid
 from solr import SolrException
 from sqlalchemy import and_
 from traceback import format_exc
@@ -125,7 +127,7 @@ def _index_entity_process_wrapper(args):
     :rtype: None or an Exception
     """
     try:
-        return index_entity(*args)
+        profile.runctx("index_entity(*args)", globals(), locals(), filename="profile-{}".format(getpid()))
     except Exception:
         logger.exception(format_exc())
         raise
--
2.4.1


*** /q/ports/security/py-m2crypto/work/m2crypto-0.11/M2Crypto/httpslib.py       Tue Jan  7 09:44:35 2003
--- /usr/local/lib/python2.3/site-packages/M2Crypto/httpslib.py Thu Sep  2 11:27:56 2004
***************
*** 22,28 ****

          default_port = HTTPS_PORT

!         if sys.version[:5] == '2.2.2':
              def __init__(self, host, port=None, strict=None, **ssl):
                  keys = ssl.keys()
                  try:
--- 22,28 ----

          default_port = HTTPS_PORT

!         if sys.version[:3] == '2.3':
              def __init__(self, host, port=None, strict=None, **ssl):
                  keys = ssl.keys()
                  try:


Add patch to allow restarting of renderer process on purpose.

diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index 95f2525..09a3b07 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -1031,6 +1031,15 @@ SiteInstance* RenderFrameHostManager::GetSiteInstanceForNavigation(
   SiteInstance* current_instance = render_frame_host_->GetSiteInstance();
   SiteInstance* new_instance = current_instance;

+  // Gives user a chance to pass a custom side instance.
+  GetContentClient()->browser()->OverrideSiteInstanceForNavigation(
+      delegate_->GetControllerForRenderManager().GetBrowserContext(),
+      current_instance,
+      dest_url,
+      &new_instance);
+  if (new_instance != current_instance)
+    return new_instance;
+
   // We do not currently swap processes for navigations in webview tag guests.
   if (current_instance->GetSiteURL().SchemeIs(kGuestScheme))
     return current_instance;
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index a0ac3c2..5a8ec80 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -134,6 +134,13 @@ class CONTENT_EXPORT ContentBrowserClient {
  public:
   virtual ~ContentBrowserClient() {}

+  // Electron: Allows overriding the SiteInstance when navigating.
+  virtual void OverrideSiteInstanceForNavigation(
+      BrowserContext* browser_context,
+      SiteInstance* current_instance,
+      const GURL& dest_url,
+      SiteInstance** new_instance) {}
+
   // Allows the embedder to set any number of custom BrowserMainParts
   // implementations for the browser startup code. See comments in
   // browser_main_parts.h.


--- include/CL/cl.hpp.in	2013-02-28 15:32:09.000000000 +0200
+++ include/CL/cl.hpp	2013-02-28 15:32:41.000000000 +0200
@@ -212,8 +212,6 @@
 #if defined(linux) || defined(__APPLE__) || defined(__MACOSX)
 #include <alloca.h>

-#include <emmintrin.h>
-#include <xmmintrin.h>
 #endif // linux

 #include <cstring>
@@ -1035,7 +1033,7 @@
 #endif // !_WIN32
     }

-    inline void fence() { _mm_mfence(); }
+    inline void fence() { __sync_synchronize(); }
 }; // namespace detail

Correct C++11 issue in Khronos header files

--- include/CL/cl.hpp.in	2013-02-28 15:32:09.000000000 +0200
+++ include/CL/cl.hpp	2013-02-28 15:32:41.000000000 +0200
@@ -212,8 +212,6 @@
 #if defined(linux) || defined(__APPLE__) || defined(__MACOSX)
 #include <alloca.h>

-#include <emmintrin.h>
-#include <xmmintrin.h>
 #endif // linux

 #include <cstring>
@@ -1035,7 +1033,7 @@
 #endif // !_WIN32
     }

-    inline void fence() { _mm_mfence(); }
+    inline void fence() { __sync_synchronize(); }
 }; // namespace detail

@@ -1128,7 +1129,9 @@
             return err;
         }

-        param->assign(&value[0], &value[required/sizeof(cl_device_id)]);
+        for (std::size_t i=0; i<required/sizeof(cl_device_id); ++i) {
+            memcpy(&(*param)[i], &value[i], sizeof(cl_device_id));
+        }
         return CL_SUCCESS;
     }
 };


Patch file to allow sipXmediaLib to work with autoconf 2.59.

Index: contrib/libamrwb/configure.ac
===================================================================
--- contrib/libamrwb/configure.ac	(revision 10951)
+++ contrib/libamrwb/configure.ac	(working copy)
@@ -43,10 +43,10 @@

 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
-AC_TYPE_INT16_T
-AC_TYPE_INT32_T
-AC_TYPE_INT8_T
-AC_TYPE_UINT16_T
+#AC_TYPE_INT16_T
+#AC_TYPE_INT32_T
+#AC_TYPE_INT8_T
+#AC_TYPE_UINT16_T

 # Checks for library functions.
 AC_FUNC_MALLOC
Index: contrib/libamrnb/configure.ac
===================================================================
--- contrib/libamrnb/configure.ac	(revision 10951)
+++ contrib/libamrnb/configure.ac	(working copy)
@@ -43,10 +43,10 @@

 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
-AC_TYPE_INT16_T
-AC_TYPE_INT32_T
-AC_TYPE_INT8_T
-AC_TYPE_UINT8_T
+#AC_TYPE_INT16_T
+#AC_TYPE_INT32_T
+#AC_TYPE_INT8_T
+#AC_TYPE_UINT8_T
 AC_C_VOLATILE

 # Checks for library functions.
Index: configure.ac
===================================================================
--- configure.ac	(revision 10951)
+++ configure.ac	(working copy)
@@ -1,7 +1,7 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.

-AC_PREREQ([2.60])
+AC_PREREQ([2.59])
 AC_INIT(sipXmediaLib, 3.3, sipxtapi-dev@list.sipfoundry.org)
 AC_CONFIG_AUX_DIR(config)
 AC_PREFIX_DEFAULT([/usr/local/sipx])
Index: contrib/libspeex/doc/Makefile.am
===================================================================
--- contrib/libspeex/doc/Makefile.am	(revision 13928)
+++ contrib/libspeex/doc/Makefile.am	(working copy)
@@ -1,3 +1,5 @@
+docdir = ${datadir}/doc/${PACKAGE}
+
 doc_DATA = manual.pdf

 EXTRA_DIST = $(doc_DATA)


Patch from GCI student Daniel Marth, fixes an off-by-one issue.

diff -r 0d4756e57224 src/video/bwindow/SDL_sysevents.cc
--- a/src/video/bwindow/SDL_sysevents.cc	Sun Sep 19 08:56:53 2010 -0700
+++ b/src/video/bwindow/SDL_sysevents.cc	Tue Nov 30 13:38:17 2010 +0000
@@ -386,9 +386,9 @@
 		case B_DIRECT_MODIFY:
 			{
 				int32 width = info->window_bounds.right -
-					info->window_bounds.left + 1;
+					info->window_bounds.left;
 				int32 height = info->window_bounds.bottom -
-					info->window_bounds.top + 1;
+					info->window_bounds.top;
 				SDL_PrivateResize(width, height);
 				break;
 			}


Patch reinstating nose 1.3.0 compatibility with python 2.4

diff --git a/nose/failure.py b/nose/failure.py
index d24401c..c5fabfd 100644
--- a/nose/failure.py
+++ b/nose/failure.py
@@ -1,6 +1,7 @@
 import logging
 import unittest
 from traceback import format_tb
+from nose.pyversion import is_base_exception

 log = logging.getLogger(__name__)

@@ -34,7 +35,7 @@ def address(self):

     def runTest(self):
         if self.tb is not None:
-            if isinstance(self.exc_val, BaseException):
+            if is_base_exception(self.exc_val):
                 raise self.exc_val, None, self.tb
             raise self.exc_class, self.exc_val, self.tb
         else:
diff --git a/nose/plugins/capture.py b/nose/plugins/capture.py
index 224f0a5..d9041d8 100644
--- a/nose/plugins/capture.py
+++ b/nose/plugins/capture.py
@@ -13,6 +13,7 @@
 import os
 import sys
 from nose.plugins.base import Plugin
+from nose.pyversion import is_base_exception
 from nose.util import ln
 from StringIO import StringIO

@@ -86,7 +87,7 @@ def formatFailure(self, test, err):
         return self.formatError(test, err)

     def addCaptureToErr(self, ev, output):
-        if isinstance(ev, BaseException):
+        if is_base_exception(ev):
             if hasattr(ev, '__unicode__'):
                 # 2.6+
                 try:
diff --git a/nose/pyversion.py b/nose/pyversion.py
index a6ec3f7..14a133e 100644
--- a/nose/pyversion.py
+++ b/nose/pyversion.py
@@ -9,7 +9,7 @@

 __all__ = ['make_instancemethod', 'cmp_to_key', 'sort_list', 'ClassType',
            'TypeType', 'UNICODE_STRINGS', 'unbound_method', 'ismethod',
-           'bytes_']
+           'bytes_', 'is_base_exception']

 # In Python 3.x, all strings are unicode (the call to 'unicode()' in the 2.x
 # source will be replaced with 'str()' when running 2to3, so this test will
@@ -147,3 +147,12 @@ def isgenerator(func):
             return func.func_code.co_flags & CO_GENERATOR != 0
         except AttributeError:
             return False
+
+# Make a function to help check if an exception is derived from BaseException.
+# In Python 2.4, we just use Exception instead.
+if sys.version_info[:2] < (2, 5):
+    def is_base_exception(exc):
+        return isinstance(exc, Exception)
+else:
+    def is_base_exception(exc):
+        return isinstance(exc, BaseException)


diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc
index a0e7f61fab0c..fac728a729fb 100644
--- a/crypto/nss_util.cc
+++ b/crypto/nss_util.cc
@@ -623,13 +623,16 @@ class NSSInitSingleton {

     EnsureNSPRInit();

-    // We *must* have NSS >= 3.26 at compile time.
-    static_assert((NSS_VMAJOR == 3 && NSS_VMINOR >= 26) || (NSS_VMAJOR > 3),
-                  "nss version check failed");
+    // We *must* have NSS >= 3.14.3.
+    static_assert(
+        (NSS_VMAJOR == 3 && NSS_VMINOR == 14 && NSS_VPATCH >= 3) ||
+        (NSS_VMAJOR == 3 && NSS_VMINOR > 14) ||
+        (NSS_VMAJOR > 3),
+        "nss version check failed");
     // Also check the run-time NSS version.
     // NSS_VersionCheck is a >= check, not strict equality.
-    if (!NSS_VersionCheck("3.26")) {
-      LOG(FATAL) << "NSS_VersionCheck(\"3.26\") failed. NSS >= 3.26 is "
+    if (!NSS_VersionCheck("3.14.3")) {
+      LOG(FATAL) << "NSS_VersionCheck(\"3.14.3\") failed. NSS >= 3.14.3 is "
                     "required. Please upgrade to the latest NSS, and if you "
                     "still get this error, contact your distribution "
                     "maintainer.";
diff --git a/crypto/scoped_test_nss_db.cc b/crypto/scoped_test_nss_db.cc
index 03470c130371..b334109e0342 100644
--- a/crypto/scoped_test_nss_db.cc
+++ b/crypto/scoped_test_nss_db.cc
@@ -44,6 +44,15 @@ ScopedTestNSSDB::~ScopedTestNSSDB() {
     CERT_DestroyCertList(cert_list);
   }

+  // Don't close when NSS is < 3.15.1, because it would require an additional
+  // sleep for 1 second after closing the database, due to
+  // http://bugzil.la/875601.
+  if (!NSS_VersionCheck("3.15.1")) {
+    LOG(ERROR) << "NSS version is < 3.15.1, test DB will not be closed.";
+    temp_dir_.Take();
+    return;
+  }
+
   // NSS is allowed to do IO on the current thread since dispatching
   // to a dedicated thread would still have the affect of blocking
   // the current thread, due to NSS's internal locking requirements


From ffc2ce5a7dcff445bdf2b10a5e1f83e4a563be13 Mon Sep 17 00:00:00 2001
From: Evgeny Eltsin <eaeltsin@google.com>
Date: Fri, 24 Dec 2010 18:25:41 +0300
Subject: [PATCH 64/64] [gcc] Yet another gen_lowpart code confused by prt_mode != Pmode

Test from David Meyer, 64-bit mode with -O1:

typedef unsigned int size_t;

extern "C" {
  size_t strlen (const char *);
};

class StringRef {
private:
  const char *Data;
  size_t Length;

public:
 StringRef(const char *Str)
    : Data(Str), Length(::strlen(Str)) {}
};

StringRef GetDLLSuffix() {
  return &(".so"[1]);
}

Reports internal error while trying to replace Pmode register with ptr_mode CONST.

The change fixes the origin of such a CONST in gen_lowpart_for_combine. This is kinda hacky and clearly not upstreamable...

BUG=http://code.google.com/p/nativeclient/issues/detail?id=1279
TEST=see above

Review URL: http://codereview.chromium.org/5968010
---
 gcc/gcc/combine.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/gcc/gcc/combine.c b/gcc/gcc/combine.c
index 5078f3e..3eb2123 100644
--- a/gcc/gcc/combine.c
+++ b/gcc/gcc/combine.c
@@ -9892,8 +9892,11 @@ gen_lowpart_for_combine (enum machine_mode omode, rtx x)
     return x;

   /* Return identity if this is a CONST or symbolic reference.  */
+  /* HACK?
+     When ptr_mode != Pmode, we should not return CONST:ptr_mode for Pmode
+     and vice versa as this confuses SUBST.  */
   if (omode == Pmode
-      && (GET_CODE (x) == CONST
+      && ((GET_CODE (x) == CONST && ptr_mode == Pmode)
 	  || GET_CODE (x) == SYMBOL_REF
 	  || GET_CODE (x) == LABEL_REF))
     return x;
--
1.7.3.1


Disable EAL message spew which can easily fill /var/log

From da141a8f16224a97a1a4093a3293f9bb6b15fa90 Mon Sep 17 00:00:00 2001
From: Dave Barach <dave@barachs.net>
Date: Tue, 9 Feb 2016 10:22:39 -0500
Subject: [PATCH] Temporarily disable unthrottled log message.

Signed-off-by: Dave Barach <dave@barachs.net>
---
 lib/librte_eal/linuxapp/eal/eal_interrupts.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
index 06b26a9..8d918a4 100644
--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c
+++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c
@@ -711,6 +711,8 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds)
 				if (errno == EINTR || errno == EWOULDBLOCK)
 					continue;

+                                /* $$$ disable to avoid filling /var/log */
+                                if (0)
 				RTE_LOG(ERR, EAL, "Error reading from file "
 					"descriptor %d: %s\n",
 					events[n].data.fd,
--
1.9.1


Add clang patches corresponding to r279289.

Pull in r199571 from upstream clang trunk (by Ted Kremenek):

  Harden InitListExpr::isStringLiteralInit() against getInit()
  returning null.

  This led to a crash on invalid code (sorry, no good test case).

  Fixes <rdar://problem/15831804>.

This fixes an assertion when compiling certain incorrect code, as
reported upstream in http://llvm.org/PR22684 .

Introduced here: http://svnweb.freebsd.org/changeset/base/279289

Index: tools/clang/lib/AST/Expr.cpp
===================================================================
--- tools/clang/lib/AST/Expr.cpp
+++ tools/clang/lib/AST/Expr.cpp
@@ -1892,7 +1892,11 @@ bool InitListExpr::isStringLiteralInit() const {
   const ArrayType *AT = getType()->getAsArrayTypeUnsafe();
   if (!AT || !AT->getElementType()->isIntegerType())
     return false;
-  const Expr *Init = getInit(0)->IgnoreParens();
+  // It is possible for getInit() to return null.
+  const Expr *Init = getInit(0);
+  if (!Init)
+    return false;
+  Init = Init->IgnoreParens();
   return isa<StringLiteral>(Init) || isa<ObjCEncodeExpr>(Init);
 }


Add Nicola Mometto's patch showing weird stuff at source of problem

diff --git a/src/jvm/clojure/lang/SeqIterator.java b/src/jvm/clojure/lang/SeqIterator.java
index e6ad481..7b6a393 100644
--- a/src/jvm/clojure/lang/SeqIterator.java
+++ b/src/jvm/clojure/lang/SeqIterator.java
@@ -39,6 +39,10 @@ public boolean hasNext(){
 		}
 	else if(seq == next)
 		next = RT.next(seq);
+	else if (RT.seq(next) == null)
+		System.out.println("this shouldn't happen: " + (this == seq));
+	if (RT.seq(next) == null && next != null)
+		System.out.println("bug: " + next);
 	return next != null;
 }


--- google_appengine/dev_appserver.py	2014-08-25 15:24:44.000000000 -0700
+++ google_appengine/dev_appserver.py	2014-09-15 18:01:01.000000000 -0700
@@ -20,7 +20,8 @@
 import os
 import sys

-
+import logging
+logging.basicConfig( filename='logs/appengine.log', filemode='a' )

 sys_path = sys.path


diff -ruN libgestures/include/gestures/include/iir_filter_interpreter.h libgestures.new/include/gestures/include/iir_filter_interpreter.h
--- libgestures/include/gestures/include/iir_filter_interpreter.h	2015-05-03 21:53:49.979904775 -0400
+++ libgestures.new/include/gestures/include/iir_filter_interpreter.h	2015-05-03 20:52:04.102016136 -0400
@@ -78,6 +78,8 @@
   virtual void DoubleWasWritten(DoubleProperty* prop);

  private:
+  map<short, IoHistory, kMaxFingers> histories_;
+
   // y[0] = b[0]*x[0] + b[1]*x[1] + b[2]*x[2] + b[3]*x[3]
   //        - (a[1]*y[1] + a[2]*y[2])
   DoubleProperty b0_, b1_, b2_, b3_, a1_, a2_;
@@ -90,7 +92,6 @@
   // Whether IIR filter should be used. Put as a member varible for
   // unittest purpose.
   bool using_iir_;
-  map<short, IoHistory, kMaxFingers> histories_;
 };

 }  // namespace gestures


Fix isAir check to see if a portal can light. Should fix w/Railcraft and others

--- ../src_base/minecraft/net/minecraft/block/BlockPortal.java
+++ ../src_work/minecraft/net/minecraft/block/BlockPortal.java
@@ -118,7 +118,7 @@
         }
         else
         {
-            if (par1World.getBlockId(par2 - b0, par3, par4 - b1) == 0)
+            if (par1World.isAirBlock(par2 - b0, par3, par4 - b1))
             {
                 par2 -= b0;
                 par4 -= b1;


Patch to fix -lm issue on libwmf on Haiku

diff -urN libwmf-0.2.8.4/configure.ac libwmf-0.2.8.4-haiku/configure.ac
--- libwmf-0.2.8.4/configure.ac	2009-03-07 01:58:56.000000000 +0000
+++ libwmf-0.2.8.4-haiku/configure.ac	2009-03-07 02:18:00.000000000 +0000
@@ -124,6 +124,9 @@
     os_win32=yes
     SYS_LIBM=""
     ;;
+  *haiku*|*beos*)
+    SYS_LIBM=""
+    ;;
   *)
     os_win32=no
     SYS_LIBM="-lm"
@@ -528,7 +531,7 @@
 			WMF_PNG_LDFLAGS="-lpng"
 		fi
 	],[	AC_MSG_ERROR(* * * unable to find libpng which is required by libwmf * * *)
-	],-lz -lm)
+	],-lz $SYS_LIBM)
 ],[	AC_MSG_ERROR(* * * unable to find "png.h" which is required by libwmf * * *)
 ])

@@ -645,7 +648,7 @@

 	CPPFLAGS="$CPPFLAGS $WMF_FT_CFLAGS $WMF_PNG_CFLAGS $WMF_Z_CFLAGS"
 	LDFLAGS="$LDFLAGS $WMF_FT_LDFLAGS $WMF_PNG_LDFLAGS $WMF_Z_LDFLAGS"
-	other_libs="$other_libs -lfreetype -lpng -lz -lm"
+	other_libs="$other_libs -lfreetype -lpng -lz $SYS_LIBM"

 	AC_CHECK_HEADER(gd.h,[
 		AC_CHECK_LIB(gd,gdClipSetAdd,[
diff -urN libwmf-0.2.8.4/configure.in libwmf-0.2.8.4-haiku/configure.in
--- libwmf-0.2.8.4/configure.in	2009-03-07 01:58:56.000000000 +0000
+++ libwmf-0.2.8.4-haiku/configure.in	2009-03-07 01:49:01.000000000 +0000
@@ -123,6 +123,9 @@
     os_win32=yes
     SYS_LIBM=""
     ;;
+  haiku*|beos*)
+    SYS_LIBM=""
+    ;;
   *)
     os_win32=no
     SYS_LIBM="-lm"


Add device entry for the device ID 041E:4133 (Creative ZEN MicroPhoto).

Author: Alessio Treglia <quadrispro@ubuntu.com>
Description: Add device entry for
 Creative ZEN MicroPhoto (ID 041E:4133).
Forwarded: http://sourceforge.net/support/tracker.php?aid=3053793
Bug-Ubuntu: https://launchpad.net/bugs/537386
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594560
---
 src/music-players.h |    1 +
 1 file changed, 1 insertion(+)

--- libmtp.orig/src/music-players.h
+++ libmtp/src/music-players.h
@@ -52,6 +52,7 @@
   { "Creative", 0x041e, "ZEN Micro (MTP mode)", 0x4130, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL },
   { "Creative", 0x041e, "ZEN Touch (MTP mode)", 0x4131, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL },
   { "Dell", 0x041e, "Dell Pocket DJ (MTP mode)", 0x4132, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL },
+  { "Creative", 0x041e, "ZEN MicroPhoto", 0x4133, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL },
   { "Creative", 0x041e, "ZEN Sleek (MTP mode)", 0x4137, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL },
   { "Creative", 0x041e, "ZEN MicroPhoto", 0x413c, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL },
   { "Creative", 0x041e, "ZEN Sleek Photo", 0x413d, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL },


--- libpam/Makefile.in.orig	2015-03-18 00:45:11.326276530 +0100
+++ libpam/Makefile.in	2015-03-18 00:55:24.450764190 +0100
@@ -268,6 +268,7 @@
 host_vendor = @host_vendor@
 htmldir = @htmldir@
 includedir = @includedir@
+includesecuritydir = $(includedir)/security
 infodir = @infodir@
 install_sh = @install_sh@
 libc_cv_fpie = @libc_cv_fpie@
@@ -460,24 +461,24 @@
 	-rm -rf .libs _libs
 install-includeHEADERS: $(include_HEADERS)
 	@$(NORMAL_INSTALL)
-	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
-	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	test -z "$(includesecuritydir)" || $(MKDIR_P) "$(DESTDIR)$(includesecuritydir)"
+	@list='$(include_HEADERS)'; test -n "$(includesecuritydir)" || list=; \
 	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 	  echo "$$d$$p"; \
 	done | $(am__base_list) | \
 	while read files; do \
-	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
-	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesecuritydir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesecuritydir)" || exit $$?; \
 	done

 uninstall-includeHEADERS:
 	@$(NORMAL_UNINSTALL)
-	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	@list='$(include_HEADERS)'; test -n "$(includesecuritydir)" || list=; \
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(includedir)" && rm -f $$files
+	echo " ( cd '$(DESTDIR)$(includesecuritydir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(includesecuritydir)" && rm -f $$files

 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \


Add special folder in patches - ToT (Top of Tree) for LLVM. There will go the patches, which make cling to work with llvm's trunk, before our vendor drop gets in sync. EC picks the patches from there only for our nightlies.

Index: tools/cling/lib/Interpreter/LookupHelper.cpp
===================================================================
--- tools/cling/lib/Interpreter/LookupHelper.cpp	(revision 46197)
+++ tools/cling/lib/Interpreter/LookupHelper.cpp	(working copy)
@@ -617,7 +617,7 @@
           //  Do template argument deduction and function argument matching.
           //
           FunctionDecl* Specialization;
-          sema::TemplateDeductionInfo TDI(Context, SourceLocation());
+          sema::TemplateDeductionInfo TDI( (SourceLocation()) );
           Sema::TemplateDeductionResult TDR
             = S.DeduceTemplateArguments(FTD,
                          const_cast<TemplateArgumentListInfo*>(FuncTemplateArgs),
Index: tools/cling/lib/Interpreter/InvocationOptions.cpp
===================================================================
--- tools/cling/lib/Interpreter/InvocationOptions.cpp	(revision 46197)
+++ tools/cling/lib/Interpreter/InvocationOptions.cpp	(working copy)
@@ -25,7 +25,7 @@
   static const OptTable::Info ClingInfoTable[] = {
 #define OPTION(NAME, ID, KIND, GROUP, ALIAS, FLAGS, PARAM,              \
                HELPTEXT, METAVAR)                                       \
-    { NAME, HELPTEXT, METAVAR, Option::KIND##Class, FLAGS, PARAM,       \
+    { NAME, HELPTEXT, METAVAR, OPT_##ID, Option::KIND##Class, FLAGS, PARAM, \
       OPT_##GROUP, OPT_##ALIAS },
 #include "cling/Interpreter/ClingOptions.inc"
 #undef OPTION


Remove gcc -W option not supported on old versions.

--- library/Makefile.orig	2011-07-13 13:25:36.000000000 +0200
+++ library/Makefile	2011-10-14 22:53:58.000000000 +0200
@@ -1,7 +1,7 @@

 # Also see "include/polarssl/config.h"

-CFLAGS	+= -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement
+CFLAGS	+= -I../include -D_FILE_OFFSET_BITS=64 -Wall -W
 OFLAGS	= -O

 # MicroBlaze specific options:
--- programs/Makefile.orig	2011-10-14 22:54:37.000000000 +0200
+++ programs/Makefile	2011-10-14 22:54:50.000000000 +0200
@@ -3,7 +3,7 @@
 # To compile on MinGW: add "-lws2_32" to LDFLAGS
 # To compile with PKCS11: add "-lpkcs11-helper" to LDFLAGS

-CFLAGS	+= -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement
+CFLAGS	+= -I../include -D_FILE_OFFSET_BITS=64 -Wall -W
 OFLAGS	= -O
 LDFLAGS	+= -L../library -lpolarssl $(SYS_LDFLAGS)


Add patch for detecting F90 logical size.

diff --git a/runtime/m4/llnl_fortran_logical_test.m4 b/runtime/m4/llnl_fortran_logical_test.m4
index 5b55506..3968dbb 100644
--- a/runtime/m4/llnl_fortran_logical_test.m4
+++ b/runtime/m4/llnl_fortran_logical_test.m4
@@ -49,7 +49,7 @@ AC_COMPILE_IFELSE([
   AC_LANG_SOURCE([LLNL_FORTRAN_LOGICAL_TEST_PROLOGUE($2)
 void TESTFUNC(char *a, char *b)
 {
-  printf("%d\n", b - a);
+  printf("%ld\n", b - a);
   fflush(stdout); /* needed for gfortran */
 }
 ])],


Add in an ItemRenderer null check so FML can run render adding mods

--- ../src-base/minecraft/net/minecraft/src/ItemRenderer.java
+++ ../src-work/minecraft/net/minecraft/src/ItemRenderer.java
@@ -26,8 +26,12 @@
     public void func_78443_a(EntityLiving p_78443_1_, ItemStack p_78443_2_, int p_78443_3_)
     {
         GL11.glPushMatrix();
-        Block var4 = Block.field_71973_m[p_78443_2_.field_77993_c];
-
+
+        Block var4 = null;
+        if (p_78443_2_.field_77993_c < Block.field_71973_m.length)
+        {
+            var4 = Block.field_71973_m[p_78443_2_.field_77993_c];
+        }
         if (var4 != null && RenderBlocks.func_78597_b(var4.func_71857_b()))
         {
             GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.field_78455_a.field_71446_o.func_78341_b("/terrain.png"));


From 401c0003bf780ef2442f7b13eef65061f6d57201 Mon Sep 17 00:00:00 2001
From: Ronny Chan <ronny6993@gmail.com>
Date: Sun, 22 Feb 2015 17:43:04 -0500
Subject: [PATCH] JSAPI: Correct symbol names (emulatorBridge -> scraper)

---
 Snowflake.StandardAjax/StandardAjax.System.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Snowflake.StandardAjax/StandardAjax.System.cs b/Snowflake.StandardAjax/StandardAjax.System.cs
index 9f26ea5..85bdb32 100644
--- a/Snowflake.StandardAjax/StandardAjax.System.cs
+++ b/Snowflake.StandardAjax/StandardAjax.System.cs
@@ -41,8 +41,8 @@ public IJSResponse GetScrapers(IJSRequest request)
         {
             IDictionary<string, IDictionary<string, dynamic>> response = this.CoreInstance.PluginManager.LoadedScrapers.ToDictionary
                (
-                   emulatorBridge => emulatorBridge.Key,
-                   emulatorBridge => emulatorBridge.Value.PluginInfo
+                   scraper => scraper.Key,
+                   scraper => scraper.Value.PluginInfo
                );
             return new JSResponse(request, response);
         }


diff --git a/apol b/apol
index c3e58f9..d8f6496 100755
--- a/apol
+++ b/apol
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2015, Tresys Technology, LLC
 #
 # This file is part of SETools.
diff --git a/sediff b/sediff
index 34268ca..48b1a54 100755
--- a/sediff
+++ b/sediff
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2015-2016, Tresys Technology, LLC
 #
 # This file is part of SETools.
diff --git a/sedta b/sedta
index e4d4914..279019c 100755
--- a/sedta
+++ b/sedta
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2014-2015, Tresys Technology, LLC
 #
 # This file is part of SETools.
diff --git a/seinfo b/seinfo
index 2b50393..ad83496 100755
--- a/seinfo
+++ b/seinfo
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2014-2015, Tresys Technology, LLC
 #
 # This file is part of SETools.
diff --git a/seinfoflow b/seinfoflow
index 7a2d288..1c75f8e 100755
--- a/seinfoflow
+++ b/seinfoflow
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2014-2015, Tresys Technology, LLC
 #
 # This file is part of SETools.
diff --git a/sesearch b/sesearch
index 7bcdfd2..e2cd4c3 100755
--- a/sesearch
+++ b/sesearch
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2014-2015, Tresys Technology, LLC
 #
 # This file is part of SETools.


Patch that forces MergeFunctions pass for clang. It is temporary patch. We need to keep it in trunk, since it makes easer to test it on buildbots on different platforms. Once we see stable MergeFunctions behaviour with satisfied perfomance, this patch will be removed.

Index: lib/CodeGen/BackendUtil.cpp
===================================================================
--- lib/CodeGen/BackendUtil.cpp	(revision 191330)
+++ lib/CodeGen/BackendUtil.cpp	(working copy)
@@ -336,6 +336,9 @@
       MPM->add(createStripSymbolsPass(true));
   }

+  // Force MergeFunctions pass.
+  MPM->add(createMergeFunctionsPass());
+
   PMBuilder.populateModulePassManager(*MPM);
 }


Make sure that `libffmpeg.dylib` has the correct "install name" even in non-component builds.

diff --git a/BUILD.gn b/BUILD.gn
index 3de144958d..83d9080d0b 100755
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -356,6 +356,13 @@ if (is_component_ffmpeg) {
     # So we can append below and assume they're defined.
     ldflags = []

+    # Chromium's Mac toolchain sets the "install_name" linker parameter only
+    # when "is_component_build" is true, but we want to set even if it's false,
+    # because we are making a dylib which will be distributed inside a bundle.
+    if (!is_component_build && is_mac) {
+      ldflags += [ "-Wl,-install_name,@rpath/libffmpeg.dylib" ]
+    }
+
     if (is_posix && !is_mac) {
       # Fixes warnings PIC relocation when building as component.
       ldflags += [


--- Make_cyg_ming.mak.orig	2015-04-02 15:41:15.405829500 +0100
+++ Make_cyg_ming.mak	2015-04-02 15:42:19.857896300 +0100
@@ -39,10 +39,10 @@
 DIRECTX=no
 # FEATURES=[TINY | SMALL | NORMAL | BIG | HUGE]
 # Set to TINY to make minimal version (few features).
-FEATURES=BIG
+FEATURES=HUGE
 # Set to one of i386, i486, i586, i686 as the minimum target processor.
 # For amd64/x64 architecture set ARCH=x86-64 .
-ARCH=i386
+ARCH=x86-64
 # Set to yes to cross-compile from unix; no=native Windows (and Cygwin).
 CROSS=no
 # Set to path to iconv.h and libiconv.a to enable using 'iconv.dll'.


Add patch to run in Production mode under docker

41c41
<     <TrapErrors>0</TrapErrors>    <!-- Valid: 0=Crash, 1=Trap and Log errors -->
---
>     <TrapErrors>1</TrapErrors>    <!-- Valid: 0=Crash, 1=Trap and Log errors -->
46c46
<     <UseHTTP>1</UseHTTP>          <!-- Valid: 0=use DrA generated HTML, 1=report HTTP 500 status -->
---
>     <UseHTTP>0</UseHTTP>          <!-- Valid: 0=use DrA generated HTML, 1=report HTTP 500 status -->


--- a/src/signals.h	2017-08-23 14:07:05.000000000 +0100
+++ b/src/signals.h	2017-08-23 14:06:53.000000000 +0100
@@ -18,4 +18,4 @@
 /* List of signals that are sent when an invalid virtual memory address
    is accessed, or when the stack overflows.  */
 #define SIGSEGV_FOR_ALL_SIGNALS(var,body) \
-  { int var; var = SIGSEGV; { body } }
+  { int var; var = SIGSEGV; { body } var = SIGBUS; { body } }


From 9fd7e030db8e2b8d10fcce389c26325410486193 Mon Sep 17 00:00:00 2001
From: Han-Wen Nienhuys <hanwen@google.com>
Date: Mon, 28 Nov 2011 23:55:33 -0200
Subject: [PATCH] Add O_TRUNC to open flags for DexOpt output.

Without O_TRUNC, DexOpt cannot overwrite existing output files.
---
 dexopt/OptMain.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dexopt/OptMain.c b/dexopt/OptMain.c
index b8e5889..ab67e7f 100644
--- a/dexopt/OptMain.c
+++ b/dexopt/OptMain.c
@@ -367,7 +367,7 @@ static int preopt(int argc, char* const argv[])
         goto bail;
     }

-    outFd = open(outName, O_RDWR | O_EXCL | O_CREAT, 0666);
+    outFd = open(outName, O_RDWR | O_EXCL | O_CREAT | O_TRUNC, 0666);
     if (outFd < 0) {
         perror(argv[0]);
         goto bail;
--
1.7.3.1


Fix libcaca compile issue caused by imlib update

--- Makefile.am.orig	2016-01-18 22:57:14.568966617 +0100
+++ Makefile.am	2016-01-18 22:57:25.012966536 +0100
@@ -1,5 +1,5 @@

-SUBDIRS = kernel caca src examples tools \
+SUBDIRS = kernel caca src tools \
           cxx caca-sharp python ruby java \
           doc test
 DIST_SUBDIRS = $(SUBDIRS) win32


Use already provided profile for the player's own skin

--- ../src-base/minecraft/net/minecraft/client/resources/SkinManager.java
+++ ../src-work/minecraft/net/minecraft/client/resources/SkinManager.java
@@ -129,7 +129,9 @@

                 if (hashmap.isEmpty() && p_152790_1_.getId().equals(Minecraft.func_71410_x().func_110432_I().func_148256_e().getId()))
                 {
-                    hashmap.putAll(SkinManager.this.field_152797_e.getTextures(SkinManager.this.field_152797_e.fillProfileProperties(p_152790_1_, false), false));
+                    // FORGE: Use already filled profile from session rather
+                    // than getting rate limited by filling the input profile
+                    hashmap.putAll(SkinManager.this.field_152797_e.getTextures(Minecraft.func_71410_x().func_110432_I().func_148256_e(), false));
                 }

                 Minecraft.func_71410_x().func_152344_a(new Runnable()


# HG changeset patch
# Parent 5f659702021e2d505c40ac4d452e80fe0b7be590
# User Sukhbir Singh <sukhbir.in@gmail.com>
Set the default preferences for the patches (https://bugzilla.mozilla.org/show_bug.cgi?id=776397)

diff --git a/mailnews/mailnews.js b/mailnews/mailnews.js
--- a/mailnews/mailnews.js
+++ b/mailnews/mailnews.js
@@ -812,8 +812,15 @@ pref("mail.smtp.qos", 0);
 pref("mail.nntp.qos", 0);

 // default value for IMAP4
 // in a DSCP environment this should be 56 (0x38, or AF13), ibid.
 pref("mail.imap.qos", 0);

 // PgpMime Addon
 pref("mail.pgpmime.addon_url", "https://addons.mozilla.org/addon/enigmail/");
+
+// Send emails with the Date header.
+// If set to false, the Date header will be inserted by the MSA (RFC 4409/RFC 6409).
+pref("mailnews.local_date_header_generation", true);
+
+// Allow a custom message-ID to be set through an extension.
+pref("mailnews.custom_message_id", false);


Patch a file handle leak in RegionFileCache handling when under memory pressure.

--- ../src-base/common/net/minecraft/src/RegionFileCache.java
+++ ../src-work/common/net/minecraft/src/RegionFileCache.java
@@ -4,8 +4,6 @@
 import java.io.DataOutputStream;
 import java.io.File;
 import java.io.IOException;
-import java.lang.ref.Reference;
-import java.lang.ref.SoftReference;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
@@ -18,17 +16,11 @@
     {
         File var3 = new File(p_76550_0_, "region");
         File var4 = new File(var3, "r." + (p_76550_1_ >> 5) + "." + (p_76550_2_ >> 5) + ".mca");
-        Reference var5 = (Reference)field_76553_a.get(var4);
-        RegionFile var6;
+        RegionFile var6 = (RegionFile) field_76553_a.get(var4);

-        if (var5 != null)
+        if (var6 != null)
         {
-            var6 = (RegionFile)var5.get();
-
-            if (var6 != null)
-            {
-                return var6;
-            }
+            return var6;
         }

         if (!var3.exists())
@@ -42,7 +34,7 @@
         }

         var6 = new RegionFile(var4);
-        field_76553_a.put(var4, new SoftReference(var6));
+        field_76553_a.put(var4, var6);
         return var6;
     }

@@ -52,11 +44,9 @@

         while (var0.hasNext())
         {
-            Reference var1 = (Reference)var0.next();
-
             try
             {
-                RegionFile var2 = (RegionFile)var1.get();
+                RegionFile var2 = (RegionFile)var0.next();

                 if (var2 != null)
                 {


commit 7587ef8c63327d862513f810f4a21eb1323bd3a1
Author: EXL <exlmotodev@gmail.com>
Date:   Sat Jul 2 12:22:15 2016 +0000

    Fix type errors

diff --git a/src/com/lavastorm/HiscoreFile.java b/src/com/lavastorm/HiscoreFile.java
index 6aef4d0..c9a9a27 100644
--- a/src/com/lavastorm/HiscoreFile.java
+++ b/src/com/lavastorm/HiscoreFile.java
@@ -193,7 +193,7 @@ public class HiscoreFile
     if (i == -1) {
       return -1;
     }
-    Object localObject = this.m_names[i];
+    String localObject = this.m_names[i];
     String str = null;
     int j = this.m_scores[i];
     int k = 0;
diff --git a/src/com/lavastorm/astrosmash/GameWorld.java b/src/com/lavastorm/astrosmash/GameWorld.java
index 951d8f3..8157006 100644
--- a/src/com/lavastorm/astrosmash/GameWorld.java
+++ b/src/com/lavastorm/astrosmash/GameWorld.java
@@ -178,7 +178,7 @@ public class GameWorld
       this.m_vecFlyingEnemies.removeElementAt(j);
       this.m_enemyFactory.putEnemy(localEnemy);
     }
-    for (i = this.m_vecFlyingBullets.size(); i > 0; i = this.m_vecFlyingBullets.size())
+    for (int i = this.m_vecFlyingBullets.size(); i > 0; i = this.m_vecFlyingBullets.size())
     {
       j = i - 1;
       Collidable localCollidable = (Collidable)this.m_vecFlyingBullets.elementAt(j);
diff --git a/src/com/lavastorm/astrosmash/HiScoreDisplay.java b/src/com/lavastorm/astrosmash/HiScoreDisplay.java
index d111bda..9206854 100644
--- a/src/com/lavastorm/astrosmash/HiScoreDisplay.java
+++ b/src/com/lavastorm/astrosmash/HiScoreDisplay.java
@@ -130,7 +130,7 @@ public class HiScoreDisplay
     localGraphics.setColor(AstrosmashVersion.BLACKCOLOR);
     for (int k = 0; k < 5; k++)
     {
-      localObject = "";
+      String localObject = "";
       if (this.m_highlightPosition == k) {
         localObject = ">";
       }


Index: twisted/web2/server.py
===================================================================
--- twisted/web2/server.py	(revision 18289)
+++ twisted/web2/server.py	(working copy)
@@ -156,7 +156,9 @@
         self.resources = []
         http.Request.__init__(self, *args, **kw)

-    def addResponseFilter(self, f, atEnd=False):
+    def addResponseFilter(self, f, atEnd=False, onlyOnce = False):
+        if onlyOnce and f in self.responseFilters:
+            return
         if atEnd:
             self.responseFilters.append(f)
         else:


Add patch to avoid problem with getpid definition. This is a backport of: FreeTDS/freetds@c5cd068

diff --git a/src/replacements/fakepoll.c b/src/replacements/fakepoll.c
index a043438..b722c8a 100644
--- a/src/replacements/fakepoll.c
+++ b/src/replacements/fakepoll.c
@@ -24,6 +24,10 @@
 #include <stdarg.h>
 #include <stdio.h>

+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
 #include "replacements.h"

 #if HAVE_SYS_TYPES_H
@@ -34,10 +38,6 @@
 #include <errno.h>
 #endif /* HAVE_ERRNO_H */

-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
 #include <freetds/time.h>

 #include <string.h>


Patch our Twisted to not look in /System/ for directories to add twisted/plugins/ to

Index: __init__.py
===================================================================
--- __init__.py	(revision 19773)
+++ __init__.py	(working copy)
@@ -12,6 +12,6 @@
 """

 import os, sys
-__path__ = [os.path.abspath(os.path.join(x, 'twisted', 'plugins')) for x in sys.path]
+__path__ = [os.path.abspath(os.path.join(x, 'twisted', 'plugins')) for x in sys.path if not x.startswith('/System')]

 __all__ = []                    # nothing to see here, move along, move along


Update squid to 3.4.9 an patch for cross compiling

--- ./configure
+++ ./configure
@@ -22221,12 +22221,10 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the SSL_get_certificate is buggy" >&5
 $as_echo_n "checking whether the SSL_get_certificate is buggy... " >&6; }
   if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: cross-compiler, cannot test, assume no" >&5
+$as_echo "$as_me: cross-compiler, cannot test, assume no" >&2;}
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+{  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */

@@ -22263,17 +22261,17 @@
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
+}
 fi

   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the workaround for SSL_get_certificate works" >&5
 $as_echo_n "checking whether the workaround for SSL_get_certificate works... " >&6; }
   if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: cross-compiler, cannot test, assume no" >&5
+$as_echo "$as_me: cross-compiler, cannot test, assume no" >&2;}
 else
+{
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */

@@ -22313,6 +22311,7 @@
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
+}
 fi


Add patch to not line the default constructor of UnicodeString

diff --git a/source/common/unicode/unistr.h b/source/common/unicode/unistr.h
index c98aec7..85b035a 100644
--- a/source/common/unicode/unistr.h
+++ b/source/common/unicode/unistr.h
@@ -2851,7 +2851,7 @@ public:
   /** Construct an empty UnicodeString.
    * @stable ICU 2.0
    */
-  inline UnicodeString();
+  UnicodeString();

   /**
    * Construct a UnicodeString with capacity to hold <TT>capacity</TT> UChars
@@ -3602,16 +3602,6 @@ UnicodeString::getArrayStart() const
 { return (fFlags&kUsingStackBuffer) ? fUnion.fStackBuffer : fUnion.fFields.fArray; }

 //========================================
-// Default constructor
-//========================================
-
-inline
-UnicodeString::UnicodeString()
-  : fShortLength(0),
-    fFlags(kShortString)
-{}
-
-//========================================
 // Read-only implementation methods
 //========================================
 inline int32_t
diff --git a/source/common/unistr.cpp b/source/common/unistr.cpp
index f103e81..ce1452e 100644
--- a/source/common/unistr.cpp
+++ b/source/common/unistr.cpp
@@ -144,7 +144,10 @@ UnicodeString::releaseArray() {
 // Constructors
 //========================================

-// The default constructor is inline in unistr.h.
+UnicodeString::UnicodeString()
+  : fShortLength(0),
+    fFlags(kShortString)
+{}

 UnicodeString::UnicodeString(int32_t capacity, UChar32 c, int32_t count)
   : fShortLength(0),


Add patch file for zephyr 1.6.0 to support gcc 7.1 toolchain. In new gcc-versions was changed typeof(int) from 8 to 4 bytes like for x86 so this patch corrects structure offsets used in assembler

diff --git a/arch/riscv64/core/swap.S b/arch/riscv64/core/swap.S
index b321aed..ba6f7f7 100644
--- a/arch/riscv64/core/swap.S
+++ b/arch/riscv64/core/swap.S
@@ -128,11 +128,11 @@ _IsrWrapper:
 	beqz a0,_IsrExit_ending         # _get_next_ready_thread() == 0 goto ending

 	## Do not reschedule coop threads (threads that have negative prio)
-	ld s1, _thread_offset_to_prio(a0)
+	lw s1, _thread_offset_to_prio(a0)
 	blt  s1,zero,_IsrExit_ending

 	## Do not reschedule if scheduler is locked
-	ld s1, _thread_offset_to_sched_locked(a0)
+	lw s1, _thread_offset_to_sched_locked(a0)
 	bne s1,zero,_IsrExit_ending

 	## Call into the kernel to see if a scheduling decision is necessary
diff --git a/arch/riscv64/core/swap_macros.h b/arch/riscv64/core/swap_macros.h
index f520918..95a4fb3 100644
--- a/arch/riscv64/core/swap_macros.h
+++ b/arch/riscv64/core/swap_macros.h
@@ -19,16 +19,13 @@
 #ifndef _SWAP_MACROS__H_
 #define _SWAP_MACROS__H_

-#define tNANO_FIBER_OFFSET   0
-#define tNANO_TASK_OFFSET    8
 #define tNANO_CURRENT_OFFSET 16

 #define _kernel_offset_to_irq_stack    8
 #define _kernel_offset_to_current      16

-#define _timeout_sizeof                48
-#define _thread_offset_to_prio         24
-#define _thread_offset_to_sched_locked 32
+#define _thread_offset_to_prio         20
+#define _thread_offset_to_sched_locked 24
 #define _thread_offset_to_callee_saved 96  //_thread_base_sizeof+caller_saved

 #define _callee_saved_offset_to_key        256  //(32*sizeof(uint64_t))


Allow placing item frames on Solid Block Faces (isSideSolid)

--- ../src-base/minecraft/net/minecraft/entity/EntityHanging.java
+++ ../src-work/minecraft/net/minecraft/entity/EntityHanging.java
@@ -124,6 +124,9 @@
                 {
                     BlockPos blockpos1 = blockpos.func_177967_a(enumfacing, k).func_177981_b(l);
                     Block block = this.field_70170_p.func_180495_p(blockpos1).func_177230_c();
+
+                    if ( block.isSideSolid( this.field_70170_p, blockpos1, this.field_174860_b ))
+                        continue;

                     if (!block.func_149688_o().func_76220_a() && !BlockRedstoneDiode.func_149909_d(block))
                     {


Fix touchpad lagging issue. port from crrev.com/c/867070
---

diff --git a/gpu/ipc/in_process_command_buffer.cc b/gpu/ipc/in_process_command_buffer.cc
index f5ac52f17443..414a7f647028 100644
--- a/gpu/ipc/in_process_command_buffer.cc
+++ b/gpu/ipc/in_process_command_buffer.cc
@@ -1026,6 +1026,8 @@ void InProcessCommandBuffer::DidCreateAcceleratedSurfaceChildWindow(
     SurfaceHandle parent_window,
     SurfaceHandle child_window) {
   ::SetParent(child_window, parent_window);
+  ::SetWindowPos(child_window, HWND_BOTTOM, 0, 0, 0, 0,
+                 SWP_NOMOVE | SWP_NOSIZE);
 }
 #endif

diff --git a/ui/gfx/win/rendering_window_manager.cc b/ui/gfx/win/rendering_window_manager.cc
index a0528ecf9ab7..72ef021bedbe 100644
--- a/ui/gfx/win/rendering_window_manager.cc
+++ b/ui/gfx/win/rendering_window_manager.cc
@@ -49,6 +49,7 @@ void RenderingWindowManager::DoSetParentOnChild(HWND parent) {
   }

   ::SetParent(child, parent);
+  ::SetWindowPos(child, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
 }

 void RenderingWindowManager::UnregisterParent(HWND parent) {


Add patch to chown files and dirs on creation

From c7734dd626a6d47bb946cfc1611e6c9d1dd67372 Mon Sep 17 00:00:00 2001
From: Graham Whaley <graham.whaley@linux.intel.com>
Date: Thu, 15 Dec 2016 16:24:55 +0000
Subject: [PATCH] kvmtool: p9: chown files and dirs upon creation

The protocol passes in a uid and gid, but we are not chowning
the files to them, just using our default upon creation.
Apply the passed in id's with a chown.

This was found by mounting /tmp over p9 with the S_ISVTX
'sticky' bit set, and finding that files created in /tmp
were not honoring the uid used to create them.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
---
 virtio/9p.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/virtio/9p.c b/virtio/9p.c
index 49e7c5c..30100a5 100644
--- a/virtio/9p.c
+++ b/virtio/9p.c
@@ -286,6 +286,9 @@ static void virtio_p9_create(struct p9_dev *p9dev,
 	if (lstat(full_path, &st) < 0)
 		goto err_out;

+	if (lchown(full_path, dfid->uid, gid) < 0)
+		goto err_out;
+
 	ret = chmod(full_path, mode & 0777);
 	if (ret < 0)
 		goto err_out;
@@ -326,6 +329,9 @@ static void virtio_p9_mkdir(struct p9_dev *p9dev,
 	if (lstat(full_path, &st) < 0)
 		goto err_out;

+	if (lchown(full_path, dfid->uid, gid) < 0)
+		goto err_out;
+
 	ret = chmod(full_path, mode & 0777);
 	if (ret < 0)
 		goto err_out;
--
2.7.4


Index: nslu2_protocol.h
===================================================================
--- nslu2_protocol.h	(revision 39)
+++ nslu2_protocol.h	(working copy)
@@ -183,7 +183,7 @@
 		MaxPacketLength = 1540-14,   /* at least 600 from the RedBoot code */
 		BaseAddress = 0x60000,       /* skip RedBoot and SysConf */
 		UpgradeProtocol = 0x8888,    /* defined in the RedBoot code */
-		Ln2FlashSize = 23,           /* 8MByte Flash memory */
+		Ln2FlashSize = 24,           /* 16MByte Flash memory */
 		FlashSize = (1<<Ln2FlashSize),
 		/* The MaxPendingPackets figure is the number of packets which will
 		 * be transmitted without receiving a response, this value should be


Format strings properly in MC's internal logger. Fixes resource pack case warnings.

--- ../src_base/minecraft/net/minecraft/logging/LogAgent.java
+++ ../src_work/minecraft/net/minecraft/logging/LogAgent.java
@@ -72,7 +72,7 @@

     public void logWarningFormatted(String par1Str, Object ... par2ArrayOfObj)
     {
-        this.serverLogger.log(Level.WARNING, par1Str, par2ArrayOfObj);
+        this.serverLogger.log(Level.WARNING, String.format(par1Str, par2ArrayOfObj));
     }

     public void logWarningException(String par1Str, Throwable par2Throwable)


diff --git a/src/assistant/lib/fulltextsearch/fulltextsearch.pro b/src/assistant/lib/fulltextsearch/fulltextsearch.pro
index b212154..3394bd4 100644
--- a/src/assistant/lib/fulltextsearch/fulltextsearch.pro
+++ b/src/assistant/lib/fulltextsearch/fulltextsearch.pro
@@ -5,7 +5,7 @@ load(qt_module)
 QMAKE_TARGET_PRODUCT = QtCLucene
 QMAKE_TARGET_DESCRIPTION = QtCLucene full text search library wrapper.
 #if qt is built with frameworks in debug, we must build QtCLucene in debug and release
-#that's a similar logic as in qbase.pri
+#that''s a similar logic as in qbase.pri
 mac:!static:contains(QT_CONFIG, qt_framework) {
    CONFIG(debug, debug|release) {
       !build_pass:CONFIG += build_all
diff --git a/src/assistant/lib/lib.pro b/src/assistant/lib/lib.pro
index 1387820..7d63775 100644
--- a/src/assistant/lib/lib.pro
+++ b/src/assistant/lib/lib.pro
@@ -35,7 +35,8 @@ linux-lsb-g++:LIBS_PRIVATE += --lsb-shared-libs=$$qclucene
 unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES += QtNetwork \
     QtSql \
     QtXml
-LIBS_PRIVATE += -l$$qclucene
+FTS_LUCENE_LIB_DIR = fulltextsearch
+LIBS_PRIVATE += -L$$FTS_LUCENE_LIB_DIR -l$$qclucene
 RESOURCES += helpsystem.qrc
 SOURCES += qhelpenginecore.cpp \
     qhelpengine.cpp \


Add patch to expose "File" class's "path" attribute.

diff --git a/third_party/WebKit/Source/core/fileapi/File.idl b/third_party/WebKit/Source/core/fileapi/File.idl
index 666b073..afc7de8 100644
--- a/third_party/WebKit/Source/core/fileapi/File.idl
+++ b/third_party/WebKit/Source/core/fileapi/File.idl
@@ -33,6 +33,7 @@
     Exposed=(Window,Worker),
 ] interface File : Blob {
     readonly attribute DOMString name;
+    readonly attribute DOMString path;
     readonly attribute long long lastModified;

     // Non-standard APIs


From c8af46e18d0acfef9db7e2edda052b3546236590 Mon Sep 17 00:00:00 2001
From: Chun-wei Fan <fanchunwei@src.gnome.org>
Date: Wed, 10 Jun 2015 14:03:57 +0800
Subject: [PATCH] cairo-polygon.c: Work Around MSVC 2010/2012 x64 Optimization
 Bug

Only assert top < bottom when one or both top and bottom are not 0, so that
the program does not assert when top = bottom = 0, likely due to an
optimization issue
---
 src/cairo-polygon.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/cairo-polygon.c b/src/cairo-polygon.c
index b0424f6..a27edc1 100644
--- a/src/cairo-polygon.c
+++ b/src/cairo-polygon.c
@@ -293,7 +293,8 @@ _add_edge (cairo_polygon_t *polygon,
 {
     cairo_edge_t *edge;

-    assert (top < bottom);
+    if (top != 0 || bottom != 0)
+      assert (top < bottom);

     if (unlikely (polygon->num_edges == polygon->edges_size)) {
 	if (! _cairo_polygon_grow (polygon))
--
2.3.5.windows.8


diff --git a/DEPS b/DEPS
index f2b3cc9..88557e8 100644
--- a/DEPS
+++ b/DEPS
@@ -72,6 +72,7 @@ vars = {
   'dart_oauth2_tag': '1.2.1',
   'dart_observatory_pub_packages_rev': '0894122173b0f98eb08863a7712e78407d4477bc',
   'dart_package_config_tag': '2453cd2e78c2db56ee2669ced17ce70dd00bf576',
+  'dart_package_config_v2_tag': '8e776a8b05951d4104aa101151df26a2c5ac931f',
   'dart_package_resolver_tag': '1.0.10',
   'dart_path_tag': '1.6.2',
   'dart_pedantic_tag': 'v1.8.0',
@@ -373,6 +374,9 @@ deps = {
   'src/third_party/dart/third_party/pkg_tested/package_config':
    Var('dart_git') + '/package_config.git' + '@' + Var('dart_package_config_tag'),

+  'src/third_party/dart/third_party/pkg/package_config_v2':
+   Var('dart_git') + '/package_config.git' + '@' + Var('dart_package_config_v2_tag'),
+
   'src/third_party/dart/third_party/pkg_tested/package_resolver':
    Var('dart_git') + '/package_resolver.git' + '@' + Var('dart_package_resolver_tag'),


Add patch for unused local var in DisplayItemList.cpp

diff --git a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp
index f338a95..cde934f 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemList.cpp
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.

+#include "base/compiler_specific.h"
 #include "platform/graphics/paint/DisplayItemList.h"

 #include "platform/graphics/LoggingCanvas.h"
@@ -49,6 +50,7 @@
     json->SetInteger("index", i);

     bool show_client_debug_name = options & kShowClientDebugName;
+    ALLOW_UNUSED_LOCAL(show_client_debug_name);
 #if DCHECK_IS_ON()
     if (display_item.HasValidClient()) {
       if (display_item.Client().IsAlive())


diff -urN moab-5.2.1.orig/CMakeLists.txt moab-5.2.1/CMakeLists.txt
--- moab-5.2.1.orig/CMakeLists.txt	2020-08-23 04:59:23.000000000 +0200
+++ moab-5.2.1/CMakeLists.txt	2021-02-03 15:57:13.020620400 +0100
@@ -391,7 +391,7 @@
 add_subdirectory( src )
 message(STATUS "Adding itaps subdirectory.")
 add_subdirectory( itaps )
-if (NOT WIN32) # Need further work to prepare for windows
+if (NOT WIN32 OR MSYS OR MINGW) # Need further work to prepare for windows
   add_subdirectory( tools )
 endif ()
 if (ENABLE_PYMOAB)


--- /tmp/base-files/files/lib/network/config.sh	2011-06-30 10:07:56.649293323 -0400
+++ base-files/files/lib/network/config.sh	2011-06-30 10:25:14.993652898 -0400
@@ -362,6 +362,8 @@

 			[ -z "$ipaddr" ] || \
 				$DEBUG ifconfig "$iface" "$ipaddr" ${netmask:+netmask "$netmask"}
+			[ -n "$hostname" ] || hostname=$(uci -q get system.@system[0].hostname)
+			[ "$hostname" = "none" ] && hostname=""

 			# additional request options
 			local opt dhcpopts

Update hostname patch for r28522

--- /tmp/base-files-network/files/lib/network/config.sh	2011-10-22 13:43:38.138311346 -0400
+++ base-files-network/files/lib/network/config.sh	2011-10-22 13:53:51.322778137 -0400
@@ -378,6 +378,8 @@

 			[ -z "$ipaddr" ] || \
 				$DEBUG ifconfig "$iface" "$ipaddr" ${netmask:+netmask "$netmask"}
+			[ -n "$hostname" ] || hostname=$(uci -q get system.@system[0].hostname)
+			[ "$hostname" = "none" ] && hostname=""

 			# additional request options
 			local opt dhcpopts


--- a/run.py
+++ b/run.py
@@ -476,7 +476,7 @@ def getScidbVersion (scidbEnv):
     curr_dir=os.getcwd()

     cmdList=[bin_path,
-             "usage", "|&", "grep", "\"SciDB version:\""]
+             "usage", "2>&1", "|", "grep", "\"SciDB version:\""]
     ret,out,err = executeIt(cmdList,
                             useShell=True,
                             collectOutput=True,


Patch to allow libmad to build with gcc4.

diff -urN libmad-0.15.1b/configure.ac libmad-0.15.1b-haiku/configure.ac
--- libmad-0.15.1b/configure.ac	2004-01-23 09:41:32.061341696 +0000
+++ libmad-0.15.1b-haiku/configure.ac	2010-09-16 12:16:45.656146432 +0000
@@ -140,8 +140,6 @@
     case "$optimize" in
 	-O|"-O "*)
 	    optimize="-O"
-	    optimize="$optimize -fforce-mem"
-	    optimize="$optimize -fforce-addr"
 	    : #x optimize="$optimize -finline-functions"
 	    : #- optimize="$optimize -fstrength-reduce"
 	    optimize="$optimize -fthread-jumps"


diff --git chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
index 91674b9..8a4c391 100644
--- chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
+++ chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
@@ -116,7 +116,7 @@ void AppIndicatorIconMenu::OnMenuItemActivated(GtkWidget* menu_item) {
     return;

   // The menu item can still be activated by hotkeys even if it is disabled.
-  if (menu_model_->IsEnabledAt(id))
+  if (model->IsEnabledAt(id))
     ExecuteCommand(model, id);
 }

Add missing a/b patch prefix

diff --git a/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc b/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
index 91674b9..8a4c391 100644
--- a/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
+++ b/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
@@ -116,7 +116,7 @@ void AppIndicatorIconMenu::OnMenuItemActivated(GtkWidget* menu_item) {
     return;

   // The menu item can still be activated by hotkeys even if it is disabled.
-  if (menu_model_->IsEnabledAt(id))
+  if (model->IsEnabledAt(id))
     ExecuteCommand(model, id);
 }


Handle KeyError for missing xattr names.

Index: twisted/web2/dav/xattrprops.py
===================================================================
--- twisted/web2/dav/xattrprops.py	(revision 26899)
+++ twisted/web2/dav/xattrprops.py	(working copy)
@@ -123,6 +123,10 @@
         """
         try:
             data = self.attrs.get(self._encode(qname))
+        except KeyError:
+            raise HTTPError(StatusResponse(
+                    responsecode.NOT_FOUND,
+                    "No such property: {%s}%s" % qname))
         except IOError, e:
             if e.errno in _ATTR_MISSING:
                 raise HTTPError(StatusResponse(
@@ -198,6 +202,8 @@
         try:
             try:
                 self.attrs.remove(key)
+            except KeyError:
+                pass
             except IOError, e:
                 if e.errno not in _ATTR_MISSING:
                     raise
@@ -221,6 +227,8 @@
         key = self._encode(qname)
         try:
             self.attrs.get(key)
+        except KeyError:
+            return False
         except IOError, e:
             if e.errno in _ATTR_MISSING or e.errno == errno.ENOENT:
                 return False


Order CameraRoll results on iOS by modification date

diff --git a/node_modules/@react-native-community/cameraroll/ios/.RNCCameraRollManager.m.swp b/node_modules/@react-native-community/cameraroll/ios/.RNCCameraRollManager.m.swp
new file mode 100644
index 0000000..5f05a91
Binary files /dev/null and b/node_modules/@react-native-community/cameraroll/ios/.RNCCameraRollManager.m.swp differ
diff --git a/node_modules/@react-native-community/cameraroll/ios/RNCCameraRollManager.m b/node_modules/@react-native-community/cameraroll/ios/RNCCameraRollManager.m
index 566d8fc..862aa42 100644
--- a/node_modules/@react-native-community/cameraroll/ios/RNCCameraRollManager.m
+++ b/node_modules/@react-native-community/cameraroll/ios/RNCCameraRollManager.m
@@ -236,7 +236,7 @@ static void RCTResolvePromise(RCTPromiseResolveBlock resolve,

   // Predicate for fetching assets within a collection
   PHFetchOptions *const assetFetchOptions = [RCTConvert PHFetchOptionsFromMediaType:mediaType];
-  assetFetchOptions.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"creationDate" ascending:NO]];
+  assetFetchOptions.sortDescriptors = @[[NSSortDescriptor sortDescriptorWithKey:@"modificationDate" ascending:NO]];

   BOOL __block foundAfter = NO;
   BOOL __block hasNextPage = NO;


Add patch for nvidia GPU's on High Sierra

diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json
index ebdfca0..bcbcb4a 100644
--- a/gpu/config/software_rendering_list.json
+++ b/gpu/config/software_rendering_list.json
@@ -1460,6 +1460,24 @@
       "features": [
         "webgl2"
       ]
+    },
+    {
+      "id": 150,
+      "description": "Macs with NVidia GPUs experience rendering issues on High Sierra",
+      "cr_bugs": [773705],
+      "os": {
+        "type": "macosx",
+        "version": {
+          "op": ">=",
+          "value": "10.13"
+        }
+      },
+      "vendor_id": "0x10de",
+      "multi_gpu_category": "any",
+      "features": [
+        "accelerated_2d_canvas",
+        "gpu_rasterization"
+      ]
     }
   ],
   "comment": [


Patch for configure.ac : AC_CONFIG_MACRO([m4]) and s/AC_PROG_RANLIB/LT_INIT

diff -Naur sharutils-4.6.3-original/configure.ac sharutils-4.6.3/configure.ac
--- sharutils-4.6.3-original/configure.ac	2009-04-07 00:40:07.000000000 -0400
+++ sharutils-4.6.3/configure.ac	2009-04-07 00:41:01.000000000 -0400
@@ -9,6 +9,7 @@
 AC_INIT([sharutils], sharutils_version, sharutils_eaddr)
 AC_CONFIG_SRCDIR([src/shar.c])
 AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])

 AM_INIT_AUTOMAKE([1.9 gnits dist-bzip2])
 AC_SUBST(DIST_ALPHA)
@@ -20,7 +21,7 @@
 AC_PROG_CC
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
-AC_PROG_RANLIB
+LT_INIT

 dnl FIXME: Check that it is GNU diff indeed.
 # Carefully avoid gdiff for X as found on SGI systems.


Index: tools/clang/include/clang/Basic/DiagnosticSemaKinds.td
===================================================================
--- tools/clang/include/clang/Basic/DiagnosticSemaKinds.td	(版本 179269)
+++ tools/clang/include/clang/Basic/DiagnosticSemaKinds.td	(工作副本)
@@ -5736,6 +5736,8 @@
 def warn_null_arg : Warning<
   "null passed to a callee which requires a non-null argument">,
   InGroup<NonNull>;
+def warn_null_ptr_deref: Warning<
+  "you are about to dereference null ptr, which probably will lead to seg violation. Do you want to proceed?[y/n]">;

 // CHECK: returning address/reference of stack memory
 def warn_ret_stack_addr : Warning<


Patch to compile with uclibcxx instead of libstdc++


Fix jmemmgr.c build on Visual Studio 2008

From d77b4b1d3525b6b643d9b7b08aed120d1cf77266 Mon Sep 17 00:00:00 2001
From: Chun-wei Fan <fanchunwei@src.gnome.org>
Date: Fri, 24 Mar 2017 16:29:16 +0800
Subject: [PATCH] jmemmgr.c: Include stdint.h on Visual Studio 2010 or later

Visual Studio 2008 does not come with stdint.h, so just include it on
non-Visual Studio or when we are building on 2010 or later.
---
 jmemmgr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/jmemmgr.c b/jmemmgr.c
index adccbdf..6415f77 100644
--- a/jmemmgr.c
+++ b/jmemmgr.c
@@ -32,7 +32,9 @@
 #include "jinclude.h"
 #include "jpeglib.h"
 #include "jmemsys.h"            /* import the system-dependent declarations */
-#include <stdint.h>
+#if !defined (_MSC_VER) || (_MSC_VER >= 1600)
+# include <stdint.h>
+#endif

 #ifndef NO_GETENV
 #ifndef HAVE_STDLIB_H           /* <stdlib.h> should declare getenv() */
--
2.10.2.windows.1


Patch WCONTINUED in slang for old toolchains

--- modules/fork-module.c.orig	2010-12-13 07:18:53.000000000 +0000
+++ modules/fork-module.c	2011-01-26 10:40:11.000000000 +0000
@@ -35,6 +35,10 @@
 #include <string.h>
 #include <slang.h>

+#ifndef WCONTINUED
+#define WCONTINUED 8
+#endif
+
 SLANG_MODULE(fork);

 static int fork_intrinsic (void)


Patch for subversion-1.6.5 to change the default location of the config-dir on Haiku from ~/.subversion to /boot/home/config/settings/subversion

diff -urN subversion-1.6.5/subversion/libsvn_subr/config_impl.h subversion-1.6.5-haiku/subversion/libsvn_subr/config_impl.h
--- subversion-1.6.5/subversion/libsvn_subr/config_impl.h	2009-01-27 13:23:50.000000000 +0000
+++ subversion-1.6.5-haiku/subversion/libsvn_subr/config_impl.h	2009-09-02 13:43:03.000000000 +0000
@@ -109,6 +109,9 @@
    or svn_config_get_user_config_path() instead. */
 #ifdef WIN32
 #  define SVN_CONFIG__SUBDIRECTORY    "Subversion"
+#elif defined __HAIKU__ /* HAIKU */
+#  define SVN_CONFIG__SYS_DIRECTORY   "/boot/common/etc/subversion"
+#  define SVN_CONFIG__USR_DIRECTORY   "/boot/home/config/settings/subversion"
 #else  /* ! WIN32 */
 #  define SVN_CONFIG__SYS_DIRECTORY   "/etc/subversion"
 #  define SVN_CONFIG__USR_DIRECTORY   ".subversion"


Fix Thunderbird 5.0: Add missing patch of the build system.

diff -x _inst -x _build -x .svn -ur comm-miramar/config/rules.mk comm-miramar.after/config/rules.mk
--- comm-miramar/config/rules.mk	2011-06-24 22:13:31.000000000 +0200
+++ comm-miramar/config/rules.mk	2011-08-15 12:27:07.305556040 +0200
@@ -851,9 +851,13 @@

 ifndef _LIBNAME_RELATIVE_PATHS

-LIBS_DEPS += $(filter -l%, $(LIBS))
-HOST_LIBS_DEPS += $(filter -l%, $(HOST_LIBS))
-DSO_LDOPTS_DEPS += $(filter -l%, $(EXTRA_DSO_LDOPTS))
+LIBS_DEPS += $(patsubst -l%,$(LIB_PREFIX)%$(DLL_SUFFIX),$(filter-out -lpthread -ldl -lrt -ljemalloc -lmozmalloc,$(filter -l%, $(LIBS))))
+HOST_LIBS_DEPS += $(patsubst -l%,$(LIB_PREFIX)%$(DLL_SUFFIX),$(filter-out -lpthread -ldl -lrt -ljemalloc -lmozmalloc,$(filter -l%, $(HOST_LIBS))))
+DSO_LDOPTS_DEPS += $(patsubst -l%,$(LIB_PREFIX)%$(DLL_SUFFIX),$(filter-out -lpthread -ldl -lrt -ljemalloc -lmozmalloc,$(filter -l%, $(EXTRA_DSO_LDOPTS))))
+
+LIBS_DEPS += $(patsubst -l%,$(LIB_PREFIX)%.$(LIB_SUFFIX),$(filter -ljemalloc -lmozmalloc, $(LIBS)))
+HOST_LIBS_DEPS += $(patsubst -l%,$(LIB_PREFIX)%.$(LIB_SUFFIX),$(filter -ljemalloc -lmozmalloc, $(HOST_LIBS)))
+DSO_LDOPTS_DEPS += $(patsubst -l%,$(LIB_PREFIX)%.$(LIB_SUFFIX),$(filter -ljemalloc -lmozmalloc, $(EXTRA_DSO_LDOPTS)))

 _LIBDIRS = $(patsubst -L%,%,$(filter -L%, $(LIBS) $(HOST_LIBS) $(EXTRA_DSO_LDOPTS)))
 ifneq (,$(_LIBDIRS))
Seulement dans comm-miramar.after/config: rules.mk~


Add patch to remove DCHECK in clipboard_win.cc

diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
index 674b0e9a909c..a1bff6e40f56 100644
--- a/ui/base/clipboard/clipboard_win.cc
+++ b/ui/base/clipboard/clipboard_win.cc
@@ -886,9 +886,9 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,
 }

 void ClipboardWin::WriteToClipboard(unsigned int format, HANDLE handle) {
-  DCHECK(clipboard_owner_->hwnd() != NULL);
+  // DCHECK(clipboard_owner_->hwnd() != NULL);
   if (handle && !::SetClipboardData(format, handle)) {
-    DCHECK(ERROR_CLIPBOARD_NOT_OPEN != GetLastError());
+    // DCHECK(ERROR_CLIPBOARD_NOT_OPEN != GetLastError());
     FreeData(format, handle);
   }
 }


diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
index 4a11081..556d4b0 100644
--- a/package/system/fstools/Makefile
+++ b/package/system/fstools/Makefile
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk

 PKG_NAME:=fstools
-PKG_VERSION:=2016-04-30
+PKG_VERSION:=2016-05-12

 PKG_RELEASE=$(PKG_SOURCE_VERSION)

 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(OPENWRT_GIT)/project/fstools.git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=bb92c29fc4cd90d396fc79078eba75fcb01c92ae
+PKG_SOURCE_VERSION:=ed224f0b1f9cfb3f8c5766cba3a60343c0eda586
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
 CMAKE_INSTALL:=1


Improve oclif missing argument/flag errors

diff --git a/node_modules/@oclif/parser/lib/errors.js b/node_modules/@oclif/parser/lib/errors.js
index 93912ca..c4cac1d 100644
--- a/node_modules/@oclif/parser/lib/errors.js
+++ b/node_modules/@oclif/parser/lib/errors.js
@@ -10,7 +10,8 @@ const m = deps_1.default()
     .add('list', () => require('./list'));
 class CLIParseError extends errors_1.CLIError {
     constructor(options) {
-        options.message += '\nSee more help with --help';
+        const help = options.command ? `\`${options.command} --help\`` : '--help';
+        options.message += `\nSee more help with ${help}`;
         super(options.message);
         this.parse = options.parse;
     }
@@ -31,22 +32,24 @@ class InvalidArgsSpecError extends CLIParseError {
 exports.InvalidArgsSpecError = InvalidArgsSpecError;
 class RequiredArgsError extends CLIParseError {
     constructor({ args, parse }) {
-        let message = `Missing ${args.length} required arg${args.length === 1 ? '' : 's'}`;
+        const command = 'balena ' + parse.input.context.id.replace(/:/g, ' ');
+        let message = `Missing ${args.length} required argument${args.length === 1 ? '' : 's'}`;
         const namedArgs = args.filter(a => a.name);
         if (namedArgs.length) {
             const list = m.list.renderList(namedArgs.map(a => [a.name, a.description]));
             message += `:\n${list}`;
         }
-        super({ parse, message });
+        super({ parse, message, command });
         this.args = args;
     }
 }
 exports.RequiredArgsError = RequiredArgsError;
 class RequiredFlagError extends CLIParseError {
     constructor({ flag, parse }) {
+        const command = 'balena ' + parse.input.context.id.replace(/:/g, ' ');
         const usage = m.list.renderList(m.help.flagUsages([flag], { displayRequired: false }));
         const message = `Missing required flag:\n${usage}`;
-        super({ parse, message });
+        super({ parse, message, command });
         this.flag = flag;
     }
 }
diff --git a/node_modules/@oclif/parser/lib/list.js b/node_modules/@oclif/parser/lib/list.js
index 3907cc0..b689ca1 100644
--- a/node_modules/@oclif/parser/lib/list.js
+++ b/node_modules/@oclif/parser/lib/list.js
@@ -21,7 +21,7 @@ function renderList(items) {
         }
         left = left.padEnd(maxLength);
         right = linewrap(maxLength + 2, right);
-        return `${left}  ${right}`;
+        return `${left} : ${right}`;
     });
     return lines.join('\n');
 }


From 729f8b83b1002ae272e75a6139631846946f728f Mon Sep 17 00:00:00 2001
From: Kern Sibbald <kern@sibbald.com>
Date: Thu, 10 Sep 2009 15:19:13 +0200
Subject: [PATCH] Add more info when SD connection refused

as mentioned in bug #1371
---
 bacula/src/stored/dircmd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bacula/src/stored/dircmd.c b/bacula/src/stored/dircmd.c
index 4f4a2d7..b011802 100644
--- a/bacula/src/stored/dircmd.c
+++ b/bacula/src/stored/dircmd.c
@@ -152,7 +152,7 @@ void *handle_connection_request(void *arg)
    char tbuf[100];

    if (bs->recv() <= 0) {
-      Emsg0(M_ERROR, 0, _("Connection request failed.\n"));
+      Emsg1(M_ERROR, 0, _("Connection request from %s failed.\n"), bs->who());
       bs->close();
       return NULL;
    }
@@ -162,7 +162,7 @@ void *handle_connection_request(void *arg)
     */
    if (bs->msglen < 25 || bs->msglen > (int)sizeof(name)) {
       Dmsg1(000, "<filed: %s", bs->msg);
-      Emsg1(M_ERROR, 0, _("Invalid connection. Len=%d\n"), bs->msglen);
+      Emsg2(M_ERROR, 0, _("Invalid connection from %s. Len=%d\n"), bs->who(), bs->msglen);
       bs->close();
       return NULL;
    }
--
1.6.4.2


Set default `alter_time` column value on `salt_events` table

diff --git a/db/schema.rb b/db/schema.rb
index 32e62d2..83a9de8 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -44,7 +44,7 @@ ActiveRecord::Schema.define(version: 20170227152008) do
   create_table "salt_events", force: :cascade do |t|
     t.string   "tag",          limit: 255,      null: false
     t.text     "data",         limit: 16777215, null: false
-    t.datetime "alter_time",                    null: false
+    t.column   "alter_time",   "DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP"
     t.string   "master_id",    limit: 255,      null: false
     t.datetime "taken_at"
     t.datetime "processed_at"
@@ -60,7 +60,7 @@ ActiveRecord::Schema.define(version: 20170227152008) do
     t.string   "id",         limit: 255,      null: false
     t.string   "success",    limit: 10,       null: false
     t.text     "full_ret",   limit: 16777215, null: false
-    t.datetime "alter_time",                  null: false
+    t.column   "alter_time", "DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP"
   end

   add_index "salt_returns", ["fun"], name: "fun", using: :btree


Disable more debug spam in the 8192cu drier

--- 8192cu/include/autoconf.h.orig	2012-12-27 15:42:26.265902118 -0500
+++ 8192cu/include/autoconf.h	2012-12-27 15:43:09.750503696 -0500
@@ -253,9 +253,9 @@
 //#define CONFIG_DEBUG_RTL871X

 #define DBG	0
-#define CONFIG_DEBUG_RTL819X
+//#define CONFIG_DEBUG_RTL819X

-#define CONFIG_PROC_DEBUG	1
+//#define CONFIG_PROC_DEBUG	1

 //#define DBG_IO
 //#define DBG_DELAY_OS


From 8956b4fa10af0df2f8912f6116aa1e970dc0283a Mon Sep 17 00:00:00 2001
From: bjorn3 <bjorn3@users.noreply.github.com>
Date: Sun, 18 Aug 2019 17:44:47 +0200
Subject: [PATCH] Workaround rust regression

---
 src/liballoc/macros.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/liballoc/macros.rs b/src/liballoc/macros.rs
index 0b5e186..250c419 100644
--- a/src/liballoc/macros.rs
+++ b/src/liballoc/macros.rs
@@ -98,5 +98,5 @@ macro_rules! vec {
 #[macro_export]
 #[stable(feature = "rust1", since = "1.0.0")]
 macro_rules! format {
-    ($($arg:tt)*) => ($crate::fmt::format(::core::format_args!($($arg)*)))
+    ($($arg:tt)*) => ($crate::fmt::format(format_args!($($arg)*)))
 }
--
2.20.1 (Apple Git-117)


Fix font rendering on first display of controls

#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

--- qt-2.3.7/src/kernel/qgfxraster_qws.cpp~fix-qgfxraster
+++ qt-2.3.7/src/kernel/qgfxraster_qws.cpp
@@ -3876,14 +3876,15 @@
 	for( loopc2=0;loopc2<frontadd;loopc2++ )
 	    *(alphaptr++)=get_value_32(16,(unsigned char **)&temppos);

-	PackType temp2;
-	unsigned char * cp;
+	volatile PackType temp2;
+	volatile unsigned short int * cp;
 	for( loopc2=0;loopc2<count;loopc2++ ) {
-	    temp2=*((PackType *)temppos);
-	    cp=(unsigned char *)&temp2;
-	    *(alphaptr++)=get_value_32(16,&cp);
-	    *(alphaptr++)=get_value_32(16,&cp);
-	    temppos += 2;
+           temp2=*reinterpret_cast<PackType *>(temppos);
+           cp=reinterpret_cast<volatile unsigned short int *>(&temp2);
+           *(alphaptr++)=qt_conv16ToRgb(*cp);
+           cp++;
+           *(alphaptr++)=qt_conv16ToRgb(*cp);
+	    temppos += 2;
 	}

 	for( loopc2=0;loopc2<backadd;loopc2++ )


diff --git a/src/d_fft_fftsg.c b/src/d_fft_fftsg.c
index 22d14bc..04cd7aa 100644
--- a/src/d_fft_fftsg.c
+++ b/src/d_fft_fftsg.c
@@ -21,6 +21,8 @@ for another, more permissive-sounding copyright notice.  -MSP
 /* ---------- Pd interface to OOURA FFT; imitate Mayer API ---------- */
 #include "m_pd.h"

+#include <malloc.h>
+
 #ifdef HAVE_ALLOCA_H        /* ifdef nonsense to find include for alloca() */
 # include <alloca.h>        /* linux, mac, mingw, cygwin */
 #elif defined _MSC_VER
diff --git a/src/x_array.c b/src/x_array.c
index 6a9e2eb..1ee1694 100644
--- a/src/x_array.c
+++ b/src/x_array.c
@@ -16,6 +16,8 @@
 #endif
 extern t_pd *newest;    /* OK - this should go into a .h file now :) */

+#include <malloc.h>
+
 #ifdef HAVE_ALLOCA_H        /* ifdef nonsense to find include for alloca() */
 # include <alloca.h>        /* linux, mac, mingw, cygwin */
 #elif defined _MSC_VER
diff --git a/src/x_list.c b/src/x_list.c
index 8b84f18..b148dcc 100644
--- a/src/x_list.c
+++ b/src/x_list.c
@@ -5,6 +5,8 @@
 #include "m_pd.h"
 /* #include <string.h> */

+#include <malloc.h>
+
 #ifdef HAVE_ALLOCA_H        /* ifdef nonsense to find include for alloca() */
 # include <alloca.h>        /* linux, mac, mingw, cygwin */
 #elif defined _MSC_VER
diff --git a/src/x_text.c b/src/x_text.c
index 852dbc8..5df8bf8 100644
--- a/src/x_text.c
+++ b/src/x_text.c
@@ -19,6 +19,8 @@ moment it also defines "text" but it may later be better to split this off. */
 extern t_pd *newest;    /* OK - this should go into a .h file now :) */
 static t_class *text_define_class;

+#include <malloc.h>
+
 #ifdef HAVE_ALLOCA_H        /* ifdef nonsense to find include for alloca() */
 # include <alloca.h>        /* linux, mac, mingw, cygwin */
 #elif defined _MSC_VER


Fix LAN to try hard to find a real network interface, not just localhost most of the time

--- ../src-base/minecraft/net/minecraft/src/IntegratedServerListenThread.java
+++ ../src-work/minecraft/net/minecraft/src/IntegratedServerListenThread.java
@@ -4,6 +4,12 @@
 import cpw.mods.fml.common.asm.SideOnly;
 import java.io.IOException;
 import java.net.InetAddress;
+import java.net.NetworkInterface;
+import java.util.Collections;
+
+import com.google.common.collect.Iterators;
+import com.google.common.collect.Lists;
+
 import net.minecraft.server.MinecraftServer;

 @SideOnly(Side.CLIENT)
@@ -48,7 +54,32 @@

             try
             {
-                this.field_71757_g = new ServerListenThread(this, InetAddress.getLocalHost(), var1);
+                InetAddress add = null;
+                NetworkInterface notLocal = null;
+                for (NetworkInterface ni : Collections.list(NetworkInterface.getNetworkInterfaces()))
+                {
+                    if (!ni.isLoopback() && ni.isUp())
+                    {
+                        notLocal = ni;
+                        break;
+                    }
+                }
+                if (notLocal != null)
+                {
+                    for (InetAddress inadd : Collections.list(notLocal.getInetAddresses()))
+                    {
+                        if (inadd.getAddress().length == 4)
+                        {
+                            add = inadd;
+                            break;
+                        }
+                    }
+                }
+                if (add == null)
+                {
+                    add = InetAddress.getLocalHost();
+                }
+                this.field_71757_g = new ServerListenThread(this, add, var1);
                 this.field_71757_g.start();
             }
             catch (IOException var3)


Fix ObjectIntIdentityMap sporadically matching non-identical objects.

--- ../src-base/minecraft/net/minecraft/util/ObjectIntIdentityMap.java
+++ ../src-work/minecraft/net/minecraft/util/ObjectIntIdentityMap.java
@@ -2,20 +2,21 @@

 import com.google.common.base.Predicates;
 import com.google.common.collect.Iterators;
-import gnu.trove.map.hash.TIntIntHashMap;
 import java.util.ArrayList;
+import java.util.IdentityHashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;

 public class ObjectIntIdentityMap implements IObjectIntIterable
 {
-    protected TIntIntHashMap field_148749_a = new TIntIntHashMap(256, 0.5F, -1, -1);
+    protected Map<Object, Integer> field_148749_a = new IdentityHashMap<Object, Integer>(512);
     protected List field_148748_b = new ArrayList();
     private static final String __OBFID = "CL_00001203";

     public void func_148746_a(Object p_148746_1_, int p_148746_2_)
     {
-        this.field_148749_a.put(System.identityHashCode(p_148746_1_), p_148746_2_);
+        this.field_148749_a.put(p_148746_1_, p_148746_2_);

         while (this.field_148748_b.size() <= p_148746_2_)
         {
@@ -27,7 +28,8 @@

     public int func_148747_b(Object p_148747_1_)
     {
-        return this.field_148749_a.get(System.identityHashCode(p_148747_1_));
+        Integer ret = this.field_148749_a.get(p_148747_1_);
+        return ret != null ? ret : -1;
     }

     public Object func_148745_a(int p_148745_1_)


(in-package #:sicl-global-environment)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Macro DEFINE-COMPILER-MACRO.

(defmacro define-compiler-macro (name lambda-list &body body)
  `(eval-when (:compile-toplevel :load-toplevel :execute)
     (setf (compiler-macro-function ',name)
	   ,(cleavir-code-utilities:parse-macro
	     name
	     lambda-list
	     body))))

Use explicit package marker with IN-PACKAGE.

(cl:in-package #:sicl-global-environment)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Macro DEFINE-COMPILER-MACRO.

(defmacro define-compiler-macro (name lambda-list &body body)
  `(eval-when (:compile-toplevel :load-toplevel :execute)
     (setf (compiler-macro-function ',name)
	   ,(cleavir-code-utilities:parse-macro
	     name
	     lambda-list
	     body))))


(cl:in-package #:clump-test)

Define subclasses of 2-3 tree classes for testing purposes.

(cl:in-package #:clump-test)

(defclass size-mixin ()
  ((%size :initarg :size :reader size)))

(defclass leaf-size (size-mixin clump-2-3-tree:leaf)
  ()
  (:default-initargs :size 1))

(defclass 2-node-size (size-mixin clump-2-3-tree:2-node)
  ())

(defclass 3-node-size (size-mixin clump-2-3-tree:3-node)
  ())

(defclass size-tree (clump-2-3-tree:tree)
  ()
  (:default-initargs
   :2-node-class '2-node-size
   :3-node-class '3-node-size))


(cl:in-package #:common-lisp-user)

(defpackage #:sicl-common-lisp
  (:nicknames #:sicl-cl #:scl)
  (:export
   . #.(loop for symbol being each external-symbol of '#:common-lisp
	     collect (symbol-name symbol))))

(defpackage #:sicl-cons
  (:use #:sicl-common-lisp)
  (:export
   ;; The symbols LOAD-CAR, LOAD-CDR, STORE-CAR, and STORE-CDR name
   ;; special operators.  The operators LOAD-CAR and LOAD-CDR are
   ;; similar to the functions CAR and CDR, except that they require
   ;; that the argument be a CONS, or else an error is signaled.  The
   ;; operators STORE-CAR and STORE-CDR are like the functions RPLACA
   ;; and RPLACD, except that they must be evaluated in a context
   ;; where no value is required.
   #:load-car #:load-cdr #:store-car #:store-cdr
   ))

Use the normal CL package.

(cl:in-package #:common-lisp-user)

(defpackage #:sicl-cons
  (:use #:common-lisp)
  (:export
   ;; The symbols LOAD-CAR, LOAD-CDR, STORE-CAR, and STORE-CDR name
   ;; special operators.  The operators LOAD-CAR and LOAD-CDR are
   ;; similar to the functions CAR and CDR, except that they require
   ;; that the argument be a CONS, or else an error is signaled.  The
   ;; operators STORE-CAR and STORE-CDR are like the functions RPLACA
   ;; and RPLACD, except that they must be evaluated in a context
   ;; where no value is required.
   #:load-car #:load-cdr #:store-car #:store-cdr
   ))


(cl:in-package #:common-lisp-user)

(asdf:defsystem :cleavir-liveness
  :depends-on (:cleavir-utilities)
  :components
  ((:file "packages")
   (:file "liveness" :depends-on ("packages"))))

Define ASDF system in package ASDF-USER.

(cl:in-package #:asdf-user)

(defsystem :cleavir-liveness
  :depends-on (:cleavir-utilities)
  :components
  ((:file "packages")
   (:file "liveness" :depends-on ("packages"))))


(defun eql (x y)
  (| x (setq x nil))
  (| y (setq y nil))
  (| (eq x y)
     (?
       (& (number? x)
          (number? y))      (== x y)
       (& (string? x)
          (string? y))      (string== x y)
       (& (character? x)
          (character? y))   (character== x y))))

Convert EQL to STRING== on literal string arguments.

(defun eql (a b)
  (| a (setq a nil))
  (| b (setq b nil))
  (| (eq a b)
     (?
       (& (number? a)
          (number? b))      (== a b)
       (& (string? a)
          (string? b))      (string== a b)
       (& (character? a)
          (character? b))   (character== a b))))

(defmacro eql (a b)
  (? (| (string? a)
        (string? b))
     `(string== ,a ,b)
     `(eql ,a ,b)))


(defpackage lispkit
  (:use :gtk :gdk :gdk-pixbuf :gobject
        :drakma :cl-webkit
        :glib :gio :pango :cairo :common-lisp)
  (:export #:main))

(in-package :lispkit)

(defparameter *current-tab* nil)

(defun handle-key (window event)
  (declare (ignore window))
  (print event)
  nil)

(defun main (&rest args)
  (declare (ignore args))
  (within-main-loop
    (let ((window (make-instance 'gtk:gtk-window :title "lispkit!"))
          (view (setq *current-tab*
                      (webkit.foreign:webkit-web-view-new))))
      (gtk-container-add window view)
      (gtk-container-add window (make-instance 'gtk-scrolled-window))
      (webkit.foreign:webkit-web-view-load-uri
       view "http://www.github.com/AeroNotix/lispkit")
      (g-signal-connect window "key_press_event"
                        #'handle-key)
      (gtk-widget-show-all window))))

Put load-url into a function

(defpackage lispkit
  (:use :gtk :gdk :gdk-pixbuf :gobject
        :drakma :cl-webkit
        :glib :gio :pango :cairo :common-lisp)
  (:export #:main))

(in-package :lispkit)

(defparameter *current-tab* nil)

(defun load-url (url &optional view)
  (webkit.foreign:webkit-web-view-load-uri
   (or view *current-tab*) url))

(defun handle-key (window event)
  (declare (ignore window))
  (print event)
  nil)

(defun main (&rest args)
  (declare (ignore args))
  (within-main-loop
    (let ((window (make-instance 'gtk:gtk-window :title "lispkit!"))
          (view (setq *current-tab*
                      (webkit.foreign:webkit-web-view-new))))
      (gtk-container-add window view)
      (gtk-container-add window (make-instance 'gtk-scrolled-window))
      (g-signal-connect window "key_press_event"
                        #'handle-key)
      (load-url "http://www.github.com/AeroNotix/lispkit")
      (gtk-widget-show-all window))))


;; Common Lisp Script
;; Manoel Vilela

(asdf/defsystem:defsystem :lisp-chat
  :author "Manoel Vilela"
  :description "An experimental chat irc-like"
  :version "0.1"
  :license "MIT"
  :depends-on ("usocket")
  :components ((:file "config")
               (:file "client" :depends-on ("config"))
               (:file "server" :depends-on ("config"))))

Add correct key for email on ASDF definition

;; Common Lisp Script
;; Manoel Vilela

(asdf/defsystem:defsystem :lisp-chat
  :author "Manoel Vilela"
  :description "An experimental chat irc-like"
  :version "0.1"
  :mailto "manoel_vilela@engineer.com"
  :license "MIT"
  :depends-on ("usocket")
  :components ((:file "config")
               (:file "client" :depends-on ("config"))
               (:file "server" :depends-on ("config"))))


(cl:in-package #:cleavir-remove-useless-instructions)

(defgeneric instruction-may-be-removed-p (instruction))

(defmethod instruction-may-be-removed-p (instruction)
  (and (= (length (cleavir-ir:successors instruction)) 1)
       (loop for output in (cleavir-ir:outputs instruction)
	     always (null (cleavir-ir:using-instructions output)))))

(defmethod instruction-may-be-removed-p
    ((instruction cleavir-ir:side-effect-mixin))
  nil)

(defmethod instruction-may-be-removed-p
    ((instruction cleavir-ir:enter-instruction))
  nil)

(defmethod instruction-may-be-removed-p
    ((instruction cleavir-ir:return-instruction))
  nil)

(defmethod instruction-may-be-removed-p
    ((instruction cleavir-ir:set-symbol-value-instruction))
  nil)

(defun remove-useless-instructions (initial-instruction)
  (cleavir-meter:with-meter (m *remove-useless-instructions-meter*)
    (loop do (cleavir-ir:reinitialize-data initial-instruction)
	     (let ((useless-instructions '()))
	       (cleavir-ir:map-instructions-arbitrary-order
		(lambda (instruction)
		  (cleavir-meter:increment-size m)
		  (when (instruction-may-be-removed-p instruction)
		    (push instruction useless-instructions)))
		initial-instruction)
	       (when (null useless-instructions)
		 (loop-finish))
	       (mapc #'cleavir-ir:delete-instruction useless-instructions)))))

Remove method specialized to SET-SYMBOL-VALUE-INSTRUCTION.

(cl:in-package #:cleavir-remove-useless-instructions)

(defgeneric instruction-may-be-removed-p (instruction))

(defmethod instruction-may-be-removed-p (instruction)
  (and (= (length (cleavir-ir:successors instruction)) 1)
       (loop for output in (cleavir-ir:outputs instruction)
	     always (null (cleavir-ir:using-instructions output)))))

(defmethod instruction-may-be-removed-p
    ((instruction cleavir-ir:side-effect-mixin))
  nil)

(defmethod instruction-may-be-removed-p
    ((instruction cleavir-ir:enter-instruction))
  nil)

(defmethod instruction-may-be-removed-p
    ((instruction cleavir-ir:return-instruction))
  nil)

(defun remove-useless-instructions (initial-instruction)
  (cleavir-meter:with-meter (m *remove-useless-instructions-meter*)
    (loop do (cleavir-ir:reinitialize-data initial-instruction)
	     (let ((useless-instructions '()))
	       (cleavir-ir:map-instructions-arbitrary-order
		(lambda (instruction)
		  (cleavir-meter:increment-size m)
		  (when (instruction-may-be-removed-p instruction)
		    (push instruction useless-instructions)))
		initial-instruction)
	       (when (null useless-instructions)
		 (loop-finish))
	       (mapc #'cleavir-ir:delete-instruction useless-instructions)))))


;; Pegexel is a little exercises generator, using common-lisp.
    ;; Copyright (C) 2012 Yves Combe <yves@ycombe.net>

    ;; This program is free software: you can redistribute it and/or modify
    ;; it under the terms of the GNU Affero General Public License as published by
    ;; the Free Software Foundation, either version 3 of the License, or
    ;; (at your option) any later version.

    ;; This program is distributed in the hope that it will be useful,
    ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
    ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    ;; GNU Affero General Public License for more details.

    ;; You should have received a copy of the GNU Affero General Public License
    ;; along with this program.  If not, see <http://www.gnu.org/licenses/>.

;; if hooks
(defun §-Y (test if-non-nil if-nil)
  (funcall *generate* (if (eval test) if-non-nil if-nil)))

;; switch case number hooks (warning: index from 1 to n).
(defun §-F (index &rest cases)
  (let* ((index-1 (1- (eval index)))
	 (real (max 0 (min (1- (length cases)) index-1))))
    (funcall *generate* (elt cases real))))

Change §-F (switch case) to follow 0 to n-1 index convention.

;; Pegexel is a little exercises generator, using common-lisp.
    ;; Copyright (C) 2012 Yves Combe <yves@ycombe.net>

    ;; This program is free software: you can redistribute it and/or modify
    ;; it under the terms of the GNU Affero General Public License as published by
    ;; the Free Software Foundation, either version 3 of the License, or
    ;; (at your option) any later version.

    ;; This program is distributed in the hope that it will be useful,
    ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
    ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    ;; GNU Affero General Public License for more details.

    ;; You should have received a copy of the GNU Affero General Public License
    ;; along with this program.  If not, see <http://www.gnu.org/licenses/>.

;; if hooks
(defun §-Y (test if-non-nil if-nil)
  (funcall *generate* (if (eval test) if-non-nil if-nil)))

;; switch case number hooks (warning: index from 0 to n-1).
(defun §-F (index &rest cases)
  (let* ((e-index (eval index))
	 (real (max 0 (min (1- (length cases)) e-index))))
    (funcall *generate* (elt cases real))))


(defsystem #:unicode
  :name "unicode"
  :licence "TODO"
  :author "Thomas Bakketun <thomas.bakketun@copyleft.no>"
  :description "Unicode support for Common Lisp."
  :depends-on ()
  :serial t
  :components ((:file "package")
               (:file "features")
               (:file "unicode-text")
               (:file "syntax")
               (:file "test-syntax")))

Use asdf:defsystem instead of just defsystem.

(asdf:defsystem #:unicode
  :name "unicode"
  :licence "TODO"
  :author "Thomas Bakketun <thomas.bakketun@copyleft.no>"
  :description "Unicode support for Common Lisp."
  :depends-on ()
  :serial t
  :components ((:file "package")
               (:file "features")
               (:file "unicode-text")
               (:file "syntax")
               (:file "test-syntax")))