code:
Update _XData32 declaration in SDL_x11sym.h to match that of libx11 1.6.

--- SDL-1.2.15/src/video/x11/SDL_x11sym.h.~1~	2012-01-19 01:30:06.000000000 -0500
+++ SDL-1.2.15/src/video/x11/SDL_x11sym.h	2014-12-26 00:22:36.445067694 -0500
@@ -165,7 +165,7 @@
  */
 #ifdef LONG64
 SDL_X11_MODULE(IO_32BIT)
-SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
+SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return)
 SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),)
 #endif

repo_name: maximed/guix

license: mit


code:
Index: SDL_Pango-0.1.2/src/SDL_Pango.c
===================================================================
--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c	2004-12-10 10:06:33.000000000 +0100
+++ SDL_Pango-0.1.2/src/SDL_Pango.c	2007-09-18 14:56:35.362379428 +0200
@@ -723,13 +723,9 @@
     SDL_UnlockSurface(surface);
 }

-/*!
-    Create a context which contains Pango objects.

-    @return A pointer to the context as a SDLPango_Context*.
-*/
 SDLPango_Context*
-SDLPango_CreateContext()
+SDLPango_CreateContext_GivenFontDesc(const char* font_desc)
 {
     SDLPango_Context *context = g_malloc(sizeof(SDLPango_Context));
     G_CONST_RETURN char *charset;
@@ -743,8 +739,7 @@
     pango_context_set_language (context->context, pango_language_from_string (charset));
     pango_context_set_base_dir (context->context, PANGO_DIRECTION_LTR);

-    context->font_desc = pango_font_description_from_string(
-	MAKE_FONT_NAME (DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE));
+    context->font_desc = pango_font_description_from_string(font_desc);

     context->layout = pango_layout_new (context->context);

@@ -762,6 +757,17 @@
 }

 /*!
+    Create a context which contains Pango objects.
+
+    @return A pointer to the context as a SDLPango_Context*.
+*/
+SDLPango_Context*
+SDLPango_CreateContext()
+{
+    SDLPango_CreateContext_GivenFontDesc(MAKE_FONT_NAME(DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE));
+}
+
+/*!
     Free a context.

     @param *context [i/o] Context to be free
@@ -1053,6 +1059,20 @@
     pango_layout_set_font_description (context->layout, context->font_desc);
 }

+void
+SDLPango_SetText_GivenAlignment(
+    SDLPango_Context *context,
+    const char *text,
+    int length,
+    SDLPango_Alignment alignment)
+{
+    pango_layout_set_attributes(context->layout, NULL);
+    pango_layout_set_text (context->layout, text, length);
+    pango_layout_set_auto_dir (context->layout, TRUE);
+    pango_layout_set_alignment (context->layout, alignment);
+    pango_layout_set_font_description (context->layout, context->font_desc);
+}
+
 /*!
     Set plain text to context.
     Text must be utf-8.
@@ -1067,11 +1087,7 @@
     const char *text,
     int length)
 {
-    pango_layout_set_attributes(context->layout, NULL);
-    pango_layout_set_text (context->layout, text, length);
-    pango_layout_set_auto_dir (context->layout, TRUE);
-    pango_layout_set_alignment (context->layout, PANGO_ALIGN_LEFT);
-    pango_layout_set_font_description (context->layout, context->font_desc);
+    SDLPango_SetText_GivenAlignment(context, text, length, SDLPANGO_ALIGN_LEFT);
 }

 /*!
Index: SDL_Pango-0.1.2/src/SDL_Pango.h
===================================================================
--- SDL_Pango-0.1.2.orig/src/SDL_Pango.h	2004-12-10 10:06:33.000000000 +0100
+++ SDL_Pango-0.1.2/src/SDL_Pango.h	2007-09-18 15:00:41.736419485 +0200
@@ -26,6 +26,7 @@

 #ifndef SDL_PANGO_H
 #define SDL_PANGO_H
+#define SDL_PANGO_HAS_GC_EXTENSIONS

 #include "SDL.h"

@@ -109,12 +110,20 @@
     SDLPANGO_DIRECTION_NEUTRAL	/*! Neutral */
 } SDLPango_Direction;

-
+/*!
+    Specifies alignment of text. See Pango reference for detail
+*/
+typedef enum {
+    SDLPANGO_ALIGN_LEFT,
+    SDLPANGO_ALIGN_CENTER,
+    SDLPANGO_ALIGN_RIGHT
+} SDLPango_Alignment;

 extern DECLSPEC int SDLCALL SDLPango_Init();

 extern DECLSPEC int SDLCALL SDLPango_WasInit();

+extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext_GivenFontDesc(const char* font_desc);
 extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext();

 extern DECLSPEC void SDLCALL SDLPango_FreeContext(
@@ -157,6 +166,12 @@
     const char *markup,
     int length);

+extern DECLSPEC void SDLCALL SDLPango_SetText_GivenAlignment(
+    SDLPango_Context *context,
+    const char *text,
+    int length,
+    SDLPango_Alignment alignment);
+
 extern DECLSPEC void SDLCALL SDLPango_SetText(
     SDLPango_Context *context,
     const char *markup,


code:
Index: SDL_Pango-0.1.2/src/SDL_Pango.c
===================================================================
--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c	2007-09-18 15:56:12.406223540 +0200
+++ SDL_Pango-0.1.2/src/SDL_Pango.c	2007-09-18 15:57:27.986530616 +0200
@@ -932,7 +932,9 @@
     width = PANGO_PIXELS (logical_rect.width);
     height = PANGO_PIXELS (logical_rect.height);

-    SDL_FillRect(surface, NULL, SDL_MapRGBA(surface->format, 0, 0, 0, 0));
+    if (width && height) {
+        SDL_FillRect(surface, NULL, SDL_MapRGBA(surface->format, 0, 0, 0, 0));
+    }

     if((! context->tmp_ftbitmap) || context->tmp_ftbitmap->width < width
 	|| context->tmp_ftbitmap->rows < height)


code:
--- a/src/SDL_Pango.h
+++ b/src/SDL_Pango.h
@@ -171,7 +171,7 @@
     SDLPango_Direction direction);

-#ifdef __FT2_BUILD_UNIX_H__
+#ifdef FT2BUILD_H_

 extern DECLSPEC void SDLCALL SDLPango_CopyFTBitmapToSurface(
     const FT_Bitmap *bitmap,
@@ -179,7 +179,7 @@
     const SDLPango_Matrix *matrix,
     SDL_Rect *rect);

-#endif	/* __FT2_BUILD_UNIX_H__ */
+#endif

 #ifdef __PANGO_H__


code:
Index: SDL_Pango-0.1.2/src/SDL_Pango.c
===================================================================
--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c	2007-09-18 15:03:10.732910311 +0200
+++ SDL_Pango-0.1.2/src/SDL_Pango.c	2007-09-18 15:04:41.970109622 +0200
@@ -286,6 +286,59 @@
 } contextImpl;

+const SDLPango_Matrix _MATRIX_WHITE_BACK
+    = {255, 0, 0, 0,
+       255, 0, 0, 0,
+       255, 0, 0, 0,
+       255, 255, 0, 0,};
+
+/*!
+    Specifies white back and black letter.
+*/
+const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK;
+
+const SDLPango_Matrix _MATRIX_BLACK_BACK
+    = {0, 255, 0, 0,
+       0, 255, 0, 0,
+       0, 255, 0, 0,
+       255, 255, 0, 0,};
+/*!
+    Specifies black back and white letter.
+*/
+const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK;
+
+const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER
+    = {0, 0, 0, 0,
+       0, 0, 0, 0,
+       0, 0, 0, 0,
+       0, 255, 0, 0,};
+/*!
+    Specifies transparent back and black letter.
+*/
+const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
+
+const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER
+    = {255, 255, 0, 0,
+       255, 255, 0, 0,
+       255, 255, 0, 0,
+       0, 255, 0, 0,};
+/*!
+    Specifies transparent back and white letter.
+*/
+const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
+
+const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER
+    = {255, 255, 0, 0,
+       255, 255, 0, 0,
+       255, 255, 0, 0,
+       0, 0, 0, 0,};
+/*!
+    Specifies transparent back and transparent letter.
+    This is useful for KARAOKE like rendering.
+*/
+const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
+
+
 /*!
     Initialize the Glib and Pango API.
     This must be called before using other functions in this library,
Index: SDL_Pango-0.1.2/src/SDL_Pango.h
===================================================================
--- SDL_Pango-0.1.2.orig/src/SDL_Pango.h	2007-09-18 15:03:10.732910311 +0200
+++ SDL_Pango-0.1.2/src/SDL_Pango.h	2007-09-18 15:06:24.919976401 +0200
@@ -47,57 +47,27 @@
     Uint8 m[4][4];  /*! Matrix variables */
 } SDLPango_Matrix;

-const SDLPango_Matrix _MATRIX_WHITE_BACK
-    = {255, 0, 0, 0,
-       255, 0, 0, 0,
-       255, 0, 0, 0,
-       255, 255, 0, 0,};
-
 /*!
     Specifies white back and black letter.
 */
-const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK;
-
-const SDLPango_Matrix _MATRIX_BLACK_BACK
-    = {0, 255, 0, 0,
-       0, 255, 0, 0,
-       0, 255, 0, 0,
-       255, 255, 0, 0,};
+extern const SDLPango_Matrix *MATRIX_WHITE_BACK;
 /*!
     Specifies black back and white letter.
 */
-const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK;
-
-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER
-    = {0, 0, 0, 0,
-       0, 0, 0, 0,
-       0, 0, 0, 0,
-       0, 255, 0, 0,};
+extern const SDLPango_Matrix *MATRIX_BLACK_BACK;
 /*!
     Specifies transparent back and black letter.
 */
-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
-
-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER
-    = {255, 255, 0, 0,
-       255, 255, 0, 0,
-       255, 255, 0, 0,
-       0, 255, 0, 0,};
+extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER;
 /*!
     Specifies transparent back and white letter.
 */
-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
-
-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER
-    = {255, 255, 0, 0,
-       255, 255, 0, 0,
-       255, 255, 0, 0,
-       0, 0, 0, 0,};
+extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER;
 /*!
     Specifies transparent back and transparent letter.
     This is useful for KARAOKE like rendering.
 */
-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;
+extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER;

 /*!
     Specifies direction of text. See Pango reference for detail


code:
Index: SDL_Pango-0.1.2/src/SDL_Pango.c
===================================================================
--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c	2007-09-18 15:12:20.736253215 +0200
+++ SDL_Pango-0.1.2/src/SDL_Pango.c	2007-09-18 15:12:44.621614364 +0200
@@ -234,7 +234,7 @@
 //! non-zero if initialized
 static int IS_INITIALIZED = 0;

-#define DEFAULT_FONT_FAMILY "Sans"
+#define DEFAULT_FONT_FAMILY "sans-serif"
 #define DEFAULT_FONT_SIZE 12
 #define DEFAULT_DPI 96
 #define _MAKE_FONT_NAME(family, size) family " " #size


code:
From 6d512b5c4d774a9853b51dae464a10cea7e3423a Mon Sep 17 00:00:00 2001
From: Peter Rustler <peter.rustler@basyskom.com>
Date: Mon, 7 Dec 2015 11:40:05 +0000
Subject: [PATCH] Add support for new webkit version 4.0 to build system

Add new configure value for option --with-webkit.
Now you can add 4.0 as value to --with-webkit.
Default is still 3.0.

https://bugzilla.gnome.org/show_bug.cgi?id=759171
---
 configure.ac | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2313c093..3d5d4823 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,12 +77,12 @@ dnl ==============================WebKit=======================================
 m4_define([webkit_default], [3.0])

 AC_ARG_WITH([webkit],
-            [AC_HELP_STRING([--with-webkit=@<:@3.0/1.0@:>@],
+            [AC_HELP_STRING([--with-webkit=@<:@4.0/3.0/1.0@:>@],
                             [Select the Webkit backend, default=3.0])],
 	    [],
             [with_webkit=webkit_default])

-dnl=== support both 1.0 and 3.0 (default 3.0) ==
+dnl=== support all 1.0, 3.0 and 4.0 (default 3.0) ==
 AS_CASE([$with_webkit],
 	[3.0], [
 		WEBKIT_PC=webkitgtk-3.0
@@ -90,6 +90,12 @@ AS_CASE([$with_webkit],
 		AC_CHECK_LIB(webkitgtk-3.0, JSContextGroupCreate,,
 	                AC_CHECK_LIB(javascriptcoregtk-3.0, JSContextGroupCreate,WEBKIT_PC=javascriptcoregtk-3.0))
 	],
+	[4.0], [
+		WEBKIT_PC=webkitgtk-4.0
+		SEED_GTK_VERSION=-gtk4
+		AC_CHECK_LIB(webkitgtk-4.0, JSContextGroupCreate,,
+	                AC_CHECK_LIB(javascriptcoregtk-4.0, JSContextGroupCreate,WEBKIT_PC=javascriptcoregtk-4.0))
+	],
 	[1.0], [
 		AC_CHECK_LIB(webkitgtk-1.0, JSContextGroupCreate,WEBKIT_PC=webkitgtk-1.0,
 	                AC_CHECK_LIB(javascriptcoregtk-1.0, JSContextGroupCreate,WEBKIT_PC=javascriptcoregtk-1.0,
--
GitLab


code:
The custom mutex definition in Seq24 clashes with the mutex defined in gtkmm.
This patch renames the custom definition.

See https://bugs.launchpad.net/seq24/+bug/1647614 for upstream bug report.

diff --git a/src/midibus.h b/src/midibus.h
index 2cdf8e8..1bb02bd 100644
--- a/src/midibus.h
+++ b/src/midibus.h
@@ -90,7 +90,7 @@ class midibus

     /* locking */
-    mutex m_mutex;
+    seq24mutex m_mutex;

     /* mutex */
     void lock();
@@ -208,7 +208,7 @@ class mastermidibus
     sequence *m_seq;

     /* locking */
-    mutex m_mutex;
+    seq24mutex m_mutex;

     /* mutex */
     void lock();
diff --git a/src/midibus_portmidi.h b/src/midibus_portmidi.h
index 0119e9c..8c6a27a 100644
--- a/src/midibus_portmidi.h
+++ b/src/midibus_portmidi.h
@@ -65,7 +65,7 @@ class midibus
     long m_lasttick;

     /* locking */
-    mutex m_mutex;
+    seq24mutex m_mutex;

     /* mutex */
     void lock();
@@ -164,7 +164,7 @@ class mastermidibus
     sequence *m_seq;

     /* locking */
-    mutex m_mutex;
+    seq24mutex m_mutex;

     /* mutex */
     void lock();
diff --git a/src/mutex.cpp b/src/mutex.cpp
index b3f23fd..914114f 100644
--- a/src/mutex.cpp
+++ b/src/mutex.cpp
@@ -20,23 +20,23 @@

 #include "mutex.h"

-const pthread_mutex_t mutex::recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+const pthread_mutex_t seq24mutex::recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
 const pthread_cond_t condition_var::cond  = PTHREAD_COND_INITIALIZER;

-mutex::mutex( )
+seq24mutex::seq24mutex( )
 {
     m_mutex_lock = recmutex;
 }

 void
-mutex::lock( )
+seq24mutex::lock( )
 {
     pthread_mutex_lock( &m_mutex_lock );
 }

 void
-mutex::unlock( )
+seq24mutex::unlock( )
 {
     pthread_mutex_unlock( &m_mutex_lock );
 }
diff --git a/src/mutex.h b/src/mutex.h
index 399f8a3..4f1b867 100644
--- a/src/mutex.h
+++ b/src/mutex.h
@@ -24,7 +24,7 @@

 #include <pthread.h>

-class mutex {
+class seq24mutex {

 private:

@@ -37,14 +37,14 @@ protected:

 public:

-    mutex();
+    seq24mutex();

     void lock();
     void unlock();

 };

-class condition_var : public mutex {
+class condition_var : public seq24mutex {

 private:

diff --git a/src/sequence.h b/src/sequence.h
index 2943946..9da8700 100644
--- a/src/sequence.h
+++ b/src/sequence.h
@@ -153,7 +153,7 @@ class sequence
     long m_rec_vol;

     /* locking */
-    mutex m_mutex;
+    seq24mutex m_mutex;

     /* used to idenfity which events are ours in the out queue */
     //unsigned char m_tag;


code:
Fix build with Python 3 scons.

Patch taken from Arch Linux:
https://github.com/archlinux/svntogit-packages/blob/packages/serf/trunk/scons-python3.patch

--- serf-1.3.9/SConstruct.orig	2019-07-26 17:49:30.910189251 +0000
+++ serf-1.3.9/SConstruct	2019-07-26 17:49:54.073821735 +0000
@@ -163,9 +163,9 @@
               suffix='.def', src_suffix='.h')
   })

-match = re.search('SERF_MAJOR_VERSION ([0-9]+).*'
-                  'SERF_MINOR_VERSION ([0-9]+).*'
-                  'SERF_PATCH_VERSION ([0-9]+)',
+match = re.search(b'SERF_MAJOR_VERSION ([0-9]+).*'
+                  b'SERF_MINOR_VERSION ([0-9]+).*'
+                  b'SERF_PATCH_VERSION ([0-9]+)',
                   env.File('serf.h').get_contents(),
                   re.DOTALL)
 MAJOR, MINOR, PATCH = [int(x) for x in match.groups()]
@@ -183,7 +183,7 @@

 unknown = opts.UnknownVariables()
 if unknown:
-  print 'Warning: Used unknown variables:', ', '.join(unknown.keys())
+  print ('Warning: Used unknown variables:', ', '.join(unknown.keys()))

 apr = str(env['APR'])
 apu = str(env['APU'])


code:
Avoid including sys/prctl.h on the Hurd.

Upstream status: Not submitted.

--- shadow-4.8.1/libmisc/idmapping.c.orig	2020-03-07 16:32:05.000000000 -0500
+++ shadow-4.8.1/libmisc/idmapping.c	2020-03-07 16:32:27.000000000 -0500
@@ -36,8 +36,8 @@
 #include <stdio.h>
 #include "prototypes.h"
 #include "idmapping.h"
-#include <sys/prctl.h>
 #if HAVE_SYS_CAPABILITY_H
+#include <sys/prctl.h>
 #include <sys/capability.h>
 #endif


code:
ROMAN_HUNDREDS, ROMAN_TENS and ROMAN_ONES seem to use syntax, that is not
recognized (any longer?) by flex, so let's expand their definitions.

Index: spl-1.2.1/include/roman_numbers.metaflex
===================================================================
--- spl-1.2.1.orig/include/roman_numbers.metaflex
+++ spl-1.2.1/include/roman_numbers.metaflex
@@ -1,5 +1,5 @@
 ROMAN_THOUSANDS m+
-ROMAN_HUNDREDS  (c(d|m)|dc{0,3}|c{1,3})
-ROMAN_TENS      (x(l|c)|lx{0,3}|x{1,3})
-ROMAN_ONES      (i(v|x)|vi{0,3}|i{1,3})
+ROMAN_HUNDREDS  (c(d|m|c?c?)|dc?c?c?)
+ROMAN_TENS      (x(l|c|x?x?)|lx?x?x?)
+ROMAN_ONES      (i(v|x|i?i?)|vi?i?i?)
 ROMAN_NUMBER    {ROMAN_ONES}|{ROMAN_TENS}{ROMAN_ONES}?|{ROMAN_HUNDREDS}{ROMAN_TENS}?{ROMAN_ONES}?|{ROMAN_THOUSANDS}{ROMAN_HUNDREDS}?{ROMAN_TENS}?{ROMAN_ONES}?


code:
Fix CVE-2018-1000097:

https://security-tracker.debian.org/tracker/CVE-2018-1000097
https://nvd.nist.gov/vuln/detail/CVE-2018-1000097

Patch taken from upstream bug report:
https://lists.gnu.org/archive/html/bug-gnu-utils/2018-02/msg00005.html

diff --git a/src/unshar.c b/src/unshar.c
index 80bc3a9..0fc3773 100644
--- a/src/unshar.c
+++ b/src/unshar.c
@@ -240,7 +240,7 @@ find_archive (char const * name, FILE * file, off_t start)
       off_t position = ftello (file);

       /* Read next line, fail if no more and no previous process.  */
-      if (!fgets (rw_buffer, BUFSIZ, file))
+      if (!fgets (rw_buffer, rw_base_size, file))
 	{
 	  if (!start)
 	    error (0, 0, _("Found no shell commands in %s"), name);


code:
Fix building of Shishi with libgcrypt 1.6 and later.

Patch copied from Debian:

https://anonscm.debian.org/cgit/collab-maint/shishi.git/tree/debian/patches/fix_gcrypt_detection.diff?id=948301ae648a542a408da250755aeed58a6e3542

Description: Fix autoconf gnutls detection to also accept gcrypt 1.6.
Author: Andreas Metzler <ametzler@debian.org>
Bug-Debian: http://bugs.debian.org/753150
Origin: vendor
Forwarded: no
Last-Update: 2014-07-18

--- shishi-1.0.2.orig/gl/m4/gc.m4
+++ shishi-1.0.2/gl/m4/gc.m4
@@ -12,10 +12,12 @@ AC_DEFUN([gl_GC],
   if test "$libgcrypt" != no; then
     AC_LIB_HAVE_LINKFLAGS([gcrypt], [gpg-error], [
 #include <gcrypt.h>
-/* GCRY_MODULE_ID_USER was added in 1.4.4 and gc-libgcrypt.c
-   will fail on startup if we don't have 1.4.4 or later, so
-   test for it early. */
-#if !defined GCRY_MODULE_ID_USER
+/* gc-libgcrypt.c will fail on startup if we don't have libgcrypt 1.4.4 or
+   later, test for it early. by checking for either
+   - GCRY_MODULE_ID_USER which was added in 1.4.4 and dropped in 1.6 or
+   - GCRYPT_VERSION_NUMBER which was added in 1.6.
+   */
+#if !defined GCRY_MODULE_ID_USER && !defined GCRYPT_VERSION_NUMBER
 error too old libgcrypt
 #endif
 ])


code:
Allow the configuration file and theme directory to be specified at run time.
Patch by Eelco Dolstra, from Nixpkgs.

--- slim-1.3.6/app.cpp	2013-10-02 00:38:05.000000000 +0200
+++ slim-1.3.6/app.cpp	2013-10-15 11:02:55.629263422 +0200
@@ -200,7 +200,9 @@

 	/* Read configuration and theme */
 	cfg = new Cfg;
-	cfg->readConf(CFGFILE);
+	char *cfgfile = getenv("SLIM_CFGFILE");
+	if (!cfgfile) cfgfile = CFGFILE;
+	cfg->readConf(cfgfile);
 	string themebase = "";
 	string themefile = "";
 	string themedir = "";
@@ -208,7 +210,9 @@
 	if (testing) {
 		themeName = testtheme;
 	} else {
-		themebase = string(THEMESDIR) + "/";
+		char *themesdir = getenv("SLIM_THEMESDIR");
+		if (!themesdir) themesdir = THEMESDIR;
+		themebase = string(themesdir) + "/";
 		themeName = cfg->getOption("current_theme");
 		string::size_type pos;
 		if ((pos = themeName.find(",")) != string::npos) {


code:
Add "display_name" configuration option and use its value instead of
the hard coded one.

Patch by Diego N. Barbato

--- a/app.cpp	1970-01-01 01:00:00.000000000 +0100
+++ b/app.cpp	2019-04-27 13:48:23.479133531 +0200
@@ -190,7 +190,13 @@
 }

 void App::Run() {
-	DisplayName = DISPLAY;
+	/* Read configuration */
+	cfg = new Cfg;
+	char *cfgfile = getenv("SLIM_CFGFILE");
+	if (!cfgfile) cfgfile = CFGFILE;
+	cfg->readConf(cfgfile);
+
+	DisplayName = cfg->getOption("display_name").c_str();

 #ifdef XNEST_DEBUG
 	char* p = getenv("DISPLAY");
@@ -200,11 +206,7 @@
 	}
 #endif

-	/* Read configuration and theme */
-	cfg = new Cfg;
-	char *cfgfile = getenv("SLIM_CFGFILE");
-	if (!cfgfile) cfgfile = CFGFILE;
-	cfg->readConf(cfgfile);
+	/* Read theme */
 	string themebase = "";
 	string themefile = "";
 	string themedir = "";
@@ -911,9 +913,7 @@
 	static const int MAX_XSERVER_ARGS = 256;
 	static char* server[MAX_XSERVER_ARGS+2] = { NULL };
 	server[0] = (char *)cfg->getOption("default_xserver").c_str();
-	string argOption = cfg->getOption("xserver_arguments");
-	/* Add mandatory -xauth option */
-	argOption = argOption + " -auth " + cfg->getOption("authfile");
+	string argOption = cfg->getOption("display_name") + " " + cfg->getOption("xserver_arguments") + " -auth " + cfg->getOption("authfile");
 	char* args = new char[argOption.length()+2]; /* NULL plus vt */
 	strcpy(args, argOption.c_str());

@@ -1233,7 +1233,7 @@
 	authfile = cfg->getOption("authfile");
 	remove(authfile.c_str());
 	putenv(StrConcat("XAUTHORITY=", authfile.c_str()));
-	Util::add_mcookie(mcookie, ":0", cfg->getOption("xauth_path"),
+	Util::add_mcookie(mcookie, cfg->getOption("display_name").c_str(), cfg->getOption("xauth_path"),
 	  authfile);
 }

--- a/cfg.cpp	1970-01-01 01:00:00.000000000 +0100
+++ b/cfg.cpp	2019-04-27 13:49:40.511773743 +0200
@@ -31,6 +31,7 @@
 	/* Configuration options */
 	options.insert(option("default_path","/bin:/usr/bin:/usr/local/bin"));
 	options.insert(option("default_xserver","/usr/bin/X"));
+	options.insert(option("display_name",":0.0"));
 	options.insert(option("xserver_arguments",""));
 	options.insert(option("numlock",""));
 	options.insert(option("daemon",""));
--- a/switchuser.cpp	1970-01-01 01:00:00.000000000 +0100
+++ b/switchuser.cpp	2019-04-27 13:50:19.380096651 +0200
@@ -54,6 +54,6 @@
 	string home = string(Pw->pw_dir);
 	string authfile = home + "/.Xauthority";
 	remove(authfile.c_str());
-	Util::add_mcookie(mcookie, ":0", cfg->getOption("xauth_path"),
+	Util::add_mcookie(mcookie, displayName.c_str(), cfg->getOption("xauth_path"),
 	  authfile);
 }


code:
Display configurable login message after successful authentication.

Patch by E. Bavier

--- slim-1.3.6/panel.cpp.orig	1969-12-31 18:00:00.000000000 -0600
+++ slim-1.3.6/panel.cpp	2016-10-17 17:00:07.259649063 -0500
@@ -260,6 +260,7 @@

 void Panel::ClosePanel() {
 	XUngrabKeyboard(Dpy, CurrentTime);
+	XClearWindow(Dpy, Root);
 	XUnmapWindow(Dpy, Win);
 	XDestroyWindow(Dpy, Win);
 	XFlush(Dpy);
--- slim-1.3.6/cfg.cpp.orig	2016-10-17 17:08:06.767666139 -0500
+++ slim-1.3.6/cfg.cpp	2016-10-17 17:06:53.115663516 -0500
@@ -52,6 +52,7 @@
 	options.insert(option("lockfile","/var/run/slim.lock"));
 	options.insert(option("logfile","/var/log/slim.log"));
 	options.insert(option("authfile","/var/run/slim.auth"));
+	options.insert(option("login_msg","Logging in..."));
 	options.insert(option("shutdown_msg","The system is halting..."));
 	options.insert(option("reboot_msg","The system is rebooting..."));
 	options.insert(option("sessiondir",""));
--- slim-1.3.6/app.cpp.orig	2016-10-17 17:08:41.731667384 -0500
+++ slim-1.3.6/app.cpp	2016-10-17 17:07:48.415665486 -0500
@@ -520,6 +520,8 @@
 	struct passwd *pw;
 	pid_t pid;

+	LoginPanel->Message((char*)cfg->getOption("login_msg").c_str());
+
 #ifdef USE_PAM
 	try{
 		pam.open_session();


code:
Do not reset chosen session and maintain the session-choser dialog after a
failed login attempt.

Patch by E. Bavier

--- slim-1.3.6/panel.cpp.orig	1969-12-31 18:00:00.000000000 -0600
+++ slim-1.3.6/panel.cpp	2016-10-17 17:00:07.259649063 -0500
@@ -260,13 +260,12 @@
 }

 void Panel::ClearPanel() {
-	session_name = "";
-    session_exec = "";
 	Reset();
 	XClearWindow(Dpy, Root);
 	XClearWindow(Dpy, Win);
 	Cursor(SHOW);
 	ShowText();
+	ShowSession();
 	XFlush(Dpy);
 }

@@ -760,9 +760,7 @@
         pair<string,string> ses = cfg->nextSession();
         session_name = ses.first;
         session_exec = ses.second;
-        if (session_name.size() > 0) {
-                ShowSession();
-        }
+        ShowSession();
  }

 /* Display session type on the screen */


code:
Exit after the user's session has finished.  This works around slim's broken
PAM session handling (see
http://developer.berlios.de/bugs/?func=detailbug&bug_id=19102&group_id=2663).

Patch by Eelco Dolstra, from Nixpkgs.

--- slim-1.3.6/app.cpp	2013-10-15 11:02:55.629263422 +0200
+++ slim-1.3.6/app.cpp	2013-10-15 13:00:10.141210784 +0200
@@ -816,7 +822,7 @@
 	StopServer();
 	RemoveLock();
 	while (waitpid(-1, NULL, WNOHANG) > 0); /* Collects all dead childrens */
-	Run();
+	exit(OK_EXIT);
 }

 void App::KillAllClients(Bool top) {


code:
This patch fixes SLiM so it really waits for the X server to be ready
before attempting to connect to it.  Indeed, the X server notices that
its parent process has a handler for SIGUSR1, and consequently sends it
SIGUSR1 when it's ready to accept connections.

The problem was that SLiM doesn't pay attention to SIGUSR1.  So in practice,
if X starts slowly, then SLiM gets ECONNREFUSED a couple of time on
/tmp/.X11-unix/X0, then goes on trying to connect to localhost:6000,
where nobody answers; eventually, it times out and tries again on
/tmp/.X11-unix/X0, and finally it shows up on the screen.

Patch by L. Courtès.

--- slim-1.3.6/app.cpp	2014-02-05 15:27:20.000000000 +0100
+++ slim-1.3.6/app.cpp	2014-02-09 22:42:04.000000000 +0100
@@ -119,7 +119,9 @@ void CatchSignal(int sig) {
 	exit(ERR_EXIT);
 }

+static volatile int got_sigusr1 = 0;
 void User1Signal(int sig) {
+	got_sigusr1 = 1;
 	signal(sig, User1Signal);
 }

@@ -884,6 +886,7 @@ int App::WaitForServer() {
 	int	ncycles	 = 120;
 	int	cycles;

+	while (!got_sigusr1);
 	for(cycles = 0; cycles < ncycles; cycles++) {
 		if((Dpy = XOpenDisplay(DisplayName))) {
 			XSetIOErrorHandler(xioerror);


code:
Extracted from this commit without the ChangeLog to avoid conflicts:
http://git.savannah.gnu.org/cgit/smalltalk.git/commit/?id=72ada189aba0283c551ead16635c1983968080b8

The upstream commit message is
From 72ada189aba0283c551ead16635c1983968080b8 Mon Sep 17 00:00:00 2001
From: Holger Hans Peter Freyther <holger@moiji-mobile.com>
Date: Sat, 7 Nov 2015 18:09:31 +0100
Subject: libgst: Add alternative multiplication overflow check

Apple clang on OSX and the version on FreeBSD optimize the
multiplication check away. Clang introduced a family of
builtins to do the multiplication and check for the overflow
and GCC made the API usable. For clang we would need to know
if intptr_t is of type int, long int, long long int and
then use the smul, smull smulll.
Luckily clang is adopting the better interface and this is
what we are starting to use now. This means the new code
will be used on GCC5 (and later) and some future versions of
clang.

2015-11-07  Holger Hans Peter Freyther  <holger@freyther.de>

	* build-aux/overflow-builtins.m4: Add new macro.
	* configure.ac: Use GST_C_OVERFLOW_BUILTINS macro.

2015-11-07  Holger Hans Peter Freyther  <holger@freyther.de>

	* interp.inl: Add alternative mul_with_check implementation.
---
 ChangeLog                      |  5 +++++
 build-aux/overflow-builtins.m4 | 23 +++++++++++++++++++++++
 configure.ac                   |  1 +
 libgst/ChangeLog               |  4 ++++
 libgst/interp.inl              | 22 ++++++++++++++++++++++
 5 files changed, 55 insertions(+)
 create mode 100644 build-aux/overflow-builtins.m4

diff --git a/build-aux/overflow-builtins.m4 b/build-aux/overflow-builtins.m4
new file mode 100644
index 00000000..9d050196
--- /dev/null
+++ b/build-aux/overflow-builtins.m4
@@ -0,0 +1,23 @@
+dnl Check whether the host supports synchronization builtins.
+
+AC_DEFUN([GST_C_OVERFLOW_BUILTINS], [
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_CACHE_CHECK([whether the host supports __builtin_mul_overflow],
+                 gst_cv_have_builtin_mul_overflow, [
+    save_CFLAGS="$CFLAGS"
+    case $host in
+      i?86-apple-darwin*) ;;
+      i?86-*-*) CFLAGS="$CFLAGS -march=i486" ;;
+    esac
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[int foovar = 0;]], [[
+if (__builtin_mul_overflow(44444, 55555, &foovar))
+	return 23;]])],
+		   [gst_cv_have_builtin_mul_overflow=yes],
+		   [gst_cv_have_builtin_mul_overflow=no])
+    CFLAGS="$save_CFLAGS"
+  ])
+  if test $gst_cv_have_builtin_mul_overflow = yes; then
+    AC_DEFINE(HAVE_OVERFLOW_BUILTINS, 1,
+              [Define to 1 if the host supports __builtin_*_overflow builtins])
+  fi
+])
diff --git a/configure.ac b/configure.ac
index e789be45..0bac23ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -243,6 +243,7 @@ GST_C_SYNC_BUILTINS
 if test $gst_cv_have_sync_fetch_and_add = no; then
   AC_MSG_ERROR([Synchronization primitives not found, please use a newer compiler.])
 fi
+GST_C_OVERFLOW_BUILTINS

 GST_LOCK
 AC_SYS_LARGEFILE
diff --git a/libgst/interp.inl b/libgst/interp.inl
index e18e27c7..dbc631bc 100644
--- a/libgst/interp.inl
+++ b/libgst/interp.inl
@@ -159,6 +159,27 @@ sub_with_check (OOP op1, OOP op2, mst_Boolean *overflow)
 OOP
 mul_with_check (OOP op1, OOP op2, mst_Boolean *overflow)
 {
+#ifdef HAVE_OVERFLOW_BUILTINS
+  intptr_t a = TO_INT (op1);
+  intptr_t b = TO_INT (op2);
+  intptr_t result;
+
+  if (__builtin_mul_overflow(a, b, &result))
+    {
+       *overflow = true;
+       return FROM_INT(0);
+    }
+
+
+  if (result < MIN_ST_INT || result > MAX_ST_INT)
+    {
+       *overflow = true;
+       return FROM_INT(0);
+    }
+
+  *overflow = false;
+  return FROM_INT(result);
+#else
   intptr_t a = TO_INT (op1);
   intptr_t b = TO_INT (op2);
   intmax_t result = (intmax_t)a * b;
@@ -188,6 +209,7 @@ mul_with_check (OOP op1, OOP op2, mst_Boolean *overflow)
     }

   return FROM_INT (0);
+#endif
 }

 /* State of the random generator.
--
2.29.2


code:
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Sun, 26 Aug 2018 17:24:42 +0200
Subject: [PATCH] snappy: Add O2 flag in CmakeLists.txt.

Use ‘-O2’ optimisation when building with CMake, as is already done when
using the Makefile. This patch was copied verbatim from the Snappy
mailing list[0].

[0]: <snappy-compression@googlegroups.com>

From 903c72fb29b2db07b4abc38a5feb83d88f739d80 Mon Sep 17 00:00:00 2001
From: huangwenjun <huangwenjun-hf@loongson.cn>
Date: Fri, 10 Aug 2018 17:17:35 +0800
Subject: [PATCH] Add O2 optimize flag in CmakeLists.txt.

---
 CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62ecd09..29e0cdc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,6 +6,9 @@ set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 set(CMAKE_CXX_EXTENSIONS OFF)

+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
+
 # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make
 # it prominent in the GUI.
 option(BUILD_SHARED_LIBS "Build shared libraries(DLLs)." OFF)
--
2.1.0


code:
From 0c716d435abe65250100c2caea0e5126ac4e14bd Mon Sep 17 00:00:00 2001
From: "Georgi D. Sotirov" <gdsotirov@gmail.com>
Date: Wed, 5 May 2021 14:16:46 +0300
Subject: [PATCH] Add inline with SNAPPY_ATTRIBUTE_ALWAYS_INLINE

Add inline with SNAPPY_ATTRIBUTE_ALWAYS_INLINE on AdvanceToNextTag to
fix the following compilation errors and a warning with GCC:

[  2%] Building CXX object CMakeFiles/snappy.dir/snappy.cc.o
/usr/bin/c++   -DHAVE_CONFIG_H -Dsnappy_EXPORTS
-I/tmp/snappy-1.1.9/build -I/tmp/snappy-1.1.9  -O3
-march=i586 -mtune=i686 -Wall -Wextra -fno-exceptions -fno-rtti -O3
-DNDEBUG -fPIC   -std=c++11 -o CMakeFiles/snappy.dir/snappy.cc.o -c
/tmp/snappy-1.1.9/snappy.cc
/tmp/snappy-1.1.9/snappy.cc:1017:8: warning: always_inline
function might not be inlinable [-Wattributes]
 size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
        ^
/tmp/snappy-1.1.9/snappy.cc: In function 'std::pair<const
unsigned char*, int> snappy::DecompressBranchless(const uint8_t*, const
uint8_t*, ptrdiff_t, T, ptrdiff_t) [with T = char*; uint8_t = unsigned
char; ptrdiff_t = int]':
/tmp/snappy-1.1.9/snappy.cc:1017:8: error: inlining failed in
call to always_inline 'size_t snappy::AdvanceToNextTag(const uint8_t**,
size_t*)': function body can be overwritten at link time
/tmp/snappy-1.1.9/snappy.cc:1097:53: error: called from here
         size_t tag_type = AdvanceToNextTag(&ip, &tag);
                                                     ^
/tmp/snappy-1.1.9/snappy.cc:1017:8: error: inlining failed in
call to always_inline 'size_t snappy::AdvanceToNextTag(const uint8_t**,
size_t*)': function body can be overwritten at link time
 size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
        ^
/tmp/snappy-1.1.9/snappy.cc:1097:53: error: called from here
         size_t tag_type = AdvanceToNextTag(&ip, &tag);
                                                     ^
/tmp/snappy-1.1.9/snappy.cc:1017:8: error: inlining failed in
call to always_inline 'size_t snappy::AdvanceToNextTag(const uint8_t**,
size_t*)': function body can be overwritten at link time
 size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
        ^
/tmp/snappy-1.1.9/snappy.cc:1097:53: error: called from here
         size_t tag_type = AdvanceToNextTag(&ip, &tag);
                                                     ^
CMakeFiles/snappy.dir/build.make:137: recipe for target
'CMakeFiles/snappy.dir/snappy.cc.o' failed

Just like with other functions using SNAPPY_ATTRIBUTE_ALWAYS_INLINE
macro (i.e. __attribute__((always_inline)) ) it is necessary to use C++
inline specifier.
---
 snappy.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/snappy.cc b/snappy.cc
index 79dc0e8..51157be 100644
--- a/snappy.cc
+++ b/snappy.cc
@@ -1014,7 +1014,7 @@ void MemMove(ptrdiff_t dst, const void* src, size_t size) {
 }

 SNAPPY_ATTRIBUTE_ALWAYS_INLINE
-size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
+inline size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
   const uint8_t*& ip = *ip_p;
   // This section is crucial for the throughput of the decompression loop.
   // The latency of an iteration is fundamentally constrained by the


code:
https://github.com/cmusphinx/sphinxbase/commit/6989c52a3fb9473fd61326e548440fff887525c2

commit 6989c52a3fb9473fd61326e548440fff887525c2
Author: Michel Zou <xantares09@hotmail.com>
Date:   Thu Feb 6 07:02:06 2020 +0100

    Fix doxy2swig.py IndexError: list index out of range

diff --git a/doc/doxy2swig.py b/doc/doxy2swig.py
index 5589b0d..a01c4b1 100644
--- a/doc/doxy2swig.py
+++ b/doc/doxy2swig.py
@@ -299,7 +299,10 @@ class Doxy2SWIG:
             name = first['name'].firstChild.data

             for n in node.getElementsByTagName('param'):
-              arg_type = n.getElementsByTagName('type')[0]
+              elts = n.getElementsByTagName('type')
+              if len(elts) == 0:
+                  continue
+              arg_type = elts[0]
               ref = self.get_specific_nodes(arg_type, ('ref'))
               if 'ref' in ref:
                 type_name = ref['ref'].firstChild.data


code:
Adapted from Debian: https://sources.debian.org/patches/sqlite3/3.32.3-1/20-hurd-locking-style.patch
Upstream status: Not upstreamed.

This patch is needed to get offloading to work.

Sqlite can use simple file locking mode, but that does not work for the Hurd;
a second sqlite process fails with a "locking protocol" error.

See also: https://bugs.debian.org/529734.

diff -purN sqlite-autoconf-3310100/sqlite3.c sqlite-autoconf-3310100-/sqlite3.c
--- sqlite-autoconf-3310100/sqlite3.c	2020-01-27 21:25:19.000000000 +0100
+++ sqlite-autoconf-3310100-/sqlite3.c	2020-07-01 11:50:13.768333806 +0200
@@ -33189,7 +33189,7 @@ SQLITE_PRIVATE const char *sqlite3Opcode
 # include <sys/mman.h>
 #endif

-#if SQLITE_ENABLE_LOCKING_STYLE
+#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__)
 /* # include <sys/ioctl.h> */
 # include <sys/file.h>
 # include <sys/param.h>
@@ -35676,7 +35676,7 @@ static int dotlockClose(sqlite3_file *id
 **
 ** Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off
 */
-#if SQLITE_ENABLE_LOCKING_STYLE
+#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__)

 /*
 ** Retry flock() calls that fail with EINTR
@@ -38586,7 +38586,7 @@ IOMETHODS(
   0                         /* xShmMap method */
 )

-#if SQLITE_ENABLE_LOCKING_STYLE
+#if SQLITE_ENABLE_LOCKING_STYLE || defined(__GNU__)
 IOMETHODS(
   flockIoFinder,            /* Finder function name */
   flockIoMethods,           /* sqlite3_io_methods object name */
@@ -41142,6 +41142,8 @@ SQLITE_API int sqlite3_os_init(void){
     UNIXVFS("unix",          autolockIoFinder ),
 #elif OS_VXWORKS
     UNIXVFS("unix",          vxworksIoFinder ),
+#elif defined(__GNU__)
+    UNIXVFS("unix",          flockIoFinder ),
 #else
     UNIXVFS("unix",          posixIoFinder ),
 #endif
@@ -41151,7 +41153,7 @@ SQLITE_API int sqlite3_os_init(void){
 #if OS_VXWORKS
     UNIXVFS("unix-namedsem", semIoFinder ),
 #endif
-#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS
+#if SQLITE_ENABLE_LOCKING_STYLE || OS_VXWORKS || defined(__GNU__)
     UNIXVFS("unix-posix",    posixIoFinder ),
 #endif
 #if SQLITE_ENABLE_LOCKING_STYLE


code:
From bc56b10aea999284458dcc293b54cf65288e325d Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Fri, 24 Jan 2020 15:17:39 +0100
Subject: [PATCH] Fix build failure against samba 4.12.0rc1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The ndr_pull_get_switch() function was dropped, but it was just a wrapper
around the ndr_token_peek() function, so we can use this approach on both
old and new versions of libndr.

Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>

Reviewed-by: Pavel Březina <pbrezina@redhat.com>
---
 src/providers/ad/ad_gpo_ndr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/providers/ad/ad_gpo_ndr.c b/src/providers/ad/ad_gpo_ndr.c
index d573033494..8f405aa62b 100644
--- a/src/providers/ad/ad_gpo_ndr.c
+++ b/src/providers/ad/ad_gpo_ndr.c
@@ -105,7 +105,7 @@ ndr_pull_security_ace_object_type(struct ndr_pull *ndr,
                                   union security_ace_object_type *r)
 {
     uint32_t level;
-    level = ndr_pull_get_switch_value(ndr, r);
+    level = ndr_token_peek(&ndr->switch_list, r);
     NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     if (ndr_flags & NDR_SCALARS) {
         NDR_CHECK(ndr_pull_union_align(ndr, 4));
@@ -135,7 +135,7 @@ ndr_pull_security_ace_object_inherited_type(struct ndr_pull *ndr,
                                             union security_ace_object_inherited_type *r)
 {
     uint32_t level;
-    level = ndr_pull_get_switch_value(ndr, r);
+    level = ndr_token_peek(&ndr->switch_list, r);
     NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     if (ndr_flags & NDR_SCALARS) {
         NDR_CHECK(ndr_pull_union_align(ndr, 4));
@@ -198,7 +198,7 @@ ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr,
                                  union security_ace_object_ctr *r)
 {
     uint32_t level;
-    level = ndr_pull_get_switch_value(ndr, r);
+    level = ndr_token_peek(&ndr->switch_list, r);
     NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     if (ndr_flags & NDR_SCALARS) {
         NDR_CHECK(ndr_pull_union_align(ndr, 4));


code:
Do not attempt to create $localstatedir and $sysconfdir (i.e., /var and /etc)
upon "make install".

diff --git a/Makefile.in b/Makefile.in
index c32cb7d..77a5c00 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -7991,7 +7991,7 @@ sssdconfdir = $(sysconfdir)/sssd
 sssddatadir = $(datadir)/sssd
 sssdapiplugindir = $(sssddatadir)/sssd.api.d
 sssdtapscriptdir = $(sssddatadir)/systemtap
-dbuspolicydir = $(sysconfdir)/dbus-1/system.d
+dbuspolicydir = $(prefix)/etc/dbus-1/system.d
 dbusservicedir = $(datadir)/dbus-1/system-services
 sss_statedir = $(localstatedir)/lib/sss
 pamlibdir = @pammoddir@
@@ -8000,7 +8000,7 @@ nfslibdir = @nfsidmaplibdir@
 keytabdir = $(sss_statedir)/keytabs
 pkgconfigdir = $(libdir)/pkgconfig
 sudolibdir = @sudolibpath@
-pamconfdir = $(sysconfdir)/pam.d
+pamconfdir = $(prefix)/etc/pam.d
 systemtap_tapdir = @tapset_dir@
 sssdkcmdatadir = $(datadir)/sssd-kcm
 deskprofilepath = $(sss_statedir)/deskprofile
@@ -43733,7 +43733,6 @@ installsssddirs::
     $(DESTDIR)$(bindir) \
     $(DESTDIR)$(sbindir) \
     $(DESTDIR)$(mandir) \
-    $(DESTDIR)$(pidpath) \
     $(DESTDIR)$(pluginpath) \
     $(DESTDIR)$(libdir)/ldb \
     $(DESTDIR)$(dbuspolicydir) \
@@ -43743,22 +43742,9 @@ installsssddirs::
     $(DESTDIR)$(sssddatadir) \
     $(DESTDIR)$(sudolibdir) \
     $(DESTDIR)$(autofslibdir) \
-    $(DESTDIR)$(pipepath)/private \
-    $(SSSD_USER_DIRS) \
     $(NULL);
 @SSSD_USER_TRUE@	-chown $(SSSD_USER):$(SSSD_USER) $(SSSD_USER_DIRS)
 @SSSD_USER_TRUE@	-chown $(SSSD_USER) $(DESTDIR)$(pipepath)/private
-	$(INSTALL) -d -m 0700 $(DESTDIR)$(dbpath) $(DESTDIR)$(logpath) \
-	    $(DESTDIR)$(keytabdir) \
-	    $(NULL)
-	$(INSTALL) -d -m 0750 $(DESTDIR)$(pipepath)/private
-	$(INSTALL) -d -m 0755 $(DESTDIR)$(mcpath) $(DESTDIR)$(pipepath) \
-            $(DESTDIR)$(pubconfpath) \
-            $(DESTDIR)$(pubconfpath)/krb5.include.d $(DESTDIR)$(gpocachepath)
-	$(INSTALL) -d -m 0711 $(DESTDIR)$(sssdconfdir) \
-                          $(DESTDIR)$(sssdconfdir)/conf.d \
-                          $(DESTDIR)$(sssdconfdir)/pki
-@BUILD_SECRETS_TRUE@	$(MKDIR_P) $(DESTDIR)$(secdbpath)

 @HAVE_DOXYGEN_TRUE@docs:
 @HAVE_DOXYGEN_TRUE@	$(DOXYGEN) src/doxy.config


code:
--- steghide-0.5.1/src/AuData.h
+++ steghide-0.5.1/src/AuData.h
@@ -26,22 +26,22 @@

 // AuMuLawAudioData
 typedef AudioDataImpl<AuMuLaw,BYTE> AuMuLawAudioData ;
-inline BYTE AuMuLawAudioData::readValue (BinaryIO* io) const { return (io->read8()) ; }
-inline void AuMuLawAudioData::writeValue (BinaryIO* io, BYTE v) const { io->write8(v) ; }
+template<> inline BYTE AuMuLawAudioData::readValue (BinaryIO* io) const { return (io->read8()) ; }
+template<> inline void AuMuLawAudioData::writeValue (BinaryIO* io, BYTE v) const { io->write8(v) ; }

 // AuPCM8AudioData
 typedef AudioDataImpl<AuPCM8,SBYTE> AuPCM8AudioData ;
-inline SBYTE AuPCM8AudioData::readValue (BinaryIO* io) const { return ((SBYTE) io->read8()) ; }
-inline void AuPCM8AudioData::writeValue (BinaryIO* io, SBYTE v) const { io->write8((BYTE) v) ; }
+template<> inline SBYTE AuPCM8AudioData::readValue (BinaryIO* io) const { return ((SBYTE) io->read8()) ; }
+template<> inline void AuPCM8AudioData::writeValue (BinaryIO* io, SBYTE v) const { io->write8((BYTE) v) ; }

 // AuPCM16AudioData
 typedef AudioDataImpl<AuPCM16,SWORD16> AuPCM16AudioData ;
-inline SWORD16 AuPCM16AudioData::readValue (BinaryIO* io) const { return ((SWORD16) io->read16_be()) ; }
-inline void AuPCM16AudioData::writeValue (BinaryIO* io, SWORD16 v) const { io->write16_be((UWORD16) v) ; }
+template<> inline SWORD16 AuPCM16AudioData::readValue (BinaryIO* io) const { return ((SWORD16) io->read16_be()) ; }
+template<> inline void AuPCM16AudioData::writeValue (BinaryIO* io, SWORD16 v) const { io->write16_be((UWORD16) v) ; }

 // AuPCM32AudioData
 typedef AudioDataImpl<AuPCM32,SWORD32> AuPCM32AudioData ;
-inline SWORD32 AuPCM32AudioData::readValue (BinaryIO* io) const { return ((SWORD32) io->read32_be()) ; }
-inline void AuPCM32AudioData::writeValue (BinaryIO* io, SWORD32 v) const { io->write32_be((UWORD32) v) ; }
+template<> inline SWORD32 AuPCM32AudioData::readValue (BinaryIO* io) const { return ((SWORD32) io->read32_be()) ; }
+template<> inline void AuPCM32AudioData::writeValue (BinaryIO* io, SWORD32 v) const { io->write32_be((UWORD32) v) ; }

 #endif // ndef SH_AUDATA_H
--- steghide-0.5.1/src/AuSampleValues.cc
+++ steghide-0.5.1/src/AuSampleValues.cc
@@ -21,17 +21,17 @@
 #include "AuSampleValues.h"

 // AuMuLawSampleValue
-const BYTE AuMuLawSampleValue::MinValue = 0 ;
-const BYTE AuMuLawSampleValue::MaxValue = BYTE_MAX ;
+template<> const BYTE AuMuLawSampleValue::MinValue = 0 ;
+template<> const BYTE AuMuLawSampleValue::MaxValue = BYTE_MAX ;

 // AuPCM8SampleValue
-const SBYTE AuPCM8SampleValue::MinValue = SBYTE_MIN ;
-const SBYTE AuPCM8SampleValue::MaxValue = SBYTE_MAX ;
+template<> const SBYTE AuPCM8SampleValue::MinValue = SBYTE_MIN ;
+template<> const SBYTE AuPCM8SampleValue::MaxValue = SBYTE_MAX ;

 // AuPCM16SampleValue
-const SWORD16 AuPCM16SampleValue::MinValue = SWORD16_MIN ;
-const SWORD16 AuPCM16SampleValue::MaxValue = SWORD16_MAX ;
+template<> const SWORD16 AuPCM16SampleValue::MinValue = SWORD16_MIN ;
+template<> const SWORD16 AuPCM16SampleValue::MaxValue = SWORD16_MAX ;

 // AuPCM32SampleValue
-const SWORD32 AuPCM32SampleValue::MinValue = SWORD32_MIN ;
-const SWORD32 AuPCM32SampleValue::MaxValue = SWORD32_MAX ;
+template<> const SWORD32 AuPCM32SampleValue::MinValue = SWORD32_MIN ;
+template<> const SWORD32 AuPCM32SampleValue::MaxValue = SWORD32_MAX ;
--- steghide-0.5.1/src/Graph.cc
+++ steghide-0.5.1/src/Graph.cc
@@ -18,6 +18,7 @@
  *
  */

+#include <climits>
 #include <ctime>
 #include <list>
 #include <map>


code:
https://github.com/streamlink/streamlink/commit/a3123346824ee7b9c461110f292ea6987ea9a78d.patch
This is taken from upstream, and can be removed at the next release

From c6f3994e177a42792238f2edd07ba9053c10abc9 Mon Sep 17 00:00:00 2001
From: back-to <backto@protonmail.ch>
Date: Sat, 21 Jul 2018 14:30:51 +0200
Subject: [PATCH] tests.localization: use en_CA instead of en_US for
 test_equivalent

**python-iso3166** got an update which breaks the Streamlink tests.
https://pypi.org/project/iso3166/#history

**python-iso3166** and **pycountry** have now a different `name` for _the United States of America_

> python-iso3166: United States of America
https://github.com/deactivated/python-iso3166/commit/e5f8b37f18b01fcb5fa0e8130d8296fc7a7b5a9f

> pycountry: United States
https://bitbucket.org/flyingcircus/pycountry/src/5aa4bb47e33798cb631a81521b7b5b18f7d6c919/src/pycountry/databases/iso3166-1.json?at=default&fileviewer=file-view-default#iso3166-1.json-1572:1578

https://www.iso.org/obp/ui/#iso:code:3166:US

---

use **en_CA** instead of **en_US** for backwards compatibility,
as changing the **US** name would fail with older versions of **python-iso3166** / **pycountry**
---
 tests/test_localization.py | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/tests/test_localization.py b/tests/test_localization.py
index 0b81ae591..90bb3ac31 100644
--- a/tests/test_localization.py
+++ b/tests/test_localization.py
@@ -32,11 +32,12 @@ def test_bad_language_code(self):
         self.assertRaises(LookupError, l10n.Localization, "enUS")

     def test_equivalent(self):
-        l = l10n.Localization("en_US")
+        l = l10n.Localization("en_CA")
         self.assertTrue(l.equivalent(language="eng"))
         self.assertTrue(l.equivalent(language="en"))
-        self.assertTrue(l.equivalent(language="en", country="US"))
-        self.assertTrue(l.equivalent(language="en", country="United States"))
+        self.assertTrue(l.equivalent(language="en", country="CA"))
+        self.assertTrue(l.equivalent(language="en", country="CAN"))
+        self.assertTrue(l.equivalent(language="en", country="Canada"))

     def test_equivalent_remap(self):
         l = l10n.Localization("fr_FR")
@@ -48,7 +49,7 @@ def test_not_equivalent(self):
         self.assertFalse(l.equivalent(language="eng"))
         self.assertFalse(l.equivalent(language="en"))
         self.assertFalse(l.equivalent(language="en", country="US"))
-        self.assertFalse(l.equivalent(language="en", country="United States"))
+        self.assertFalse(l.equivalent(language="en", country="Canada"))
         self.assertFalse(l.equivalent(language="en", country="ES"))
         self.assertFalse(l.equivalent(language="en", country="Spain"))

@@ -71,8 +72,8 @@ def test_get_country(self):
                          l10n.Localization.get_country("USA").alpha2)
         self.assertEqual("GB",
                          l10n.Localization.get_country("GB").alpha2)
-        self.assertEqual("United States",
-                         l10n.Localization.get_country("United States").name)
+        self.assertEqual("Canada",
+                         l10n.Localization.get_country("Canada").name)

     def test_get_country_miss(self):
         self.assertRaises(LookupError, l10n.Localization.get_country, "XE")


code:
Fix required by suitesparse to build Mongoose

The CMakeLists.txt of Mongoose assumes that SuiteSparse_config has been
installed into the suitesparse source directory, which is not the case
for us, as we are building suitesparse out-of-tree.

SuiteSparse_config can instead be found in the ${CMAKE_INSTALL_PREFIX}
directory.

diff --git a/Mongoose/CMakeLists.txt b/Mongoose/CMakeLists.txt
index 7e134ab..76fa9e2 100644
--- a/Mongoose/CMakeLists.txt
+++ b/Mongoose/CMakeLists.txt
@@ -148,10 +148,10 @@ set(CMAKE_CXX_STANDARD 11)
 #set(CMAKE_CXX_STANDARD_REQUIRED ON)

 # determine which SuiteSparse_config to use
-if (EXISTS ${PROJECT_SOURCE_DIR}/../SuiteSparse_config)
-    message(STATUS "External ../SuiteSparse_config" ${BoldBlue} " found" ${ColourReset} ".")
+if (EXISTS ${CMAKE_INSTALL_PREFIX})
+    message(STATUS "External SuiteSparse_config" ${BoldBlue} " found" ${ColourReset} ".")
     set ( SUITESPARSE_CONFIG_DIR ${PROJECT_SOURCE_DIR}/../SuiteSparse_config )
-    link_directories ( ${PROJECT_SOURCE_DIR}/../lib )
+    link_directories ( ${CMAKE_INSTALL_PREFIX}/lib )
     message ( STATUS "Note: ../SuiteSparse_config must be compiled before compiling Mongoose" )
     set ( SUITESPARSE_CONFIG_LIBRARY suitesparseconfig )
 else ()


code:
From 783cbd59fcf086a9aaf603271823fb4ca71f0c55 Mon Sep 17 00:00:00 2001
From: Danny Milosavljevic <dannym@scratchpost.org>
Date: Thu, 8 Oct 2020 23:01:05 +0200
Subject: [PATCH] meminfo: Replace sys/io.h by direct register accesses.
See: https://github.com/linux-sunxi/sunxi-tools/pull/144

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
---
 meminfo.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/meminfo.c b/meminfo.c
index 0b0ff23..3b3a5df 100644
--- a/meminfo.c
+++ b/meminfo.c
@@ -22,7 +22,6 @@
 #include <sys/mman.h>
 #include <stdint.h>
 #include <errno.h>
-#include <sys/io.h>
 #include <stdbool.h>

 #include "common.h"
@@ -74,24 +73,24 @@ static enum sunxi_soc_version soc_version;
 unsigned int
 sunxi_io_read(void *base, int offset)
 {
-	return inl((unsigned long) (base + offset));
+	return *(volatile unsigned int*) (base + offset);
 }

 void
 sunxi_io_write(void *base, int offset, unsigned int value)
 {
-	outl(value, (unsigned long) (base + offset));
+	*(volatile unsigned int*) (base + offset) = value;
 }

 void
 sunxi_io_mask(void *base, int offset, unsigned int value, unsigned int mask)
 {
-	unsigned int tmp = inl((unsigned long) (base + offset));
+	unsigned int tmp = sunxi_io_read(base, offset);

 	tmp &= ~mask;
 	tmp |= value & mask;

-	outl(tmp, (unsigned long) (base + offset));
+	sunxi_io_write(base, offset, tmp);
 }


code:
Create the CombBLAS::SpParMat with the MPI_Comm from the input 'gridinfo_t'.
This prevents a warning/error from CombBLAS about using MPI_COMM_WORLD.

--- a/SRC/dHWPM_CombBLAS.hpp
+++ b/SRC/dHWPM_CombBLAS.hpp
@@ -52,7 +52,7 @@
     {
         printf("AWPM only supports square process grid. Retuning without a permutation.\n");
     }
-    combblas::SpParMat < int_t, double, combblas::SpDCCols<int_t,double> > Adcsc;
+    combblas::SpParMat < int_t, double, combblas::SpDCCols<int_t,double> > Adcsc(grid->comm);
     std::vector< std::vector < std::tuple<int_t,int_t,double> > > data(procs);

     /* ------------------------------------------------------------
--- a/SRC/zHWPM_CombBLAS.hpp
+++ b/SRC/zHWPM_CombBLAS.hpp
@@ -52,7 +52,7 @@
     {
         printf("AWPM only supports square process grid. Retuning without a permutation.\n");
     }
-    combblas::SpParMat < int_t, double, combblas::SpDCCols<int_t,double> > Adcsc;
+    combblas::SpParMat < int_t, double, combblas::SpDCCols<int_t,double> > Adcsc(grid->comm);
     std::vector< std::vector < std::tuple<int_t,int_t,double> > > data(procs);

     /* ------------------------------------------------------------


code:
The METIS interface from Scotch may segfault if passed NULL to indicate a
default parameter, so use the older calling style.

--- a/SRC/get_perm_c.c	2014-05-16 23:38:30.070835316 -0500
+++ b/SRC/get_perm_c.c	2014-05-16 23:39:04.582836211 -0500
@@ -70,11 +70,13 @@
 #else

     /* Earlier version 3.x.x */
-    /* METIS_NodeND(&nm, b_colptr, b_rowind, &numflag, metis_options,
-       perm, iperm);*/
+    METIS_NodeND(&nm, b_colptr, b_rowind, &numflag, metis_options,
+                 perm, iperm);

     /* Latest version 4.x.x */
+#if 0
     METIS_NodeND(&nm, b_colptr, b_rowind, NULL, NULL, perm, iperm);
+#endif

     /*check_perm_dist("metis perm",  n, perm);*/
 #endif


code:
diff -ur a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt	2019-05-24 17:58:19.693090158 -0400
+++ b/CMakeLists.txt	2019-05-24 17:57:43.349473252 -0400
@@ -375,44 +375,15 @@

 include(ConfigureChecks)

-
-## Also build external/squirrel
-
-if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/squirrel/CMakeLists.txt)
-  message(FATAL_ERROR "squirrel submodule is not checked out or ${CMAKE_CURRENT_SOURCE_DIR}/external/squirrel/CMakeLists.txt is missing")
-endif()
-
 set(SQUIRREL_PREFIX ${CMAKE_BINARY_DIR}/squirrel/ex)
-ExternalProject_Add(squirrel
-  SOURCE_DIR "${CMAKE_SOURCE_DIR}/external/squirrel/"
-  CMAKE_ARGS
-  -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-  -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-  -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-  -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-  -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-  -DCMAKE_INSTALL_PREFIX=${SQUIRREL_PREFIX}
-  -DINSTALL_INC_DIR=include)
-
-if(WIN32)
-  add_library(squirrel_lib SHARED IMPORTED)
-  set_target_properties(squirrel_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}squirrel${CMAKE_SHARED_LIBRARY_SUFFIX}")
-  set_target_properties(squirrel_lib PROPERTIES IMPORTED_IMPLIB "${SQUIRREL_PREFIX}/lib/squirrel${CMAKE_LINK_LIBRARY_SUFFIX}")
-  add_library(sqstdlib_lib SHARED IMPORTED)
-  set_target_properties(sqstdlib_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/bin/${CMAKE_SHARED_LIBRARY_PREFIX}sqstdlib${CMAKE_SHARED_LIBRARY_SUFFIX}")
-  set_target_properties(sqstdlib_lib PROPERTIES IMPORTED_IMPLIB "${SQUIRREL_PREFIX}/lib/sqstdlib${CMAKE_LINK_LIBRARY_SUFFIX}")
-
-  #For debug run purposes
-  configure_file("${CMAKE_CURRENT_SOURCE_DIR}/mk/msvc/run_supertux.bat.in" "${PROJECT_BINARY_DIR}/run_supertux.bat")
-else()
-  add_library(squirrel_lib STATIC IMPORTED)
-  set_target_properties(squirrel_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}squirrel_static${CMAKE_STATIC_LIBRARY_SUFFIX}")
-  add_library(sqstdlib_lib STATIC IMPORTED)
-  set_target_properties(sqstdlib_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}sqstdlib_static${CMAKE_STATIC_LIBRARY_SUFFIX}")
-endif()

 include_directories(SYSTEM ${SQUIRREL_PREFIX}/include)

+add_library(squirrel_lib SHARED IMPORTED)
+set_target_properties(squirrel_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}squirrel${CMAKE_SHARED_LIBRARY_SUFFIX}")
+add_library(sqstdlib_lib SHARED IMPORTED)
+set_target_properties(sqstdlib_lib PROPERTIES IMPORTED_LOCATION "${SQUIRREL_PREFIX}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}sqstdlib${CMAKE_SHARED_LIBRARY_SUFFIX}")
+
 ## Also build external/tinygettext

 if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/external/tinygettext/CMakeLists.txt)


code:
Borrowed from Debian.

--- swish-e-2.4.7/src/parser.c	2009-04-05 03:58:32.000000000 +0200
+++ swish-e-2.4.7/src/parser.c	2013-06-11 13:53:08.196559035 +0200
@@ -1760,7 +1760,7 @@
     va_start(args, msg);
     vsnprintf(str, 1000, msg, args );
     va_end(args);
-    xmlParserError(parse_data->ctxt, str);
+    xmlParserError(parse_data->ctxt, "%s", str);
 }

 static void warning(void *data, const char *msg, ...)
@@ -1772,7 +1772,7 @@
     va_start(args, msg);
     vsnprintf(str, 1000, msg, args );
     va_end(args);
-    xmlParserWarning(parse_data->ctxt, str);
+    xmlParserWarning(parse_data->ctxt, "%s", str);
 }

--- swish-e-2.4.7/src/result_output.c	2009-04-05 03:58:32.000000000 +0200
+++ swish-e-2.4.7/src/result_output.c	2013-06-11 13:53:38.593550825 +0200
@@ -752,7 +752,7 @@
             s = (char *) emalloc(MAXWORDLEN + 1);
             n = strftime(s, (size_t) MAXWORDLEN, fmt, localtime(&(pv->value.v_date)));
             if (n && f)
-                fprintf(f, s);
+                fprintf(f, "%s", s);
             efree(s);
         }
         break;


code:
From http://swish-e.org/archive/2015-09/13295.html

--- a/src/compress.c
+++ a/src/compress.c
@@ -995,7 +995,7 @@ void    remove_worddata_longs(unsigned char *worddata,int *sz_worddata)
             progerr("Internal error in remove_worddata_longs");

         /* dst may be smaller than src. So move the data */
-        memcpy(dst,src,data_len);
+        memmove(dst,src,data_len);

         /* Increase pointers */
         src += data_len;
--- a/src/headers.c
+++ a/src/headers.c
@@ -280,7 +280,7 @@ static SWISH_HEADER_VALUE fetch_single_header( IndexFILE *indexf, HEADER_MAP *he

         case SWISH_NUMBER:
         case SWISH_BOOL:
-            value.number = *(unsigned long *) data_pointer;
+            value.number = *(unsigned int *) data_pointer;

             /* $$$ Ugly hack alert! */
             /* correct for removed files */
--- a/src/swishspider
+++ a/src/swishspider
@@ -27,6 +27,7 @@ use LWP::UserAgent;
 use HTTP::Status;
 use HTML::Parser 3.00;
 use HTML::LinkExtor;
+use Encode;

     if (scalar(@ARGV) != 2) {
         print STDERR "Usage: $0 localpath url\n";
@@ -94,7 +95,7 @@ use HTML::LinkExtor;
     # Don't allow links above the base
     $URI::ABS_REMOTE_LEADING_DOTS = 1;

-    $p->parse( $$content_ref );
+    $p->parse( decode_utf8 $$content_ref );
     close( LINKS );

     exit;


code:
--- src/bruch.c	2007-12-06 11:30:00.000000000 -0500
+++ b/bruch.c	2013-10-22 08:37:43.000000000 -0400
@@ -975,14 +975,16 @@
     ggterg = ggt_i(S_B_UI(bruch),S_B_OI(bruch));

     if (ggterg == S_B_UI(bruch)) {
+        INT tmp = S_B_OI(bruch);
         freeself_bruch(bruch);
-        M_I_I(S_B_OI(bruch) / ggterg,bruch);
+        M_I_I(tmp / ggterg,bruch);
         goto ende;
         }

     if (-ggterg == S_B_UI(bruch)) {
+        INT tmp = S_B_OI(bruch);
         freeself_bruch(bruch);
-        M_I_I(- S_B_OI(bruch) / ggterg,bruch);
+        M_I_I(- tmp / ggterg,bruch);
         goto ende;
         }

@@ -1032,12 +1034,14 @@

     if (S_O_K(S_B_U(bruch)) == INTEGER)
         if (S_B_UI(bruch) == 1) {
+            INT tmp = S_B_OI(bruch);
             freeself_bruch(bruch);
-            M_I_I(S_B_OI(bruch),bruch);
+            M_I_I(tmp,bruch);
             goto ende; }
         else if (S_B_UI(bruch) == -1) {
+            INT tmp = S_B_OI(bruch);
             freeself_bruch(bruch);
-            M_I_I( - S_B_OI(bruch),bruch);
+            M_I_I( - tmp,bruch);
             goto ende; }
     if (NEGP(S_B_O(bruch)) && NEGP(S_B_U(bruch)))
         {


code:
diff -ru src/def.h c/def.h
--- src/def.h	2007-12-06 17:30:56.000000000 +0100
+++ c/def.h	2013-10-19 18:42:55.118745730 +0200
@@ -2,14 +2,9 @@
 /* INT should always be 4 byte */
 #ifndef DEF_H

-
-#ifdef __alpha
-typedef  int INT;
-typedef unsigned  int  UINT;
-#else /* __alpha */
-typedef long INT;
-typedef unsigned long UINT;
-#endif /* __alpha */
+#include <stdint.h>
+typedef int32_t INT;
+typedef uint32_t UINT;

 #include <stdio.h>
 #include <memory.h>
@@ -65,10 +60,13 @@

 /* definitionen fuer object.c */
-typedef INT OBJECTKIND;   /* 4 byte */
+/* NOTE: partition code assumes that there is no unused space in the
+ * object struct when an INT is stored. This requires both OBJECTKIND
+ * and OBJECTSELF to have a size equal to a machine word. */
+typedef intptr_t OBJECTKIND;

 typedef union {
-	INT ob_INT;
+	intptr_t ob_INT;
 	INT * ob_INTpointer;
 	char *ob_charpointer;
 	struct bruch *ob_bruch;


code:
diff -ru src/part.c b/part.c
--- src/part.c	Thu May 14 06:01:00 2009 -0400
+++ b/part.c 	Thu May 14 06:01:00 2009 -0400
@@ -1767,8 +1767,8 @@
 /* to compute number of partitions */
 {
     INT erg = OK;
-    if (ni<0) return;
-    if (not EMPTYP(S_V_I(vec,ni))) return;
+    if (ni<0) return 0;
+    if (not EMPTYP(S_V_I(vec,ni))) return 0;
     else if (ni<=1) M_I_I(1,S_V_I(vec,ni));
     else {


code:
diff -r 5cd656a07aa5 src/bar.c
--- a/bar.c	Thu May 14 06:01:00 2009 -0400
+++ b/bar.c	Thu May 14 07:38:17 2009 -0400
@@ -237,7 +237,7 @@
     g = callocobject();
     e = S_V_I(a,0L);
     f = S_V_I(a,1L);
-    erg += sum(f,g);
+    erg += sym_sum(f,g);
     j=0L;
     for (i=0L;i<S_V_LI(e);i++)
         j += S_V_II(e,i)*(i+1L);
@@ -427,7 +427,7 @@
     for (i=0L;i<S_V_LI(b);i++)
         erg += kranztypus_to_matrix(S_V_I(c,i),S_V_I(b,i));
     erg += freeall(c);
-    erg += sort(b); /* AK 130592 */
+    erg += sym_sort(b); /* AK 130592 */
     ENDR("makevectorof_class_bar");
 }

@@ -615,7 +615,7 @@
     c = callocobject();
     d = callocobject();
     erg += lehmercode_bar(a,c);
-    erg += sum(S_V_I(c,1L),b);
+    erg += sym_sum(S_V_I(c,1L),b);
     for(i=0L;i<S_P_LI(a);i++)
         {
         if (S_V_II(S_V_I(c,0L),i) == 1L)
diff -r 5cd656a07aa5 src/def.h
--- a/def.h	Thu May 14 06:01:00 2009 -0400
+++ b/def.h	Thu May 14 07:38:17 2009 -0400
@@ -3105,7 +3105,7 @@
 extern INT so_character ();
 extern INT so_dimension ();
 extern OBJECTKIND s_o_k();
-extern INT sort();
+extern INT sym_sort();
 extern INT sort_rows_tableaux_apply();
 extern INT sort_vector();
 extern OBJECTSELF s_o_s();
@@ -3271,7 +3271,7 @@
 extern INT sub_part_part();
 extern INT substitute_one_matrix ();
 extern INT substitute_one_monopoly ();
-extern INT sum();
+extern INT sym_sum();
 extern INT sum_integervector();
 extern INT sum_matrix();
 extern INT sum_vector();
diff -r 5cd656a07aa5 src/di.c
--- a/di.c	Thu May 14 06:01:00 2009 -0400
+++ b/di.c	Thu May 14 07:38:17 2009 -0400
@@ -1355,7 +1355,7 @@
 				m_il_nv(0L,weight_watcher);
 				m_il_nv(0L,perm_vec);
 				copy(S_V_I(FP,0L),fix);
-				sort(fix);
+				sym_sort(fix);

 				get_perm(hweight,p,b,S_I_I(n),S_I_I(m),0L,
 						 perm_vec,weight_watcher,fix);
@@ -1502,7 +1502,7 @@
 	if(ind == m)
 	{
 		mult_perm_fix(p,fix,hfix);
-		sort(hfix);
+		sym_sort(hfix);
 		if(!hfix_in_ww(hfix,ww))
 		{
 			inc(ww);
diff -r 5cd656a07aa5 src/ga.c
--- a/ga.c	Thu May 14 06:01:00 2009 -0400
+++ b/ga.c	Thu May 14 07:38:17 2009 -0400
@@ -632,7 +632,7 @@
     else if (what == 0L)
         erg += vertikal_sum(S_V_L(a),c);
     erg += copy(a,d);
-    erg += sort(d);
+    erg += sym_sort(d);
     erg += m_il_p(S_V_II(d,S_V_LI(d)-1L),e); /* identitaet */
     for (i=0L,k=0L,j=S_V_LI(d);i<S_P_LI(e);i++)
         if (i+1L == S_V_II(d,k) )
@@ -722,7 +722,7 @@

     j=0L;
     erg += append(h,g,h2);
-    erg += sort(h2);
+    erg += sym_sort(h2);
     for (i=0L;i<S_V_LI(g);i++)
         {
         erg += m_i_i(S_V_II(g,i),S_P_I(a,j));
diff -r 5cd656a07aa5 src/galois.c
--- a/galois.c	Thu May 14 06:01:00 2009 -0400
+++ b/galois.c	Thu May 14 07:38:17 2009 -0400
@@ -758,7 +758,7 @@
 		}
         }
     FREEALL2(v,nv);
-    sort(res);
+    sym_sort(res);
     }
     S3R(k,phg_c,phg_d,"all_points_phg_store",res);
     ENDR("all_points");
diff -r 5cd656a07aa5 src/macro.h
--- a/macro.h	Thu May 14 06:01:00 2009 -0400
+++ b/macro.h	Thu May 14 07:38:17 2009 -0400
@@ -1,6 +1,8 @@
 /* file: macro.h symmetrica source code */
 #ifndef MACRO_H

+#include "string.h"
+
 #ifdef SYMMAGMA
 #define SYM_MALLOC(a) mem_malloc(a)
 #else
 #define C_O_K(a,b) ((a)->ob_kind = (OBJECTKIND)(b))
--- a/nc.c	Thu May 14 06:01:00 2009 -0400
+++ b/nc.c	Thu May 14 07:38:17 2009 -0400
@@ -204,7 +204,7 @@
     erg += mult(S_NC_C(a),S_NC_C(b),d);
     erg += m_gl_co(S_NC_GL(a),e);
     erg += mult_apply(e,d);
-    erg += sum(d,e);
+    erg += sym_sum(d,e);
     erg += m_gl_go(S_NC_GL(a),d);
     erg += div(e,d,c);
     erg += freeall(e);
@@ -617,7 +617,7 @@
         erg += mult_nc_kranz(c,a,e);
         erg += mult(S_V_I(e,1L),f,c);
         erg += div(c,g,c);
-        erg += sum(c,S_V_I(S_NC_C(b),S_I_I(d)));
+        erg += sym_sum(c,S_V_I(S_NC_C(b),S_I_I(d)));
     }
     erg += freeall(c);
     erg += freeall(d);
@@ -712,7 +712,7 @@
     for(j = 0L; j<S_V_LI(c);j++) {
         kranztypus_to_matrix(S_V_I(c,j),S_V_I(a,j));
     }
-    sort(a);
+    sym_sort(a);
     freeall(f); freeall(h); freeall(c);
     return OK;
 }
@@ -739,7 +739,7 @@
         kranztypus_to_matrix(S_V_I(c,j),S_V_I(h,j));
         }

-    sort(h);
+    sym_sort(h);
     m_l_v(S_V_L(h),a);
     for(j = 0L; j<S_V_LI(c);j++) {
         typusorder(S_V_I(h,j), zb, za, S_V_I(a,j), f);
@@ -789,7 +789,7 @@
         erg += kranztypus_to_matrix(S_V_I(c,j),S_V_I(h,j));
     }

-    erg += sort(h);
+    erg += sym_sort(h);
     erg += typusorder(S_V_I(h,S_I_I(i)), zb, za, a, f);
     erg += freeall(f);
     erg += freeall(c);
diff -r 5cd656a07aa5 src/nu.c
--- a/nu.c	Thu May 14 06:01:00 2009 -0400
+++ b/nu.c	Thu May 14 07:38:17 2009 -0400
@@ -531,13 +531,13 @@
     ENDR("add");
 }

-INT sort(a) OP a;
+INT sym_sort(a) OP a;
 /* sortiert das object in aufsteigender reihenfolge AK 270787 */
 /* AK 160986 */ /* AK 280689 V1.0 */ /* AK 050390 V1.1 */
 /* AK 070891 V1.3 */
 {
     INT erg = OK;
-    EOP("sort(1)",a);
+    EOP("sym_sort(1)",a);

     switch(S_O_K(a))
     {
@@ -547,9 +547,9 @@
         erg += sort_vector(a);break;
 #endif /* VECTORTRUE */
     default:
-        erg += WTO("sort",a); break;
+        erg += WTO("sym_sort",a); break;
     };
-    ENDR("sort");
+    ENDR("sym_sort");
 }

 INT length(a,d) OP a,d;
@@ -641,7 +641,7 @@
     ENDR("content");
 }

-INT sum(a,res) OP a,res;
+INT sym_sum(a,res) OP a,res;
 /* AK 280689 V1.0 */ /* AK 050390 V1.1 */ /* AK 120391 V1.2 */
 /* AK 140891 V1.3 */
 /* AK 170298 V2.0 */
@@ -649,7 +649,7 @@
     INT erg = OK;
     COP("sum(1)",a);
     COP("sum(2)",res);
-    CE2(a,res,sum);
+    CE2(a,res,sym_sum);

     switch(S_O_K(a))
     {
@@ -680,7 +680,7 @@
         erg += WTO("sum",a); break;
     };

-    ENDR("sum");
+    ENDR("sym_sum");
 }

diff -r 5cd656a07aa5 src/part.c
--- a/part.c	Thu May 14 06:01:00 2009 -0400
+++ b/part.c	Thu May 14 07:38:17 2009 -0400
@@ -347,7 +347,7 @@
     if (a == b) { /* a := a+a */
         if (S_PA_K(a) == VECTOR) {
             erg += append_apply_vector(S_PA_S(a),S_PA_S(b));
-            erg += sort(S_PA_S(a));
+            erg += sym_sort(S_PA_S(a));
             goto endr_ende;
         }
         else if (S_PA_K(a) == EXPONENT) {
@@ -406,7 +406,7 @@
             k=S_PA_LI(b)-1;
 /*
             erg += append_apply_vector(S_PA_S(a),S_PA_S(b));
-            erg += sort(S_PA_S(a));
+            erg += sym_sort(S_PA_S(a));
 */
             inc_vector_co(S_PA_S(a),S_PA_LI(b));
             for (j=S_PA_LI(a)-1;j>=0;j--)
diff -r 5cd656a07aa5 src/perm.c
--- a/perm.c	Thu May 14 06:01:00 2009 -0400
+++ b/perm.c	Thu May 14 07:38:17 2009 -0400
@@ -833,9 +833,9 @@
     /* s = Anzahl der spalten */

     s = S_V_LI(S_V_I(a,0L));
-    sum(S_V_I(a,0L),summe);/* composition ist vector */
+    sym_sum(S_V_I(a,0L),summe);/* composition ist vector */
     z = S_I_I(summe);
-    FREEALL(summe);
+    FREEALL(summe);
     m_ilih_nm(s,z,b);
     C_O_K(b,KRANZTYPUS);
     for (i=0L;i<s;i++)
@@ -1114,7 +1114,7 @@
         erg += kranztypus_to_matrix(S_V_I(c,i),S_V_I(h,i));
     }

-    erg += sort(h);
+    erg += sym_sort(h);

     erg += chartafel(b,ct);

@@ -1926,7 +1926,7 @@
     OP c;
     c = CALLOCOBJECT();
     erg += lehmercode_permutation(a,c); /*result is a vector */
-    erg += sum(c,b);
+    erg += sym_sum(c,b);
     FREEALL(c);
     }
     ENDR("numberof_inversionen");
@@ -2364,7 +2364,7 @@
     COP("rz_lehmercode(2)",b);

     zw = callocobject();
-    erg += sum(lc,zw);
+    erg += sym_sum(lc,zw);
     if (NULLP(zw))
         {
         erg += m_il_integervector((INT)0,b);
diff -r 5cd656a07aa5 src/rest.c
--- a/rest.c	Thu May 14 06:01:00 2009 -0400
+++ b/rest.c	Thu May 14 07:38:17 2009 -0400
@@ -3998,7 +3998,7 @@
                 oj = j;
                 }
         }
-    erg += sum(c,b);
+    erg += sym_sum(c,b);
 eee:
     erg += freeall(c);
     ENDR("charge_word");
diff -r 5cd656a07aa5 src/ta.c
--- a/ta.c	Thu May 14 06:01:00 2009 -0400
+++ b/ta.c	Thu May 14 07:38:17 2009 -0400
@@ -1596,7 +1596,7 @@
     {
     OP d,e;
     e = CALLOCOBJECT();
-    erg += sum(content,e); /* AK 271098 */
+    erg += sym_sum(content,e); /* AK 271098 */
     d = CALLOCOBJECT();
     erg += weight(shape,d);
     if (NEQ(d,e))
@@ -1821,7 +1821,7 @@
     CE3(matrix, column_index, row_index,matrix_twoword);
     c = callocobject();
     erg += zeilen_summe(matrix,c);
-    erg += sum(c,c);
+    erg += sym_sum(c,c);
     erg += m_l_v(c,column_index);
     erg += m_l_v(c,row_index);
     for(i=0,l=0;i<S_M_HI(matrix);i++)
diff -r 5cd656a07aa5 src/zyk.c
--- a/zyk.c	Thu May 14 06:01:00 2009 -0400
+++ b/zyk.c	Thu May 14 07:38:17 2009 -0400
@@ -804,7 +804,7 @@
     zykeltypvec = CALLOCOBJECT();
     ak_order = CALLOCOBJECT();

-    sum(numztvec,ak_order); /* AK 060295 */
+    sym_sum(numztvec,ak_order); /* AK 060295 */

@@ -1176,7 +1176,7 @@
     erg += m_i_i(0,c);
     while (z!=NULL)
         {
-        erg += sum(S_PO_S(z),e);
+        erg += sym_sum(S_PO_S(z),e);
         erg += hoch(b,e,e);
         erg += mult_apply(S_PO_K(z),e);
         erg += add_apply(e,c);


code:
diff --git a/lib/t1lib/parseAFM.c b/lib/t1lib/parseAFM.c
index 6a31d7f..ba64541 100644
--- a/lib/t1lib/parseAFM.c
+++ b/lib/t1lib/parseAFM.c
@@ -199,7 +199,9 @@ static char *token(stream)
     idx = 0;

     while (ch != EOF && ch != ' ' && ch != CR  && ch != LF &&
-	   ch != CTRL_Z && ch != '\t' && ch != ':' && ch != ';'){
+	   ch != CTRL_Z && ch != '\t' && ch != ':' && ch != ';'
+     && idx < (MAX_NAME -1))
+    {
       ident[idx++] = ch;
       ch = fgetc(stream);
     } /* while */
@@ -235,7 +237,7 @@ static char *linetoken(stream)
     while ((ch = fgetc(stream)) == ' ' || ch == '\t' );

     idx = 0;
-    while (ch != EOF && ch != CR  && ch != LF && ch != CTRL_Z)
+    while (ch != EOF && ch != CR  && ch != LF && ch != CTRL_Z && idx < (MAX_NAME - 1))
     {
         ident[idx++] = ch;
         ch = fgetc(stream);


code:
Description: Don't lookup previous point if there isn't any
Author: Marc Deslauriers <marc.deslauriers@canonical.com>
Forwarded: no

Index: t1lib-5.1.2/lib/type1/type1.c
===================================================================
--- t1lib-5.1.2.orig/lib/type1/type1.c	2011-12-13 14:24:14.280965637 -0600
+++ t1lib-5.1.2/lib/type1/type1.c	2011-12-13 14:25:25.893320747 -0600
@@ -1700,6 +1700,7 @@
   long pindex = 0;

   /* compute hinting for previous segment! */
+  if (ppoints == NULL) Error0i("RLineTo: No previous point!\n");
   FindStems( currx, curry, currx-ppoints[numppoints-2].x, curry-ppoints[numppoints-2].y, dx, dy);

   /* Allocate a new path point and pre-setup data */
@@ -1728,6 +1729,7 @@
   long pindex = 0;

   /* compute hinting for previous point! */
+  if (ppoints == NULL) Error0i("RRCurveTo: No previous point!\n");
   FindStems( currx, curry, currx-ppoints[numppoints-2].x, curry-ppoints[numppoints-2].y, dx1, dy1);

   /* Allocate three new path points and pre-setup data */
@@ -1903,6 +1905,7 @@
     FindStems( currx, curry, 0, 0, dx, dy);
   }
   else {
+    if (ppoints == NULL) Error0i("RMoveTo: No previous point!\n");
     FindStems( currx, curry, ppoints[numppoints-2].x, ppoints[numppoints-2].y, dx, dy);
   }


code:
Description: Fix for libpng 1.6
Author: Programmer Nerd <theprogrammernerd@gmail.com>
Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743388#20
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=743388
Reviewed-by: Tobias Frost <tobi@debian.org>>
Last-Update: 2016-04-07
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/t4k_loaders.c
+++ b/src/t4k_loaders.c
@@ -1028,12 +1028,9 @@
       {
         png_init_io(png_ptr, fi);

-        info_ptr->width = surf->w;
-        info_ptr->height = surf->h;
-        info_ptr->bit_depth = 8;
-        info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
-        info_ptr->interlace_type = 1;
-        info_ptr->valid = 0;	/* will be updated by various png_set_FOO() functions */
+	png_set_IHDR(png_ptr, info_ptr, surf->w, surf->h, 8,
+		PNG_COLOR_TYPE_RGB_ALPHA,  PNG_INTERLACE_NONE,
+                PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);

         png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr,
                        PNG_sRGB_INTENT_PERCEPTUAL);


code:
Taken from Debian:
https://salsa.debian.org/multimedia-team/taopm/-/raw/master/debian/patches/01-add-missing-headers.diff

Description: Adding missing headers
Author: Tiago Bortoletto Vaz <tiago@debian.org>
Last-Update: 2013-04-17
--- a/libtao/Tao.cc
+++ b/libtao/Tao.cc
@@ -18,6 +18,7 @@

 #include "Tao.h"
 #include <iostream>
+#include <stdio.h>

 extern Tao tao;
 float &Time = tao.synthesisEngine.time;
--- a/libtao/TaoDevice.cc
+++ b/libtao/TaoDevice.cc
@@ -20,6 +20,7 @@
 #include "Tao.h"
 #include "TaoAccessPoint.h"
 #include "TaoInstrument.h"
+#include <cstring>

 TaoDevice::TaoDevice()
     {
--- a/libtao/TaoInstrument.cc
+++ b/libtao/TaoInstrument.cc
@@ -23,6 +23,7 @@
 //#include <sys/types.h>
 #include <iostream>
 #include <cmath>
+#include <cstring>

 float TaoInstrument::defaultMass=3.5;		// Set to optimum value for
                                                 // frequency response of
--- a/libtao/TaoOutput.cc
+++ b/libtao/TaoOutput.cc
@@ -24,6 +24,7 @@
 #include <fstream>
 #include "TaoOutput.h"
 #include "Tao.h"
+#include <cstring>

 extern Tao tao;

--- a/libtao/TaoPitch.cc
+++ b/libtao/TaoPitch.cc
@@ -30,6 +30,7 @@
 #include "TaoPitch.h"
 #include <iostream>
 #include <cmath>
+#include <cstring>

 // This class allows pitches and frequencies to be specified in a number of
 // different formats including the following:
--- a/taoparse/taoparser.yy
+++ b/taoparse/taoparser.yy
@@ -19,7 +19,8 @@

 #include <iostream>
 #include <sstream>
-#include <string>
+#include <cstring>
+#include <stdio.h>
 #include "taoparserdefs.h"

 int yyerror(char *s);
--- a/libtao/TaoGraphicsEngine.cc
+++ b/libtao/TaoGraphicsEngine.cc
@@ -27,7 +27,8 @@
 #include "TaoInstrument.h"
 #include "TaoAccessPoint.h"
 #include "TaoDevice.h"
-#include <string>
+#include <cstring>
+#include <stdio.h>

 extern Tao tao;
 extern void taoMasterTick();
--- a/tao2aiff/tao2aiff.cc
+++ b/tao2aiff/tao2aiff.cc
@@ -25,6 +25,8 @@
 #include <cmath>
 #include "audiofile.h"
 #include "tao2aiff.h"
+#include <cstdlib>
+#include <cstring>

 main(int argc, char **argv)
--- a/tao2wav/tao2wav.cc
+++ b/tao2wav/tao2wav.cc
@@ -25,6 +25,8 @@
 #include <cmath>
 #include "audiofile.h"
 #include "tao2wav.h"
+#include <cstdlib>
+#include <cstring>

 main(int argc, char **argv)
     {


code:
Taken from Debian:
https://salsa.debian.org/multimedia-team/taopm/-/raw/master/debian/patches/02-fix-parser-yyerror.diff

Description: Use a constant char, dummy comment.
Author: Tiago Bortoletto Vaz <tiago@debian.org>
Last-Update: 2013-04-17
--- a/taoparse/taoparser.yy
+++ b/taoparse/taoparser.yy
@@ -23,7 +23,7 @@
 #include <stdio.h>
 #include "taoparserdefs.h"

-int yyerror(char *s);
+int yyerror(const char *s);

 //#ifdef LINUX
 int yylex(void);
@@ -2924,7 +2924,7 @@
     }

-int yyerror (char *s)
+int yyerror (const char *s)
     {
     parse_error(what_I_expected_here);
     std::cout << "PARSE_FAILED";


code:
This patch is needed in order to build Guix on a Btrfs file system.

From da922703282b0d3b8837a99a9c7fdd32f1d20d49 Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Tue, 9 Jan 2018 20:16:14 -0500
Subject: [PATCH] Remove nonportable check for files containing only zeroes.

This check benefitted only one unlikely case (large files containing
only zeroes, on systems that do not support SEEK_HOLE) and was based
on an assumption about file system behavior that is not mandated by
POSIX and no longer holds in practice, namely that for sufficiently
large files, (st_blocks == 0) implies that the file contains only
zeroes.  Examples of file systems that violate this assumption include
Linux's /proc file system and Btrfs.

* src/sparse.c (sparse_scan_file_wholesparse): Remove this function.
(sparse_scan_file_seek): Remove the initial check for files containing
only zeroes.
---
 src/sparse.c | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/src/sparse.c b/src/sparse.c
index d41c0ea..3de6560 100644
--- a/src/sparse.c
+++ b/src/sparse.c
@@ -261,26 +261,6 @@ sparse_scan_file_raw (struct tar_sparse_file *file)
   return tar_sparse_scan (file, scan_end, NULL);
 }

-static bool
-sparse_scan_file_wholesparse (struct tar_sparse_file *file)
-{
-  struct tar_stat_info *st = file->stat_info;
-  struct sp_array sp = {0, 0};
-
-  /* Note that this function is called only for truly sparse files of size >= 1
-     block size (checked via ST_IS_SPARSE before).  See the thread
-     http://www.mail-archive.com/bug-tar@gnu.org/msg04209.html for more info */
-  if (ST_NBLOCKS (st->stat) == 0)
-    {
-      st->archive_file_size = 0;
-      sp.offset = st->stat.st_size;
-      sparse_add_map (st, &sp);
-      return true;
-    }
-
-  return false;
-}
-
 #ifdef SEEK_HOLE
 /* Try to engage SEEK_HOLE/SEEK_DATA feature. */
 static bool
@@ -343,10 +323,6 @@ sparse_scan_file_seek (struct tar_sparse_file *file)
 static bool
 sparse_scan_file (struct tar_sparse_file *file)
 {
-  /* always check for completely sparse files */
-  if (sparse_scan_file_wholesparse (file))
-    return true;
-
   switch (hole_detection)
     {
     case HOLE_DETECTION_DEFAULT:
--
2.15.1


code:
Skip tests that rely on unlinkat(2) behavior that varies between
kernel versions and is unspecified.

See <http://bugs.gnu.org/20597>
and <http://lists.gnu.org/archive/html/bug-tar/2015-06/msg00000.html>.

--- tar-1.28/tests/testsuite	2014-07-27 22:35:27.000000000 +0200
+++ tar-1.28/tests/testsuite	2015-06-16 00:21:16.906380739 +0200
@@ -34680,6 +34680,7 @@ find .
 )"
 at_fn_check_prepare_notrace 'an embedded newline' "remfiles08a.at:31"
 ( $at_check_trace;
+exit 77
 mkdir gnu
 (cd gnu
 TEST_TAR_FORMAT=gnu
@@ -34762,6 +34763,7 @@ find .
 )"
 at_fn_check_prepare_notrace 'an embedded newline' "remfiles08b.at:36"
 ( $at_check_trace;
+exit 77
 mkdir gnu
 (cd gnu
 TEST_TAR_FORMAT=gnu
@@ -34850,6 +34852,7 @@ find .
 )"
 at_fn_check_prepare_notrace 'a `...` command substitution' "remfiles08c.at:31"
 ( $at_check_trace;
+exit 77
 mkdir gnu
 (cd gnu
 TEST_TAR_FORMAT=gnu


code:
From 1431ba3a99582e4c3d2693ac37e57f361858affd Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Mon, 11 Jun 2018 18:39:44 +0200
Subject: [PATCH] bootstrappable: Force static link.

---
 libtcc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libtcc.c b/libtcc.c
index 3448f44..02ab850 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -735,6 +735,9 @@ LIBTCCAPI TCCState *tcc_new(void)
     tcc_state = s;
     ++nb_states;

+#if BOOTSTRAP
+    s->static_link = 1;
+#endif
     s->alacarte_link = 1;
     s->nocommon = 1;
     s->warn_implicit_function_declaration = 1;
--
2.16.2


code:
From f7fa48c4c75a1e748dc5071e709c0b62ff739eaa Mon Sep 17 00:00:00 2001
From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
Date: Mon, 9 Dec 2019 10:02:20 +0000
Subject: [PATCH] Fix [abd4abedd2]: Failed to build tk 8.6.10 with cross
 compile

Patch taken from upstream to fix cross-compilation. To be removed on next Tcl release.

---
 compat/strtol.c  | 2 +-
 compat/strtoul.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/compat/strtol.c b/compat/strtol.c
index b7f69196ce2..811006a64c3 100644
--- a/compat/strtol.c
+++ b/compat/strtol.c
@@ -53,7 +53,7 @@ strtol(
      */

     p = string;
-    while (TclIsSpaceProc(*p)) {
+    while (isspace(UCHAR(*p))) {
 	p += 1;
     }

diff --git a/compat/strtoul.c b/compat/strtoul.c
index e37eb05f823..15587f1da1a 100644
--- a/compat/strtoul.c
+++ b/compat/strtoul.c
@@ -74,7 +74,7 @@ strtoul(
      */

     p = string;
-    while (TclIsSpaceProc(*p)) {
+    while (isspace(UCHAR(*p))) {
 	p += 1;
     }
     if (*p == '-') {


code:
Install everything in PREFIX, set EXTRA_PATH to find it there.

--- ./Makefile.in~	2016-02-06 01:29:16.595090365 +0100
+++ ./Makefile.in	2016-02-06 09:29:04.286008931 +0100
@@ -133,9 +133,9 @@
 # require for testing here (like TCLX_LIBRARY).
 #========================================================================

-EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR)
+EXTRA_PATH	= $(top_builddir):$(TCL_BIN_DIR):$(libdir)
 #EXTRA_PATH     = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
-TCLLIBPATH      = $(top_builddir)
+TCLLIBPATH      = $(pkglibdir)
 TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
 		  @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
 		  PATH="$(EXTRA_PATH):$(PATH)" \


code:
--- tests/commands.at
+++ tests/commands.at
@@ -921,26 +921,27 @@ AT_CLEANUP
 TCSH_UNTESTED([notify])

-AT_SETUP([onintr])
-
-AT_DATA([onintr.csh],
-[[onintr label
-kill -INT $$
-echo fail
-label:
-echo caught
-onintr -
-kill -INT $$
-echo OK
-onintr -
-kill -INT $$
-]])
-AT_CHECK([tcsh -f onintr.csh], ,
-[caught
-OK
-])
-
-AT_CLEANUP
+# XXX This test does not work: "fail" is printed on stdout.
+#AT_SETUP([onintr])
+#
+#AT_DATA([onintr.csh],
+#[[onintr label
+#kill -INT $$
+#echo fail
+#label:
+#echo caught
+#onintr -
+#kill -INT $$
+#echo OK
+#onintr -
+#kill -INT $$
+#]])
+#AT_CHECK([tcsh -f onintr.csh], ,
+#[caught
+#OK
+#])
+#
+#AT_CLEANUP

 AT_SETUP([popd])
--- tests/lexical.at
+++ tests/lexical.at
@@ -35,9 +35,9 @@ AT_CHECK([if [ ! -t 0 ]; then exit 77; fi],, [Skipping comment tests])
 AT_CHECK([echo 'echo OK@%:@comment' | tcsh -f], , [OK
 ])

-AT_CHECK([tcsh -f -c 'echo @%:@no comment'], ,
-[@%:@no comment
-])
+#AT_CHECK([tcsh -f -c 'echo @%:@no comment'], ,
+#[@%:@no comment
+#])

 AT_DATA([comment2.csh],
 [[echo testing...@%:@\
--- tests/subst.at
+++ tests/subst.at
@@ -54,7 +54,7 @@ AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }')
 , [1
 ])

-AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }'); echo "echo ~$(id -un)/foo; echo \"\$HOME/foo\"" | tcsh -f | uniq dnl
+AT_CHECK([export HOME=$(getent passwd $(id -un) | awk -F: '{ print $(NF - 1) }'); echo "echo ~$(id -un)//foo; echo \"\$HOME/foo\"" | tcsh -f | uniq dnl
 	  | wc -l | tr -d ' \t'], , [1
 ])

--- tests/variables.at
+++ tests/variables.at
@@ -666,7 +666,8 @@ set listflags=(-xA $cwd/args.sh)
 ls-F -something .
 ]])
 AT_DATA([args.sh],
-[[echo "$@"
+[[#!/bin/sh
+echo "$@"
 ]])
 chmod a+x args.sh
 AT_CHECK([tcsh -f listflags.csh], ,
@@ -728,55 +729,57 @@ TCSH_UNTESTED([$ oid])
 AT_SETUP([$ owd])

 AT_DATA([owd.csh],
-[[echo $owd
-cd /
+[[mkdir -p a/b/
 echo $owd
-pushd /bin
+cd a
+echo $owd
+pushd b
 echo $owd
 popd
 echo $owd
 ]])
-AT_CHECK([tcsh -f owd.csh | sed "s,$PWD,CWD,"], ,
+AT_CHECK([tcsh -f owd.csh | sed "s,$PWD,CWD,g"], ,
 [
 CWD
-/bin / @&t@
-/
-/ @&t@
-/bin
+CWD/a/b CWD/a @&t@
+CWD/a
+CWD/a @&t@
+CWD/a/b
 ])

 AT_CLEANUP

-AT_SETUP([$ path])
-
-mkdir subdir
-AT_DATA([script.sh],
-[[echo home
-]])
-AT_DATA([subdir/script.sh],
-[[echo subdir
-]])
-chmod a+x script.sh subdir/script.sh
-AT_DATA([path.csh],
-[[echo $?path
-set path=(. subdir)
-script.sh
-set path=(subdir .)
-script.sh
-printenv PATH
-setenv PATH :foo::bar:
-echo $path
-]])
-AT_CHECK([tcsh -f path.csh], ,
-[1
-home
-subdir
-subdir:.
-. foo . bar .
-])
-
-AT_CLEANUP
+# XXX Not sure why this does not work. "home" is printed out twice on stdout.
+#AT_SETUP([$ path])
+#
+#mkdir subdir
+#AT_DATA([script.sh],
+#[[echo home
+#]])
+#AT_DATA([subdir/script.sh],
+#[[echo subdir
+#]])
+#chmod a+x script.sh subdir/script.sh
+#AT_DATA([path.csh],
+#[[echo $?path
+#set path=(. subdir)
+#script.sh
+#set path=(subdir .)
+#script.sh
+#printenv PATH
+#setenv PATH :foo::bar:
+#echo $path
+#]])
+#AT_CHECK([tcsh -f path.csh], ,
+#[1
+#home
+#subdir
+#subdir:.
+#. foo . bar .
+#])
+#
+#AT_CLEANUP

 AT_SETUP([$ printexitvalue])


code:
Add support for '-h' (help).

https://github.com/PaulStoffregen/teensy_loader_cli/pull/26

---
 teensy_loader_cli.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/teensy_loader_cli.c b/teensy_loader_cli.c
index d4a6cc5..0a06209 100644
--- a/teensy_loader_cli.c
+++ b/teensy_loader_cli.c
@@ -37,7 +37,8 @@ void usage(const char *err)
 {
 	if(err != NULL) fprintf(stderr, "%s\n\n", err);
 	fprintf(stderr,
-		"Usage: teensy_loader_cli --mcu=<MCU> [-w] [-h] [-n] [-b] [-v] <file.hex>\n"
+		"Usage: teensy_loader_cli --mcu=<MCU> [-h] [-w] [-n] [-b] [-v] <file.hex>\n"
+		"\t-h : Print this help message\n"
 		"\t-w : Wait for device to appear\n"
 		"\t-r : Use hard reboot if device not online\n"
 		"\t-s : Use soft reboot if device not online (Teensy3.x only)\n"
@@ -1081,6 +1082,7 @@ void parse_flag(char *arg)
 	int i;
 	for(i=1; arg[i]; i++) {
 		switch(arg[i]) {
+			case 'h': usage(NULL); break;
 			case 'w': wait_for_device_to_appear = 1; break;
 			case 'r': hard_reboot_device = 1; break;
 			case 's': soft_reboot_device = 1; break;
--
2.7.4


code:
This test incorrectly expects the libpurple search path to initially
contain exactly one element.  Remove this incorrect assertion.

--- telegram-purple-1.3.1-checkout/test/loadtest.c	2018-10-27 16:25:06.258459600 +0200
+++ telegram-purple-1.3.1-checkout/test/loadtest.c	2018-10-27 16:25:11.830434770 +0200
@@ -156,7 +156,7 @@ static void tdf_inject_plugin (void) {
   printf ("Injecting our module into purple_plugins_* ...\n");
   purple_plugins_init ();
   GList *search_paths = purple_plugins_get_search_paths ();
-  assert (!search_paths->prev && !search_paths->next && search_paths->data);
+  assert (!search_paths->prev && search_paths->data);
   GList *new_paths = g_list_append (search_paths, g_strdup ("bin/"));
   assert (new_paths == search_paths);
   // Load "my" path before the default.


code:
Prevent a memory leak in call-channel, which otherwise would cause a
test failure in file-transfer-channel.c.

Taken from upstream:
https://gitlab.freedesktop.org/telepathy/telepathy-glib/commit/2e8b2cc0db09b781d99e3755bb6d01548037fe7b

diff --git a/telepathy-glib/call-channel.c b/telepathy-glib/call-channel.c
index 8ed76323be32f83c5f4d6045a50bc1698d8093fd..2a1fa203d4be9f0c8b99344225f4ba9900666ffc 100644
--- a/telepathy-glib/call-channel.c
+++ b/telepathy-glib/call-channel.c
@@ -525,6 +525,8 @@ update_call_members (TpCallChannel *self,

   _tp_channel_contacts_queue_prepare_async ((TpChannel *) self,
       contacts, update_call_members_prepared_cb, data);
+
+  g_ptr_array_unref (contacts);
 }

 static void


code:
Patch derived from discussion at https://savannah.nongnu.org/bugs/?37503

--- texi2html-5.0/texi2html.pl	2010-06-30 17:01:27.000000000 -0500
+++ texi2html-5.0/texi2html.pl	2014-07-09 01:17:57.062990582 -0500
@@ -2589,7 +2589,12 @@
     my $state = shift;

     # FIXME this should be done only once, for @documentencoding
-    my $encoding = lc(Texi2HTML::Config::get_conf('DOCUMENT_ENCODING'));
+    my $encoding;
+    my $input_encoding = Texi2HTML::Config::get_conf('documentencoding');
+    if (defined($input_encoding))
+    {
+      $encoding = lc($input_encoding);
+    }
     if (defined($encoding) and $encoding ne '' and exists($Texi2HTML::Config::t2h_encoding_aliases{$encoding}))
     {
        $encoding = $Texi2HTML::Config::t2h_encoding_aliases{$encoding};

Fix failures in test/encodings.

--- texi2html-5.0/texi2html.pl	2014-07-09 01:22:06.000000000 -0500
+++ texi2html-5.0/texi2html.pl	2014-07-10 23:23:47.182097602 -0500
@@ -53,6 +53,7 @@
 # for translations
 #use encoding 'utf8';
 #use utf8;
+binmode STDERR, ':encoding(utf8)';

 #
 # According to


code:
Do not try to regenerate po files; use the reference files that are packaged
in the tarball.

--- a/Makefile.in	2010-06-30 17:02:28.000000000 -0500
+++ b/Makefile.in	2014-08-16 00:22:38.447050269 -0500
@@ -1022,15 +1022,7 @@

 i18n/en.thl i18n/: $(po_document_dir)/po_document/$(PACKAGE)_document.pot
 	$(MKDIR_P) i18n
-	if test '$(USE_NLS)' = 'yes'; then \
-	  for file in "$(srcdir)/$(po_document_dir)/po_document/"*".po"; do lang=`basename "$$file" .po | sed 's/\..*//'`; \
-		test "$$lang" = 'en' && continue; \
-		msgexec -i "$$file" "$(srcdir)/gettext_to_separated.pl" | "$(srcdir)/separated_to_hash.pl" $$lang > i18n/$$lang.thl; \
-	  done; \
-	  msgexec -i $< "$(srcdir)/gettext_to_separated.pl" | "$(srcdir)/separated_to_hash.pl" en > i18n/en.thl; \
-	else \
-	  cp -p i18n_ref/*.thl i18n; \
-	fi
+	cp -p i18n_ref/*.thl i18n

 i18n_ref:
 	$(MKDIR_P) i18n_ref

Have install-sh install .mo files locally for in-source tests, so that msgfmt
is not needed.

--- a/Makefile.in	2010-06-30 17:02:28.000000000 -0500
+++ b/Makefile.in	2014-08-16 00:22:38.447050269 -0500
@@ -1052,19 +1044,8 @@
 # update the po files, and install locally the .mo files for the in
 # source tests
 check-local: makeinfo.pl texi2any.pl
-	if test '$(USE_NLS)' = 'yes'; then \
-	  cd $(po_document_dir)/po_document && $(MAKE) $(AM_MAKEFLAGS) update-po; \
-	fi
-	rm -rf locales
-	for file in "$(srcdir)/$(po_document_dir)/po_document/"*.po; do \
-	  basename=`basename "$$file" .po` ; \
-	  $(MKDIR_P) "locales/$$basename/LC_MESSAGES/" ; \
-	  if test '$(USE_NLS)' = 'yes'; then \
-	    $(MSGFMT) "$$file" -o "locales/$$basename/LC_MESSAGES/texi2html_document.mo" ; \
-	  else \
-	    cp -p "$(srcdir)/$(po_document_dir)/po_document/$$basename.mo" "locales/$$basename/LC_MESSAGES/texi2html_document.mo" ; \
-	  fi; \
-	done
+	$(MAKE) -C po_document localedir="$(abs_srcdir)/locales" install-data
+	$(MAKE) -C po_messages localedir="$(abs_srcdir)/locales" install-data

 makeinfo.pl texi2any.pl:
 	-$(LN_S) $(srcdir)/texi2html.pl $@


code:
Fix a deprecation warning with newer Perl that breaks some tests.

--- a/tp/Texinfo/Parser.pm
+++ b/tp/Texinfo/Parser.pm
@@ -5438,12 +5438,12 @@
     }
   } elsif ($command eq 'clickstyle') {
     # REMACRO
-    if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*/) {
+    if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)(\{})?\s*/) {
       $args = ['@'.$1];
       $self->{'clickstyle'} = $1
         unless(_ignore_global_commands($self));
       $remaining = $line;
-      $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*(\@(c|comment)((\@|\s+).*)?)?//;
+      $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)(\{})?\s*(\@(c|comment)((\@|\s+).*)?)?//;
       $has_comment = 1 if (defined($4));
     } else {
       $self->line_error (sprintf($self->__(


code:
Fix build with Poppler 0.83 and later.

Taken from Arch Linux, but adjusted to patch the versioned Poppler
files, as upstream applies it after copying them in place.
https://git.archlinux.org/svntogit/packages.git/tree/trunk/texlive-poppler-0.83.patch?h=packages/texlive-bin

diff -ru texlive-source-orig/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc texlive-source/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc
--- texlive-source-orig/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc
+++ texlive-source/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc
@@ -723,7 +723,7 @@
 #endif
     // initialize
     if (!isInit) {
-        globalParams = new GlobalParams();
+        globalParams.reset(new GlobalParams());
         globalParams->setErrQuiet(false);
         isInit = true;
     }
@@ -1108,6 +1108,5 @@
             delete_document(p);
         }
         // see above for globalParams
-        delete globalParams;
     }
 }
diff -ru texlive-source-orig/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc texlive-source/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc
--- texlive-source-orig/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc
+++ texlive-source/texk/web2c/pdftexdir/pdftosrc-poppler0.76.0.cc
@@ -79,7 +79,7 @@
         exit(1);
     }
     fileName = new GString(argv[1]);
-    globalParams = new GlobalParams();
+    globalParams.reset(new GlobalParams());
     doc = new PDFDoc(fileName);
     if (!doc->isOk()) {
         fprintf(stderr, "Invalid PDF file\n");
@@ -100,7 +100,7 @@
     if (objnum == 0) {
         srcStream = catalogDict.dictLookup("SourceObject");
         static char const_SourceFile[] = "SourceFile";
-        if (!srcStream.isStream(const_SourceFile)) {
+        if (!srcStream.isDict(const_SourceFile)) {
             fprintf(stderr, "No SourceObject found\n");
             exit(1);
         }
@@ -202,5 +202,4 @@
         fprintf(stderr, "Cross-reference table extracted to %s\n", outname);
     fclose(outfile);
     delete doc;
-    delete globalParams;
 }


code:
Fix build with Poppler 0.86 and later.

Taken from Arch Linux, but adjusted to patch the versioned Poppler
files, as upstream applies it after copying them in place.
https://git.archlinux.org/svntogit/packages.git/tree/trunk/texlive-poppler-0.86.patch?h=packages/texlive-bin

--- a/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc	2020-03-03 21:11:35.102711802 +0000
+++ b/texk/web2c/pdftexdir/pdftoepdf-poppler0.76.0.cc	2020-03-03 21:13:13.057420111 +0000
@@ -757,7 +757,7 @@
     if (page_name) {
         // get page by name
         GString name(page_name);
-        LinkDest *link = pdf_doc->doc->findDest(&name);
+        LinkDest *link = pdf_doc->doc->findDest(&name).get();
         if (link == 0 || !link->isOk())
             pdftex_fail("PDF inclusion: invalid destination <%s>", page_name);
         Ref ref = link->getPageRef();


code:
Retain environment setting of "HOME" for tests that need os.path.expanduser()
to return a readable directory in the build chroot.

--- thefuck-3.25/tests/conftest.py
+++ thefuck-3.25/tests/conftest.py
@@ -64,6 +64,7 @@ def set_shell(monkeypatch):

 @pytest.fixture(autouse=True)
 def os_environ(monkeypatch):
-    env = {'PATH': os.environ['PATH']}
+    env = {'PATH': os.environ['PATH'],
+           'HOME': os.environ['HOME']}
     monkeypatch.setattr('os.environ', env)
     return env


code:
Copied from Debian.

From c18f27a58792f7fbd0b30a0ff50d6b40a82f940d Mon Sep 17 00:00:00 2001
From: Geoff McLane <ubuntu@geoffair.info>
Date: Wed, 3 Jun 2015 20:26:03 +0200
Subject: [PATCH] Issue #217 - avoid len going negative, ever...

---
 src/lexer.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/lexer.c b/src/lexer.c
index 376a3d8..664f806 100644
--- a/src/lexer.c
+++ b/src/lexer.c
@@ -3739,16 +3740,17 @@ static tmbstr ParseValue( TidyDocImpl* doc, ctmbstr name,
         /* and prompts attributes unless --literal-attributes is set to yes      */
         /* #994841 - Whitespace is removed from value attributes                 */

-        if (munge &&
+        /* Issue #217 - Also only if/while (len > 0) - MUST NEVER GO NEGATIVE! */
+        if ((len > 0) && munge &&
             TY_(tmbstrcasecmp)(name, "alt") &&
             TY_(tmbstrcasecmp)(name, "title") &&
             TY_(tmbstrcasecmp)(name, "value") &&
             TY_(tmbstrcasecmp)(name, "prompt"))
         {
-            while (TY_(IsWhite)(lexer->lexbuf[start+len-1]))
+            while (TY_(IsWhite)(lexer->lexbuf[start+len-1]) && (len > 0))
                 --len;

-            while (TY_(IsWhite)(lexer->lexbuf[start]) && start < len)
+            while (TY_(IsWhite)(lexer->lexbuf[start]) && (start < len) && (len > 0))
             {
                 ++start;
                 --len;


code:
From a53b6ee4519a7657164610ac14a82c57b1273bf6 Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@worcester.edu>
Date: Mon, 23 Nov 2015 06:54:36 -0500
Subject: [PATCH] Use STL.

Software that uses the shared library, such as Kodi, assume that TinyXML was
compiled with STL activated.

---
 tinyxml.h   | 2 ++
 xmltest.cpp | 1 +
 2 files changed, 3 insertions(+)

diff --git a/tinyxml.h b/tinyxml.h
index a3589e5..6cbfc7d 100644
--- a/tinyxml.h
+++ b/tinyxml.h
@@ -43,6 +43,8 @@ distribution.
 #define DEBUG
 #endif

+#define TIXML_USE_STL 1
+
 #ifdef TIXML_USE_STL
 	#include <string>
  	#include <iostream>
diff --git a/xmltest.cpp b/xmltest.cpp
index 663c157..057dbfe 100644
--- a/xmltest.cpp
+++ b/xmltest.cpp
@@ -2,6 +2,7 @@
    Test program for TinyXML.
 */

+#define TIXML_USE_STL 1

 #ifdef TIXML_USE_STL
 	#include <iostream>
--
2.5.0