code:
Fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119
wrong warning when using the universal zero initializer {0}

Backported to GCC 4.8.3

Subject: 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
X-Git-Url: http://repo.or.cz/w/official-gcc.git/commitdiff_plain/95cdf3fdf2d440eb7775def8e35ab970651c33d9?hp=14a3093e9943937cbc63dfbf4d51ca60f8325b29
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211289 138bc75d-0d04-0410-961f-82ee72b054a4

diff -r be309b9bafc4 gcc/c/c-typeck.c
--- a/gcc/c/c-typeck.c	Thu Jan 29 13:42:06 2015 -0500
+++ b/gcc/c/c-typeck.c	Thu Jan 29 13:42:08 2015 -0500
@@ -62,9 +62,9 @@
    if expr.original_code == SIZEOF_EXPR.  */
 tree c_last_sizeof_arg;

-/* Nonzero if we've already printed a "missing braces around initializer"
-   message within this initializer.  */
-static int missing_braces_mentioned;
+/* Nonzero if we might need to print a "missing braces around
+   initializer" message within this initializer.  */
+static int found_missing_braces;

 static int require_constant_value;
 static int require_constant_elements;
@@ -6379,6 +6379,9 @@
 /* 1 if this constructor is erroneous so far.  */
 static int constructor_erroneous;

+/* 1 if this constructor is the universal zero initializer { 0 }.  */
+static int constructor_zeroinit;
+
 /* Structure for managing pending initializer elements, organized as an
    AVL tree.  */

@@ -6540,7 +6543,7 @@
   constructor_stack = 0;
   constructor_range_stack = 0;

-  missing_braces_mentioned = 0;
+  found_missing_braces = 0;

   spelling_base = 0;
   spelling_size = 0;
@@ -6635,6 +6638,7 @@
   constructor_type = type;
   constructor_incremental = 1;
   constructor_designated = 0;
+  constructor_zeroinit = 1;
   designator_depth = 0;
   designator_erroneous = 0;

@@ -6832,11 +6836,8 @@
 	set_nonincremental_init (braced_init_obstack);
     }

-  if (implicit == 1 && warn_missing_braces && !missing_braces_mentioned)
-    {
-      missing_braces_mentioned = 1;
-      warning_init (OPT_Wmissing_braces, "missing braces around initializer");
-    }
+  if (implicit == 1)
+    found_missing_braces = 1;

   if (TREE_CODE (constructor_type) == RECORD_TYPE
 	   || TREE_CODE (constructor_type) == UNION_TYPE)
@@ -6969,16 +6970,23 @@
 	}
     }

+  if (vec_safe_length (constructor_elements) != 1)
+    constructor_zeroinit = 0;
+
+  /* Warn when some structs are initialized with direct aggregation.  */
+  if (!implicit && found_missing_braces && warn_missing_braces
+      && !constructor_zeroinit)
+    {
+      warning_init (OPT_Wmissing_braces,
+		    "missing braces around initializer");
+    }
+
   /* Warn when some struct elements are implicitly initialized to zero.  */
   if (warn_missing_field_initializers
       && constructor_type
       && TREE_CODE (constructor_type) == RECORD_TYPE
       && constructor_unfilled_fields)
     {
-	bool constructor_zeroinit =
-	 (vec_safe_length (constructor_elements) == 1
-	  && integer_zerop ((*constructor_elements)[0].value));
-
 	/* Do not warn for flexible array members or zero-length arrays.  */
 	while (constructor_unfilled_fields
 	       && (!DECL_SIZE (constructor_unfilled_fields)
@@ -8093,6 +8101,9 @@
   designator_depth = 0;
   designator_erroneous = 0;

+  if (!implicit && value.value && !integer_zerop (value.value))
+    constructor_zeroinit = 0;
+
   /* Handle superfluous braces around string cst as in
      char x[] = {"foo"}; */
   if (string_flag


code:
diff -r 96e24a32862b libgcc/unwind-dw2-fde-dip.c
--- a/libgcc/unwind-dw2-fde-dip.c	Thu Jan 29 13:41:42 2015 -0500
+++ b/libgcc/unwind-dw2-fde-dip.c	Thu Jan 29 13:41:44 2015 -0500
@@ -46,33 +46,13 @@
 #include "unwind-compat.h"
 #include "gthr.h"

-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-    && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
-	|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR)
 # define USE_PT_GNU_EH_FRAME
-#endif
-
-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-    && defined(__BIONIC__)
-# define USE_PT_GNU_EH_FRAME
-#endif
-
-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-    && defined(__FreeBSD__) && __FreeBSD__ >= 7
-# define ElfW __ElfN
-# define USE_PT_GNU_EH_FRAME
-#endif
-
-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-    && defined(__OpenBSD__)
-# define ElfW(type) Elf_##type
-# define USE_PT_GNU_EH_FRAME
-#endif
-
-#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
-    && defined(TARGET_DL_ITERATE_PHDR) \
-    && defined(__sun__) && defined(__svr4__)
-# define USE_PT_GNU_EH_FRAME
+# ifdef __OpenBSD__
+#  define ElfW(type) Elf_##type
+# elif defined(__FreeBSD__) && __FreeBSD__ >= 7
+#  define ElfW __ElfN
+# endif
 #endif

 #if defined(USE_PT_GNU_EH_FRAME)

repo_name: aarf/bkauler

license: unknown


code:
diff -r ec6a0ac94411 gcc/gcc.c
--- a/gcc/gcc.c	Sun Jul 26 15:46:17 2015 -0400
+++ b/gcc/gcc.c	Sun Jul 26 15:46:19 2015 -0400
@@ -729,7 +729,7 @@
 #ifndef LINK_SSP_SPEC
 #ifdef TARGET_LIBC_PROVIDES_SSP
 #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
-		       "|fstack-protector-strong|fstack-protector-explicit:}"
+		       "|fstack-protector-strong|fstack-protector-explicit:-lssp_nonshared}"
 #else
 #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
 		       "|fstack-protector-strong|fstack-protector-explicit" \


code:
diff -r 9c90643665ae libgcc/unwind-dw2-fde-dip.c
--- a/libgcc/unwind-dw2-fde-dip.c	Sun Jul 26 15:46:13 2015 -0400
+++ b/libgcc/unwind-dw2-fde-dip.c	Sun Jul 26 15:46:15 2015 -0400
@@ -46,6 +46,10 @@
 #include "unwind-compat.h"
 #include "gthr.h"

+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) && defined(TARGET_DL_ITERATE_PHDR)
+# define USE_PT_GNU_EH_FRAME
+#endif
+
 #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
     && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
 	|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))


code:
Author: "P. J. McDermott" <pjm@nac.net>
Subject: Fix opcodes/configure (BFD_VERSION) on BusyBox ash

Commit c4dd807 in binutils-gdb.git somehow broke opcodes/configure on ash:

    mkdir ./opcodes
    Configuring in ./opcodes
    configure: creating cache ./config.cache
    [...]
    /usr/src/gdb_7.6.1+sip1-1/tmp/src/opcodes/configure: .: line 12678: can't open '/usr/src/gdb_7.6.1+sip1-1/tmp/src/opcodes/configure.host'

I'm not sure why this happens, but I suspect _AS_LINENO_PREPARE is involved
here.

For now, we'll avoid this issue by reverting to pre-c4dd807 behavior, updated to
use AC_INIT.

diff -Naur src.orig/opcodes/configure src/opcodes/configure
--- src.orig/opcodes/configure	2013-02-06 18:22:25.000000000 -0500
+++ src/opcodes/configure	2014-01-17 08:25:48.281453599 -0500
@@ -3216,7 +3216,7 @@
 # We currently only use the version number for the name of any shared
 # library.  For user convenience, we always use the same version
 # number that BFD is using.
-BFD_VERSION=`${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p'`
+BFD_VERSION=`sed -n 's/AC_INIT(\[bfd\], *\[\([0-9.]*\)\])/\1/p' <${srcdir}/../bfd/configure.in`

 am__api_version='1.11'

diff -Naur src.orig/opcodes/configure.in src/opcodes/configure.in
--- src.orig/opcodes/configure.in	2013-02-06 18:22:26.000000000 -0500
+++ src/opcodes/configure.in	2014-01-17 08:25:42.873294676 -0500
@@ -28,7 +28,7 @@
 # library.  For user convenience, we always use the same version
 # number that BFD is using.
 changequote(,)dnl
-BFD_VERSION=`${srcdir}/../bfd/configure --version | sed -n -e '1s,.* ,,p'`
+BFD_VERSION=`sed -n 's/AC_INIT(\[bfd\], *\[\([0-9.]*\)\])/\1/p' <${srcdir}/../bfd/configure.in`
 changequote([,])dnl

 AM_INIT_AUTOMAKE(opcodes, ${BFD_VERSION})


code:
--- gdb-7.6.2.org/gdb/symfile.c
+++ gdb-7.6.2/gdb/symfile.c
@@ -1601,6 +1601,7 @@

   debugfile = find_separate_debug_file (dir, canon_dir, debuglink,
 					crc32, objfile);
+  if(!debugfile) debugfile = find_separate_debug_file("/lib/debug/", "", debuglink, crc32, objfile);
   xfree (canon_dir);

   if (debugfile == NULL)


code:
this patch fixes compilation of gdbserver on systems that don't have
thread_db.h. in that case we fall back to gdb's own copy
"gdb_thread_db.h", so the typedef of the td_thrhandle_t member is
available, which is accessed in other parts of the code without
checking whether thread_db.h is available.
this is by far the cleaner solution, removing the accesses to the
th member in other parts of the source would either litter it with
ifdefs or cripple the functionality.

--- gdb-7.6.2.org/gdb/gdbserver/linux-low.h
+++ gdb-7.6.2/gdb/gdbserver/linux-low.h
@@ -18,6 +18,8 @@

 #ifdef HAVE_THREAD_DB_H
 #include <thread_db.h>
+#else
+#include "gdb_thread_db.h"
 #endif
 #include <signal.h>

@@ -270,11 +272,9 @@
   int need_step_over;

   int thread_known;
-#ifdef HAVE_THREAD_DB_H
   /* The thread handle, used for e.g. TLS access.  Only valid if
      THREAD_KNOWN is set.  */
   td_thrhandle_t th;
-#endif

   /* Arch-specific additions.  */
   struct arch_lwp_info *arch_private;


code:
--- gdb-7.6.2.org/gdb/common/linux-ptrace.h
+++ gdb-7.6.2/gdb/common/linux-ptrace.h
@@ -67,6 +67,7 @@
 #define __WALL          0x40000000 /* Wait for any child.  */
 #endif

+#include <unistd.h> /* for pid_t */
 extern void linux_ptrace_attach_warnings (pid_t pid, struct buffer *buffer);
 extern void linux_ptrace_init_warnings (void);


code:
some newer version of readline uses history_max_entries
as an alias to max_input_history.
all other occurences in the code use max_input_history.

fix for consistency and to make the code again work with
libedit as a drop-in replacement for readline.

--- gdb-7.6.2.org/gdb/top.c
+++ gdb-7.6.2/gdb/top.c
@@ -1446,7 +1446,7 @@

       /* Restore previous value before throwing.  */
       if (history_is_stifled ())
-	history_size_setshow_var = history_max_entries;
+	history_size_setshow_var = max_input_history;
       else
 	history_size_setshow_var = UINT_MAX;


code:
diff -u -r -N gdb-7.3.1-org//gdb/amd64-linux-nat.c gdb-7.3.1-patched//gdb/amd64-linux-nat.c
--- gdb-7.3.1-org//gdb/amd64-linux-nat.c	1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.3.1-patched//gdb/amd64-linux-nat.c	2011-09-22 22:20:23.438841813 +0000
@@ -32,7 +32,7 @@
 #include "elf/common.h"
 #include <sys/uio.h>
 #include <sys/ptrace.h>
-#include <sys/debugreg.h>
+#include "debugreg.h"
 #include <sys/syscall.h>
 #include <sys/procfs.h>
 #include <asm/prctl.h>
diff -u -r -N gdb-7.3.1-org//gdb/debugreg.h gdb-7.3.1-patched//gdb/debugreg.h
--- gdb-7.3.1-org//gdb/debugreg.h	1970-01-01 00:00:00.000000000 +0000
+++ gdb-7.3.1-patched//gdb/debugreg.h	2011-09-22 22:20:01.381841813 +0000
@@ -0,0 +1,48 @@
+#ifndef SYS_DEBUGREG_H
+#define SYS_DEBUGREG_H
+
+#include <stdint.h>
+
+#define DR_FIRSTADDR 0
+#define DR_LASTADDR 3
+
+#define DR_STATUS 6
+#define DR_CONTROL 7
+
+#define DR_TRAP0        (0x1)
+#define DR_TRAP1        (0x2)
+#define DR_TRAP2        (0x4)
+#define DR_TRAP3        (0x8)
+
+#define DR_STEP         (0x4000)
+#define DR_SWITCH       (0x8000)
+
+#define DR_CONTROL_SHIFT 16
+#define DR_CONTROL_SIZE  4
+
+#define DR_RW_EXECUTE   (0x0)
+#define DR_RW_WRITE     (0x1)
+#define DR_RW_READ      (0x3)
+
+#define DR_LEN_1 (0x0)
+#define DR_LEN_2 (0x4)
+#define DR_LEN_4 (0xC)
+#define DR_LEN_8 (0x8)
+
+#define DR_LOCAL_ENABLE_SHIFT  0
+#define DR_GLOBAL_ENABLE_SHIFT 1
+#define DR_ENABLE_SIZE         2
+
+#define DR_LOCAL_ENABLE_MASK  (0x55)
+#define DR_GLOBAL_ENABLE_MASK (0xAA)
+
+
+#if SIZE_MAX > 4294967295
+# define DR_CONTROL_RESERVED (0xFFFFFFFF0000FC00UL)
+#else
+# define DR_CONTROL_RESERVED (0x00FC00U)
+#endif
+#define DR_LOCAL_SLOWDOWN   (0x100)
+#define DR_GLOBAL_SLOWDOWN  (0x200)
+
+#endif


code:
the first chunk fixes build errors,
the non_stop part below fixes thread debugging being available
by default without setting any breakpoints or usage of libthread_db.

--- gdb-7.4.org/gdb/linux-nat.c	2013-08-10 05:24:24.651000003 +0000
+++ gdb-7.4/gdb/linux-nat.c	2013-08-10 05:25:50.966000003 +0000
@@ -71,6 +71,14 @@
 # endif
 #endif /* HAVE_PERSONALITY */

+#ifndef __SIGRTMIN
+#define __SIGRTMIN SIGRTMIN
+#endif
+
+#ifndef W_STOPCODE
+#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
+#endif
+
 /* This comment documents high-level logic of this file.

 Waiting for events in sync mode
@@ -2265,7 +2273,7 @@
 		status = 0;
 	    }

-	  if (non_stop)
+	  if (1)
 	    {
 	      /* Add the new thread to GDB's lists as soon as possible
 		 so that:


code:
#ifndef _SGIDEFS_H
#define _SGIDEFS_H

/* MIPS ABI crap that GLIBC puts into /include
   by default, and GDB depends on it happily. */

#define _MIPS_ISA_MIPS1 1
#define _MIPS_ISA_MIPS2 2
#define _MIPS_ISA_MIPS3 3
#define _MIPS_ISA_MIPS4 4
#define _MIPS_ISA_MIPS5 5
#define _MIPS_ISA_MIPS32 6
#define _MIPS_ISA_MIPS64 7

#ifndef _ABIO32
#define _ABIO32 1
#endif
#define _MIPS_SIM_ABI32 _ABIO32

#ifndef _ABIO32
#define _ABIO32 1
#endif
#define _MIPS_SIM_ABI32 _ABIO32

#ifndef _ABIN32
#define _ABIN32 2
#endif
#define _MIPS_SIM_NABI32 _ABIN32

#ifndef _ABI64
#define _ABI64 3
#endif
#define _MIPS_SIM_ABI64 _ABI64

#endif


code:
--- gdb-7.4.org/gdb/common/gdb_thread_db.h
+++ gdb-7.4/gdb/common/gdb_thread_db.h
@@ -1,17 +1,5 @@
 #ifdef HAVE_THREAD_DB_H
 #include <thread_db.h>
-
-#ifndef LIBTHREAD_DB_SO
-#define LIBTHREAD_DB_SO "libthread_db.so.1"
-#endif
-
-#ifndef LIBTHREAD_DB_SEARCH_PATH
-/* $sdir appears before $pdir for some minimal security protection:
-   we trust the system libthread_db.so a bit more than some random
-   libthread_db associated with whatever libpthread the app is using.  */
-#define LIBTHREAD_DB_SEARCH_PATH "$sdir:$pdir"
-#endif
-
 #else

 /* Copyright (C) 1999-2000, 2007-2012 Free Software Foundation, Inc.
@@ -453,3 +441,15 @@
 #endif	/* thread_db.h */

 #endif /* HAVE_THREAD_DB_H */
+
+#ifndef LIBTHREAD_DB_SO
+#define LIBTHREAD_DB_SO "libthread_db.so.1"
+#endif
+
+#ifndef LIBTHREAD_DB_SEARCH_PATH
+/* $sdir appears before $pdir for some minimal security protection:
+   we trust the system libthread_db.so a bit more than some random
+   libthread_db associated with whatever libpthread the app is using.  */
+#define LIBTHREAD_DB_SEARCH_PATH "$sdir:$pdir"
+#endif
+


code:
--- a/src/msgmerge.c
+++ b/src/msgmerge.c
@@ -158,8 +158,6 @@ int main(int argc, char**argv) {
 				} else if(streq(A+2, "update")) {
 					set_update:
 					update = 1;
-					fprintf(stdout, "error: update functionality unimplemented\n");
-					exit(update);
 				} else if(streq(A+2, "help")) syntax();

 			} else if(streq(A + 1, "o")) {
@@ -192,20 +190,27 @@ int main(int argc, char**argv) {
 				exit(1);
 			} else if (streq(A+1, "h")) syntax();
 		} else if(expect_fn.out) {
+			if(update && streq(A, "/dev/null")) return 0;
 			set_file(1, A, &files.out);
 			expect_fn.out = 0;
 		} else if(expect_fn.compend) {
 			set_file(1, A, &files.compend);
 			expect_fn.compend = 0;
 		} else if(expect_fn.po) {
+			if(update && streq(A, "/dev/null")) return 0;
 			set_file(0, A, &files.po);
 			expect_fn.po = 0;
 			expect_fn.pot = 1;
 		} else if(expect_fn.pot) {
+			if(update && streq(A, "/dev/null")) return 0;
 			set_file(0, A, &files.pot);
 			expect_fn.pot = 0;
 		}
 	}
+	if(update) {
+		fprintf(stdout, "error: update functionality unimplemented\n");
+		exit(update);
+	}
 	if(!files.out || !files.po || !files.pot) syntax();
 	int ret = process(&files, update, backup);
 	FILE** filearr = (FILE**) &files;
--
1.8.4


code:
From 3cdb942c6b3e45dfdcc21f521babf7ba318d0566 Mon Sep 17 00:00:00 2001
From: rofl0r <retnyg@gmx.net>
Date: Mon, 12 May 2014 18:54:00 +0200
Subject: [PATCH] libintl.h: using parens for gettext_noop breaks grep

---
 include/libintl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/libintl.h b/include/libintl.h
index 15fb5bf..b7123a9 100644
--- a/include/libintl.h
+++ b/include/libintl.h
@@ -13,7 +13,7 @@ char *bind_textdomain_codeset(const char *domainname, const char *codeset);
 char *bindtextdomain(const char *domainname, const char *dirname);

 #undef gettext_noop
-#define gettext_noop(X) (X)
+#define gettext_noop(X) X

 #ifndef LIBINTL_NO_MACROS
 /* if these macros are defined, configure checks will detect libintl as
--
1.8.4


code:
--- gimp-2.8.2.org/app/config/gimpguiconfig.c	2013-01-02 21:54:13.666000002 +0000
+++ gimp-2.8.2/app/config/gimpguiconfig.c	2013-01-10 15:07:06.807000004 +0000
@@ -197,7 +197,7 @@
   GIMP_CONFIG_INSTALL_PROP_BOOLEAN (object_class, PROP_TOOLBOX_WILBER,
                                     "toolbox-wilber",
                                     TOOLBOX_WILBER_BLURB,
-                                    TRUE,
+                                    FALSE,
                                     GIMP_PARAM_STATIC_STRINGS);
   path = gimp_config_build_data_path ("themes");
   GIMP_CONFIG_INSTALL_PROP_PATH (object_class, PROP_THEME_PATH,


code:
--- glib-2.45.2.org/gio/Makefile.in
+++ glib-2.45.2/gio/Makefile.in
@@ -832,7 +832,7 @@
     *) \
       b='$*';; \
   esac
-DIST_SUBDIRS = gdbus-2.0/codegen xdgmime inotify kqueue win32 . tests \
+DIST_SUBDIRS = xdgmime inotify kqueue win32 . tests \
 	fam
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/gio.rc.in \
 	$(srcdir)/gnetworking.h.in $(top_srcdir)/depcomp \
@@ -1213,7 +1213,7 @@
 @ENABLE_INSTALLED_TESTS_TRUE@                      $(dist_test_scripts) $(dist_installed_test_scripts)

 @ENABLE_INSTALLED_TESTS_TRUE@installed_test_meta_DATA = $(installed_testcases:=.test)
-SUBDIRS = gdbus-2.0/codegen $(am__append_15) $(am__append_19) \
+SUBDIRS = $(am__append_15) $(am__append_19) \
 	$(am__append_22) $(am__append_25) . tests $(am__append_28)
 @MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@install_ms_lib_cmd = $(INSTALL) gio-2.0.lib $(DESTDIR)$(libdir)
 @MS_LIB_AVAILABLE_TRUE@@OS_WIN32_AND_DLL_COMPILATION_TRUE@uninstall_ms_lib_cmd = -rm $(DESTDIR)$(libdir)/gio-2.0.lib


code:
--- glibmm-2.28.2.org/glib/glibmm/varianttype.cc	2013-01-04 08:17:07.683000003 +0000
+++ glibmm-2.28.2/glib/glibmm/varianttype.cc	2013-01-04 08:17:23.767000002 +0000
@@ -23,7 +23,7 @@

 #include <glibmm/varianttype.h>
 #include <glibmm/utility.h>
-#include <glib/gvarianttype.h>
+#include <glib.h>

 namespace Glib
 {


code:
#!/bin/sh
empty_file() {
        rm -f "$1"
        touch "$1"
}

dir="$1"
# fix files breaking the build entirely
for i in freadahead.c fseterr.c ; do empty_file "$dir"/$i ; done
echo "void close_stdin(void) {}" > "$dir"/closein.c

# fix stuff trying to reimplement libc
culprits=`cat << EOF
accept4
acosl
alloca
alphasort
asinl
asprintf
atanl
atexit
atoll
bcopy
btowc
chown
closedir
cosl
dirfd
dprintf
dup2
dup3
_Exit
expl
fchdir
fchown-stub
fdatasync
fdopendir
ffs
flock
fnmatch
forkpty
fpending
fprintf
freeaddrinfo
fsync
ftell
ftruncate
futimens
gai_strerror
getaddrinfo
getdelim
getdtablesize
getgroups
gethostname
getline
getlogin
getlogin_r
getnameinfo
getpagesize
getpass
getsubopt
gettimeofday
getusershell
gmtime_r
grantpt
imaxabs
imaxdiv
inet_ntop
inet_pton
isblank
iswblank
lchmod
lchown
ldexp
ldexpl
link
linkat
logl
mbrlen
mbrtowc
mbsinit
memmove
mempcpy
mkdtemp
mkfifo
mkfifoat
mknod
mknodat
mkstemp
mktime
nanosleep
nl_langinfo
open
openat
opendir
openpty
pclose
perror
pipe
pipe2
poll
popen
pread
pselect
ptsname
pwrite
raise
readdir
readlink
renameat
rewinddir
setenv
sigaction
sigaddset
sigdelset
sigemptyset
sigfillset
sigismember
sigpending
sigprocmask
sinl
snprintf
spawnattr_destroy
spawnattr_getdefault
spawnattr_getflags
spawnattr_getpgroup
spawnattr_getsigmask
spawnattr_init
spawnattr_setdefault.c
spawnattr_setflags
spawnattr_setpgroup
spawnattr_setsigmask
spawn_faction_addclose
spawn_faction_adddup2
spawn_faction_addopen
spawn_faction_destroy
spawn_faction_init
spawn_factions_addopen
spawn_factions_destroy
spawn_factions_init
sprintf
sqrtl
stdio-read
stdio-write
strcasecmp
strcasestr
strchrnul
strcspn
strncasecmp
strndup
strnlen
strpbrk
strsep
strsignal
strstr
strtod
strtoimax
strtol
symlink
symlinkat
tanl
tcgetsid
timegm
time_r
times
tmpfile
uname
unlockpt
unsetenv
usleep
vasprintf
vdprintf
waitpid
wcrtomb
wctob
EOF
`
#fixme check fsusage
flags="-Drpl_tzset=tzset -Drpl_localtime=localtime -Dgnu_fnmatch=fnmatch \
       -Dposix_fnmatch=fnmatch -Drpl_gmtime=gmtime"
for i in $culprits ; do
	empty_file "$dir"/$i.c
	flags="$flags -Drpl_$i=$i"
done
printf "%s\n" "$flags"

path: KEEP/gnulibfix


code:
--- a/include/libc.h
+++ b/include/libc.h
@@ -102,7 +102,6 @@
 #define atoll		p9atoll
 #define getenv		p9getenv
 #define	getwd		p9getwd
-#define	longjmp		p9longjmp
 #undef  setjmp
 #define setjmp		p9setjmp
 #define putenv		p9putenv


code:
--- grafx2.org/src/init.c	2013-01-02 19:51:23.898000003 +0000
+++ grafx2/src/init.c	2013-01-02 19:54:08.358000003 +0000
@@ -2772,7 +2772,7 @@

 #if defined(__WIN32__)
   #define SIGHANDLER_T __p_sig_fn_t
-#elif defined(__macosx__)
+#elif defined(__macosx__) || defined(__linux__)
   typedef void (*sig_t) (int);
   #define SIGHANDLER_T sig_t
 #else


code:
Submitted By: Andrew Benton <andy@benton.eu.com>
Date: 2012-06-15
Initial Package Version: 0.10.13
Upstream Status: From upstream
Origin:
http://git.videolan.org/?p=ffmpeg.git;a=patch;h=5f654897e325349dacf2546674e0510bb72ecb50

Description: Fixes compiling gst-ffmpeg with gcc-4.7

libavcodec/x86/h264_qpel_mmx.c: Assembler messages:
libavcodec/x86/h264_qpel_mmx.c:1294: Error: operand type mismatch for `cmp'
libavcodec/x86/h264_qpel_mmx.c:1294: Error: operand type mismatch for `cmp'
libavcodec/x86/h264_qpel_mmx.c:1298: Error: operand type mismatch for `cmp'
libavcodec/x86/h264_qpel_mmx.c:1298: Error: operand type mismatch for `cmp'
libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp'
libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp'
libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp'
make[5]: *** [libavcodec/x86/dsputil_mmx.o] Error 1

Index: gst-ffmpeg-0.10.13/gst-libs/ext/libav/libavcodec/x86/h264_qpel_mmx.c
===================================================================
--- gst-ffmpeg-0.10.13.orig/gst-libs/ext/libav/libavcodec/x86/h264_qpel_mmx.c	2012-03-30 11:39:41.324522051 -0700
+++ gst-ffmpeg-0.10.13/gst-libs/ext/libav/libavcodec/x86/h264_qpel_mmx.c	2012-03-30 11:54:08.152564075 -0700
@@ -398,7 +398,7 @@
             "2:                         \n\t"\
             \
             : "+a"(src), "+c"(dst)\
-            : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\
+            : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\
             : "memory"\
         );\
         src += 4-(h+5)*srcStride;\
@@ -446,7 +446,7 @@
             QPEL_H264HV(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, 15*48)\
             "2:                     \n\t"\
             : "+a"(src)\
-            : "c"(tmp), "S"((x86_reg)srcStride), "g"(size)\
+            : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size)\
             : "memory"\
             );\
         tmp += 4;\
@@ -823,7 +823,7 @@
         "2:                          \n\t"\
         \
         : "+a"(src), "+c"(dst)\
-        : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\
+        : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\
         : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3", \
                        "%xmm4", "%xmm5", "%xmm6", "%xmm7",)\
           "memory"\
@@ -878,7 +878,7 @@
             QPEL_H264HV_XMM(%%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, %%xmm2, 15*48)
             "2:                         \n\t"
             : "+a"(src)
-            : "c"(tmp), "S"((x86_reg)srcStride), "g"(size)
+            : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size)
             : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3",
                            "%xmm4", "%xmm5", "%xmm6", "%xmm7",)
               "memory"


code:
--- gtk+-2.24.10.org/gtk/gtksettings.c
+++ gtk+-2.24.10/gtk/gtksettings.c
@@ -314,7 +314,7 @@
                                              g_param_spec_string ("gtk-fallback-icon-theme",
 								  P_("Fallback Icon Theme Name"),
 								  P_("Name of a icon theme to fall back to"),
-								  NULL,
+								  "nuoveXT2",
 								  GTK_PARAM_READWRITE),
                                              NULL);
   g_assert (result == PROP_FALLBACK_ICON_THEME);


code:
--- a/src/main/print-olympus.c	2014-05-15 01:18:36.000000000 +0000
+++ b/src/main/print-olympus.c
@@ -4901,9 +4901,9 @@ dyesub_do_print(stp_vars_t *v, stp_image
   }

   if (pv.bytes_per_ink_channel > 1) {
-#if defined(__LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN__)
+#if __BYTE_ORDER == __LITTLE_ENDIAN
     pv.byteswap = dyesub_feature(caps, DYESUB_FEATURE_BIGENDIAN);
-#elif defined (__BIG_ENDIAN) || defined(__BIG_ENDIAN__)
+#elif __BYTE_ORDER == __BIG_ENDIAN
     pv.byteswap = !dyesub_feature(caps, DYESUB_FEATURE_BIGENDIAN);
 #else
 #error "Unable to determine endianness, aborting compilation!"


code:
--- guvcview-src-2.0.1.org/gview_v4l2core/gviewv4l2core.h
+++ guvcview-src-2.0.1/gview_v4l2core/gviewv4l2core.h
@@ -33,7 +33,9 @@
 #include <sys/types.h>

 /*make sure we support c++*/
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif

 /*
  * LOGITECH Dynamic controls defs
@@ -1112,7 +1114,9 @@
  */
 uint64_t v4l2core_time_get_timestamp();

-__END_DECLS
+#ifdef __cplusplus
+}
+#endif

 #endif

--- guvcview-src-2.0.1.org/gview_render/gviewrender.h
+++ guvcview-src-2.0.1/gview_render/gviewrender.h
@@ -38,7 +38,9 @@
 #include <sys/types.h>

 /*make sure we support c++*/
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif

 #define RENDER_NONE     (0)
 #define RENDER_SDL      (1)
@@ -279,6 +281,8 @@
  */
 void render_close();

-__END_DECLS
+#ifdef __cplusplus
+}
+#endif

 #endif
--- guvcview-src-2.0.1.org/gview_encoder/gviewencoder.h
+++ guvcview-src-2.0.1/gview_encoder/gviewencoder.h
@@ -38,7 +38,9 @@
 #include <sys/types.h>

 /*make sure we support c++*/
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif

 /*encoder modes*/
 #define ENCODER_MODE_NONE   (0)
@@ -732,6 +734,8 @@
  */
 int encoder_disk_supervisor(int treshold, const char *path);

-__END_DECLS
+#ifdef __cplusplus
+}
+#endif

 #endif
--- guvcview-src-2.0.1.org/gview_audio/gviewaudio.h
+++ guvcview-src-2.0.1/gview_audio/gviewaudio.h
@@ -38,7 +38,9 @@
 #include <sys/types.h>

 /*make sure we support c++*/
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif

 /*Audio API*/
 #define AUDIO_NONE          (0)
@@ -246,6 +248,8 @@
  */
 void audio_close(audio_context_t *audio_ctx);

-__END_DECLS
+#ifdef __cplusplus
+}
+#endif

 #endif


code:
151c151
< #define		ACCT
---
> #undef		ACCT


code:
/*
 * host.c - Light implementation of the classic host utility
 *
 * Copyright 2014 Rich Felker
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to
 * deal in the Software without restriction, including without limitation the
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 * sell copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */

#include <resolv.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/socket.h>

#define PL_IP 1
#define PL_NAME 2
#define PL_DATA 3
#define PL_TEXT 4
#define PL_SOA 5
#define PL_MX 6
#define PL_SRV 7

static const struct rrt {
	const char *name;
	const char *msg;
	int pl;
	int af;
} rrt[] = {
	[1] = { "A", "has address", PL_IP, AF_INET },
	[28] = { "AAAA", "has address", PL_IP, AF_INET6 },
	[2] = { "NS", "name server", PL_NAME },
	[5] = { "CNAME", "is a nickname for", PL_NAME },
	[16] = { "TXT", "descriptive text", PL_TEXT },
	[6] = { "SOA", "start of authority", PL_SOA },
	[12] = { "PTR", "domain name pointer", PL_NAME },
	[15] = { "MX", "mail is handled", PL_MX },
	[33] = { "SRV", "mail is handled", PL_SRV },
	[255] = { "*", 0, 0 },
};

static const char rct[16][32] = {
	"Success",
	"Format error",
	"Server failure",
	"Non-existant domain",
	"Not implemented",
	"Refused",
};

int main(int argc, char **argv)
{
	int verbose=0, type;
	char *type_str=0, *name, *nsname;
	int c, i, j, ret, sec, count, rcode, qlen, alen, pllen = 0;
	unsigned ttl, pri, v[5];
	unsigned char qbuf[280], abuf[512], *p;
	char rrname[256], plname[640], ptrbuf[80];
	struct addrinfo *ai, iplit_hints = { .ai_flags = AI_NUMERICHOST };

	while ((c = getopt(argc, argv, "avt:")) != EOF) switch(c) {
	case 'a': type_str="255"; verbose=1; break;
	case 'v': verbose=1; break;
	case 't': type_str=optarg; break;
	default: return 1;
	}
	if (!argv[optind]) {
		fprintf(stderr, "Usage: %s [-a] [-v] [-t type] "
			"hostname [nameserver]\n", argv[0]);
		return 1;
	}
	name = argv[optind];
	nsname = argv[optind+1];

	if (!getaddrinfo(name, 0, &iplit_hints, &ai)) {
		switch (ai->ai_family) {
			unsigned char *a;
			static const char xdigits[] = "0123456789abcdef";
		case AF_INET:
			a = (void *)&((struct sockaddr_in *)ai->ai_addr)->sin_addr;
			snprintf(ptrbuf, sizeof ptrbuf,
				"%d.%d.%d.%d.in-addr.arpa",
				a[3], a[2], a[1], a[0]);
			break;
		case AF_INET6:
			a = (void *)&((struct sockaddr_in6 *)ai->ai_addr)->sin6_addr;
			for (j=0, i=15; i>=0; i--) {
				ptrbuf[j++] = xdigits[a[i]&15];
				ptrbuf[j++] = '.';
				ptrbuf[j++] = xdigits[a[i]>>4];
				ptrbuf[j++] = '.';
			}
			strcpy(ptrbuf+j, "ip6.arpa");
			break;
		}
		name = ptrbuf;
		if (!type_str) type_str="12";
	} else {
		if (!type_str) type_str="1";
	}

	if (type_str[0]-'0' < 10u) {
		type = atoi(type_str);
	} else {
		type = -1;
		for (i=0; i < sizeof rrt / sizeof *rrt; i++) {
			if (rrt[i].name && !strcasecmp(type_str, rrt[i].name)) {
				type = i;
				break;
			}
		}
		if (!strcasecmp(type_str, "any")) type = 255;
		if (type < 0) {
			fprintf(stderr, "Invalid query type: %s\n", type_str);
			return 1;
		}
	}

	qlen = res_mkquery(0, name, 1, type, 0, 0, 0, qbuf, sizeof qbuf);
	if (qlen < 0) {
		fprintf(stderr, "Invalid query parameters: %s", name);
		return 1;
	}

	if (nsname) {
		struct addrinfo ns_hints = { .ai_socktype = SOCK_DGRAM };
		if ((ret = getaddrinfo(nsname, "53", &ns_hints, &ai)) < 0) {
			fprintf(stderr, "Error looking up server name: %s\n",
				gai_strerror(ret));
			return 1;
		}
		int s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
		if (s < 0 || connect(s, ai->ai_addr, ai->ai_addrlen) < 0) {
			fprintf(stderr, "Socket error: %s\n", strerror(errno));
			return 1;
		}
		setsockopt(s, SOL_SOCKET, SO_RCVTIMEO,
			&(struct timeval){ .tv_sec = 5 },
			sizeof (struct timeval));
		printf("Using domain server %s:\n", nsname);
		send(s, qbuf, qlen, 0);
		alen = recv(s, abuf, sizeof abuf, 0);
	} else {
		alen = res_send(qbuf, qlen, abuf, sizeof abuf);
	}

	if (alen < 12) {
		fprintf(stderr, "Host not found, try again.\n");
		return 1;
	}

	rcode = abuf[3] & 15;

	if (verbose) {
		printf("rcode = %d (%s), ancount = %d\n",
			rcode, rct[rcode], 256*abuf[6] + abuf[7]);
		if (!(abuf[2] & 4))
			printf("The following answer is not authoritative:\n");
	}

	if (rcode) {
		fprintf(stderr, "Host not found.\n");
		if (!verbose) return 1;
	}

	p = abuf + 12;
	for (sec=0; sec<4; sec++) {
		count = 256*abuf[4+2*sec] + abuf[5+2*sec];
		if (verbose && count>0 && sec>1) {
			puts(sec==2 ? "For authoritative answers, see:"
				: "Additional information:");
		}
		for (; count--; p += pllen) {
			p += dn_expand(abuf, abuf+alen, p, rrname, sizeof rrname);
			type = 256*p[0] + p[1];
			p += 4;
			if (!sec) continue;
			ttl = 16777216*p[0] + 65536*p[1] + 256*p[2] + p[3];
			p += 4;
			pllen = 256*p[0] + p[1];
			p += 2;
			switch (type<sizeof rrt/sizeof *rrt ? rrt[type].pl : 0) {
			case PL_IP:
				inet_ntop(rrt[type].af, p, plname, sizeof plname);
				break;
			case PL_NAME:
				dn_expand(abuf, abuf+alen, p, plname, sizeof plname);
				break;
			case PL_TEXT:
				snprintf(plname, sizeof plname, "\"%.*s\"", pllen, p);
				break;
			case PL_SOA:
				i = dn_expand(abuf, abuf+alen, p, plname, sizeof plname - 1);
				strcat(plname, " ");
				i += dn_expand(abuf, abuf+alen, p+i, plname+strlen(plname),
					sizeof plname-strlen(plname));
				for (j=0; j<5; j++)
					v[j] = 16777216u*p[i+4*j] + 65536*p[1+i+4*j]
						+ 256*p[2+i+4*j] + p[3+i+4*j];
				snprintf(plname+strlen(plname),
					sizeof plname-strlen(plname),
					"(\n\t\t%u\t;serial (version)\n"
					"\t\t%u\t;refresh period\n"
					"\t\t%u\t;retry interval\n"
					"\t\t%u\t;expire time\n"
					"\t\t%u\t;default ttl\n"
					"\t\t)", v[0], v[1], v[2], v[3], v[4]);
				break;
			case PL_MX:
				pri = 256*p[0] + p[1];
				snprintf(plname, sizeof plname,
					verbose ? "%d " : "(pri=%d) by ", pri);
				dn_expand(abuf, abuf+alen, p+2,
					plname+strlen(plname),
					sizeof plname - strlen(plname));
				break;
			case PL_SRV:
				for (j=0; j<3; j++)
					v[j] = 256*p[2*j] + p[1+2*j];
				snprintf(plname, sizeof plname,
					"%u %u %u ", v[0], v[1], v[2]);
				dn_expand(abuf, abuf+alen, p+6,
					plname+strlen(plname),
					sizeof plname - strlen(plname));
				break;
			default:
				printf("%s unsupported RR type %u\n", rrname, type);
				continue;
			}
			if (verbose) {
				printf("%s\t%u\t%s %s\t%s\n",
					rrname, ttl, "IN", rrt[type].name, plname);
			} else if (rrt[type].msg) {
				printf("%s %s %s\n", rrname, rrt[type].msg, plname);
			}
		}
		if (!verbose && sec==1) break;
	}
	return rcode;
}


code:
--- hping2-rc3.org/bytesex.h
+++ hping2-rc3/bytesex.h
@@ -7,16 +7,10 @@
 #ifndef ARS_BYTESEX_H
 #define ARS_BYTESEX_H

-#if 	defined(__i386__) \
-	|| defined(__alpha__) \
-	|| (defined(__mips__) && (defined(MIPSEL) || defined (__MIPSEL__)))
+#include <endian.h>
+#if __BYTE_ORDER == __LITTLE_ENDIAN
 #define BYTE_ORDER_LITTLE_ENDIAN
-#elif 	defined(__mc68000__) \
-	|| defined (__sparc__) \
-	|| defined (__sparc) \
-	|| defined (__PPC__) \
-	|| defined (__BIG_ENDIAN__) \
-	|| (defined(__mips__) && (defined(MIPSEB) || defined (__MIPSEB__)))
+#elif __BYTE_ORDER == __BIG_ENDIAN
 #define BYTE_ORDER_BIG_ENDIAN
 #else
 # error can not find the byte order for this architecture, fix bytesex.h


code:
/*
 * iconv.c
 * Implementation of SUSv4 XCU iconv utility
 * Copyright © 2011 Rich Felker
 * Licensed under the terms of the GNU General Public License, v2 or later
 */

#include <stdlib.h>
#include <stdio.h>
#include <iconv.h>
#include <locale.h>
#include <langinfo.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

int main(int argc, char **argv)
{
	const char *from=0, *to=0;
	int b;
	iconv_t cd;
	char buf[BUFSIZ];
	char outbuf[BUFSIZ*4];
	char *in, *out;
	size_t inb;
	size_t l;
	size_t unitsize=0;
	int err=0;
	FILE *f;

	while ((b = getopt(argc, argv, "f:t:csl")) != EOF) switch(b) {
	case 'l':
		puts("UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF32-LE, UCS-2BE, UCS-2LE, WCHAR_T,\n"
			"US_ASCII, ISO8859-1, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5,\n"
			"ISO8859-6, ISO8859-7, ...");
		exit(0);
	case 'c': case 's': break;
	case 'f': from=optarg; break;
	case 't': to=optarg; break;
	default: exit(1);
	}

	if (!from || !to) {
		setlocale(LC_CTYPE, "");
		if (!to) to = nl_langinfo(CODESET);
		if (!from) from = nl_langinfo(CODESET);
	}
	cd = iconv_open(to, from);
	if (cd == (iconv_t)-1) {
		if (iconv_open(to, "WCHAR_T") == (iconv_t)-1)
			fprintf(stderr, "iconv: destination charset %s", to);
		else
			fprintf(stderr, "iconv: source charset %s", from);
		perror("");
		exit(1);
	}
	if (optind == argc) argv[argc++] = "-";

	for (; optind < argc; optind++) {
		if (argv[optind][0]=='-' && !argv[optind][1]) {
			f = stdin;
			argv[optind] = "(stdin)";
		} else if (!(f = fopen(argv[optind], "rb"))) {
			fprintf(stderr, "iconv: %s", argv[optind]);
			perror("");
			err = 1;
			continue;
		}
		inb = 0;
		for (;;) {
			in = buf;
			out = outbuf;
			l = fread(buf+inb, 1, sizeof(buf)-inb, f);
			inb += l;
			if (!inb) break;
			if (iconv(cd, &in, &inb, &out, (size_t [1]){sizeof outbuf})==-1
			 && errno == EILSEQ) {
			 	if (!unitsize) {
			 		wchar_t wc='0';
			 		char dummy[4], *dummyp=dummy;
			 		iconv_t cd2 = iconv_open(from, "WCHAR_T");
			 		if (cd == (iconv_t)-1) {
			 			unitsize = 1;
			 		} else {
			 			iconv(cd2,
			 				(char *[1]){(char *)&wc},
			 				(size_t[1]){1},
			 				&dummyp, (size_t[1]){4});
			 			unitsize = dummyp-dummy;
			 			if (!unitsize) unitsize=1;
			 		}
			 	}
			 	inb-=unitsize;
			 	in+=unitsize;
			}
			if (inb && !l && errno==EINVAL) break;
			if (out>outbuf && !fwrite(outbuf, out-outbuf, 1, stdout)) {
				perror("iconv: write error");
				exit(1);
			}
			if (inb) memmove(buf, in, inb);
		}
		if (ferror(f)) {
			fprintf(stderr, "iconv: %s", argv[optind]);
			perror("");
			err = 1;
		}
	}
	return err;
}


code:
--- icu.org/source/common/putilimp.h
+++ icu/source/common/putilimp.h
@@ -116,7 +116,7 @@
 #elif U_PLATFORM == U_PF_ANDROID
 #   define U_TIMEZONE timezone
 #elif U_PLATFORM_IS_LINUX_BASED
-#   if !defined(__UCLIBC__)
+#   if defined(__GLIBC__) && !defined(__UCLIBC__)
     /* __timezone is only available in glibc */
 #       define U_TIMEZONE __timezone
 #   endif


code:
--- ifplugd-0.28/src/interface.c.orig	2007-01-31 12:15:37.000000000 -0800
+++ ifplugd-0.28/src/interface.c	2007-01-31 12:15:46.000000000 -0800
@@ -22,9 +22,9 @@
 #include <config.h>
 #endif

+#include <sys/types.h>
 #include <linux/sockios.h>
 #include <linux/if_ether.h>
-#include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <linux/if.h>


code:
# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# T2 SDE: package/.../ifplugd/no-init.patch
# Copyright (C) 2004 - 2005 The T2 SDE Project
# Copyright (C) 1998 - 2004 ROCK Linux Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- T2-COPYRIGHT-NOTE-END ---

--- ifplugd-0.22/conf/Makefile.in~	2004-02-10 00:23:14.000000000 +0100
+++ ifplugd-0.22/conf/Makefile.in	2004-03-21 05:52:48.017446880 +0100
@@ -294,8 +294,7 @@
 	sed -e 's,@sysconfdir\@,$(sysconfdir),g' -e 's,@sbindir\@,$(sbindir),g' $< > $@
 	chmod 755 $@

-install-data-local: ifplugd.init
-	$(INSTALL) -b -D -m755 ifplugd.init ${DESTDIR}${sysinitdir}/ifplugd
+install-data-local:
 	$(INSTALL) -b -D -m755 $(srcdir)/ifplugd.action ${DESTDIR}${sysconfdir}/ifplugd/ifplugd.action
 	$(INSTALL) -b -D -m644 $(srcdir)/ifplugd.conf ${DESTDIR}${sysconfdir}/ifplugd/ifplugd.conf


code:
diff -Naur ifplugd-0.28PREV/src/ethtool-local.h ifplugd-0.28/src/ethtool-local.h
--- ifplugd-0.28PREV/src/ethtool-local.h	2003-12-12 01:58:45.000000000 +0800
+++ ifplugd-0.28/src/ethtool-local.h	2016-05-09 00:07:18.000000000 +0800
@@ -22,9 +22,9 @@
  */

 typedef unsigned long long u64;
-typedef __uint32_t u32;
-typedef __uint16_t u16;
-typedef __uint8_t u8;
+typedef unsigned long u32;
+typedef unsigned short u16;
+typedef unsigned char u8;

 #include "ethtool-kernel.h"


code:
#!/bin/sh
/bin/busybox --install -s
mount -t proc proc /proc
mount -t sysfs sysfs /sys
mount -t devtmpfs devtmpfs /dev
mdev -s

fail_shell() {
  echo "$@"
  exec sh
}

waitdev() {
  local dev=$1
  for i in $(seq 20); do
    if echo "$dev" |grep -E -q '(UUID=|LABEL=)'; then
      tdev="$(findfs $dev)"
    fi
    if [ -b "$tdev" ]; then
      break
    fi
    if [ -b "$dev" ]; then
      break
    fi
    sleep 1
    mdev -s
  done
}

wait_btrfs() {
  [ -x /bin/btrfs ] || return 0
  local btrfs="$1"
  btrfs device scan
  if [ ! -z "$btrfs" ]; then
    waitdev $btrfs
    for i in $(seq 20); do
      if [ -b "$btrfs" ]; then
        break
      fi
      fs="$(findfs $btrfs)"
      if [ ! -z "$fs" ]; then
        btrfs="$fs"
      fi
      sleep 1
    done
    for i in $(seq 20); do
      if btrfs device ready $btrfs; then
        break
      fi
      sleep 1
    done
  fi
}

get_opt() {
  echo "$@" | sed -r 's,(^| )[^=]+=([^ ]+)( |$),\2,g'
}

init="/bin/init"
boot="/dev/sda1"
sqsh_root="/root.sqsh.img"
rw=""
keysdev=""
for i in $(cat /proc/cmdline); do
  case $i in
    boot\=*)
      boot=$(get_opt $i)
      ;;
    init\=*)
      init=$(get_opt $i)
      ;;
    sqsh_root\=*)
      sqsh_root=$(get_opt $i)
      ;;
    rw\=*)
      rw=$(get_opt $i)
      ;;
    keysdev\=*)
      keysdev=$(get_opt $i)
      ;;
    rescue)
      fail_shell
      ;;
  esac
done
waitdev $boot
fsck.fat -a -r "${boot}"
mount -o ro,umask=077 "${boot}" /boot

if [ -n "$keysdev" ]; then
  waitdev "UUID=$keysdev"
  mkdir -p /tmp/keys
  mount $(findfs UUID=$keysdev) /tmp/keys
  cd /tmp/keys/
  for i in *_LuksKey0; do
    local cruuid="$(echo $i |sed -r 's,_.+$,,g')"
    local crdev="$(findfs UUID=$cruuid)"
    if [ -n "$crdev" ]; then
      if ! cryptsetup luksOpen -q --key-file="${cruuid}_LuksKey0" -S 0 $crdev $cruuid; then
        for s in $(seq 1 7); do
          if cryptsetup luksOpen -q --key-file="${cruuid}_LuksKey$s" -S $s $crdev $cruuid; then
            break
          fi
        done
      fi
    fi
  done
  cd /
  umount /tmp/keys
fi

if [ -z "$rw" ]; then
  rw="LABEL=$(blkid $(findfs ${boot}) |sed -r 's,.*UUID="([^"]+)".*,\1,g')-rw"
fi

if [ ! -z "$(findfs $rw)" ]; then
  wait_btrfs "$rw"
  mount -o remount,rw /boot
  mkdir -p /bootstore /boot/store
  mount -o remount,ro /boot
  if ! mount -o subvol=sabotage/bootstore,autodefrag "$rw" /bootstore; then
    fail_shell "couldn't mount $rw to /bootstore"
  fi
  if ! mount -o loop -t squashfs "/bootstore/${sqsh_root}" /newroot; then
    fail_shell "couldn't mount /bootstore/${sqsh_root} to /newroot"
  fi
else
  if ! mount -o loop -t squashfs "/boot/${sqsh_root}" /newroot; then
    fail_shell "couldn't mount /boot/${sqsh_root} to /newroot"
  fi
fi
if ! fsck -A -T -C -p; then
  fail_shell "Fsck failed, fix the problem"
fi
if [ ! -z "$(findfs $rw)" ]; then
  mount -o subvol=sabotage/rw-overlay,autodefrag "$rw" /newroot/rw
fi
if [ -x "/newroot/${init}" ] ; then
  mount --move /boot /newroot/boot
  mount --move /bootstore /newroot/boot/store
  mount --move /dev /newroot/dev
  umount -f /sys /proc
  exec switch_root /newroot "${init}"
fi
fail_shell "Failed to switch_root, dropping to a shell"


code:
--- inkscape-0.48.4.org/src/widgets/desktop-widget.h	2014-09-09 18:38:44.066452389 +0200
+++ inkscape-0.48.4/src/widgets/desktop-widget.h	2014-09-09 18:39:29.328456389 +0200
@@ -239,7 +239,7 @@
 private:
     GtkWidget *tool_toolbox;
     GtkWidget *aux_toolbox;
-    GtkWidget *commands_toolbox,;
+    GtkWidget *commands_toolbox;
     GtkWidget *snap_toolbox;

     static void init(SPDesktopWidget *widget);


code:
--- iptables-1.4.12.1.o/extensions/libip6t_ipv6header.c
+++ iptables-1.4.12.1/extensions/libip6t_ipv6header.c
@@ -10,6 +10,9 @@
 #include <netdb.h>
 #include <xtables.h>
 #include <linux/netfilter_ipv6/ip6t_ipv6header.h>
+#ifndef IPPROTO_HOPOPTS
+#	define IPPROTO_HOPOPTS 0
+#endif

 enum {
 	O_HEADER = 0,
--- iptables-1.4.12.1.o/extensions/libxt_TCPOPTSTRIP.c
+++ iptables-1.4.12.1/extensions/libxt_TCPOPTSTRIP.c
@@ -12,6 +12,21 @@
 #ifndef TCPOPT_MD5SIG
 #	define TCPOPT_MD5SIG 19
 #endif
+#ifndef TCPOPT_MAXSEG
+#	define TCPOPT_MAXSEG 2
+#endif
+#ifndef TCPOPT_WINDOW
+#	define TCPOPT_WINDOW 3
+#endif
+#ifndef TCPOPT_SACK_PERMITTED
+#	define TCPOPT_SACK_PERMITTED 4
+#endif
+#ifndef TCPOPT_SACK
+#	define TCPOPT_SACK 5
+#endif
+#ifndef TCPOPT_TIMESTAMP
+#	define TCPOPT_TIMESTAMP 8
+#endif

 enum {
 	O_STRIP_OPTION = 0,
--- iptables-1.4.12.1.o/include/libiptc/ipt_kernel_headers.h
+++ iptables-1.4.12.1/include/libiptc/ipt_kernel_headers.h
@@ -5,7 +5,6 @@

 #include <limits.h>

-#if defined(__GLIBC__) && __GLIBC__ == 2
 #include <netinet/ip.h>
 #include <netinet/in.h>
 #include <netinet/ip_icmp.h>
@@ -13,15 +12,4 @@
 #include <netinet/udp.h>
 #include <net/if.h>
 #include <sys/types.h>
-#else /* libc5 */
-#include <sys/socket.h>
-#include <linux/ip.h>
-#include <linux/in.h>
-#include <linux/if.h>
-#include <linux/icmp.h>
-#include <linux/tcp.h>
-#include <linux/udp.h>
-#include <linux/types.h>
-#include <linux/in6.h>
-#endif
 #endif
--- iptables-1.4.12.1.o/include/linux/netfilter_ipv4/ip_tables.h
+++ iptables-1.4.12.1/include/linux/netfilter_ipv4/ip_tables.h
@@ -16,6 +16,7 @@
 #define _IPTABLES_H

 #include <linux/types.h>
+#include <sys/types.h>

 #include <linux/netfilter_ipv4.h>

--- iptables-1.4.12.1.o/iptables/ip6tables-restore.c
+++ iptables-1.4.12.1/iptables/ip6tables-restore.c
@@ -9,7 +9,7 @@
  */

 #include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
 #include <stdbool.h>
 #include <string.h>
 #include <stdio.h>
--- iptables-1.4.12.1.o/iptables/ip6tables-save.c
+++ iptables-1.4.12.1/iptables/ip6tables-save.c
@@ -6,7 +6,7 @@
  * This code is distributed under the terms of GNU GPL v2
  */
 #include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <stdlib.h>
--- iptables-1.4.12.1.o/iptables/iptables-restore.c
+++ iptables-1.4.12.1/iptables/iptables-restore.c
@@ -6,7 +6,7 @@
  */

 #include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
 #include <stdbool.h>
 #include <string.h>
 #include <stdio.h>
--- iptables-1.4.12.1.o/iptables/iptables-save.c
+++ iptables-1.4.12.1/iptables/iptables-save.c
@@ -6,7 +6,7 @@
  *
  */
 #include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <stdlib.h>
--- iptables-1.4.12.1.o/iptables/iptables-xml.c
+++ iptables-1.4.12.1/iptables/iptables-xml.c
@@ -7,7 +7,7 @@
  */

 #include <getopt.h>
-#include <sys/errno.h>
+#include <errno.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>


code:
--- iptables-1.4.14/include/net/netfilter/nf_conntrack_tuple.h
+++ iptables-1.4.14.patched/include/net/netfilter/nf_conntrack_tuple.h
@@ -15,7 +15,6 @@
 #define _NF_CONNTRACK_TUPLE_H

 #include <linux/netfilter/x_tables.h>
-#include <linux/netfilter/nf_conntrack_tuple_common.h>

 /* A `tuple' is a structure containing the information to uniquely
   identify a connection.  ie. if two packets have the same tuple, they


code:
--- iw-3.13/Makefile
+++ iw-3.13/Makefile
@@ -35,10 +35,13 @@
 NL2FOUND := $(shell $(PKG_CONFIG) --atleast-version=2 libnl-2.0 && echo Y)
 ifneq ($(NL2FOUND),Y)
 NL1FOUND := $(shell $(PKG_CONFIG) --atleast-version=1 libnl-1 && echo Y)
+ifneq ($(NL1FOUND),Y)
+NLTNYFOUND := $(shell $(PKG_CONFIG) --atleast-version=1 libnl-tiny && echo Y)
 endif
 endif
 endif
 endif
+endif

 ifeq ($(NL1FOUND),Y)
 NLLIBNAME = libnl-1
@@ -70,6 +73,11 @@
 CFLAGS += -DCONFIG_LIBNL30
 LIBS += -lnl-genl
 NLLIBNAME = libnl-3.1
+endif
+
+ifeq ($(NLTNYFOUND),Y)
+LIBS += -lnl-tiny
+NLLIBNAME = libnl-tiny
 endif

 ifeq ($(NLLIBNAME),)


code:
Submitted By: Matt Burgess
Date: 2008-12-06
Initial Package Version: 1.15
Upstream Status: Not submitted, possibly incomplete
Description: Makes Backspace and Delete keys consistent in all i386 keymaps.
Makes the Backspace key send character code 127, and Delete send a well known
escape sequence. Obsoletes the /etc/kbd/bs-sends-del file for i386.

Original patch for 1.12 by Alexander Patrakov.
Updated for 1.13 (drop ru.map, the change is upstream, and add ru_win.map,
ru-cp1251.map) by Ken Moffat <ken at linuxfromscratch dot org>.
Re-diffed against 1.15 by Matt Burgess <matthew at linuxfromscratch.org>.

diff -Naur kbd-1.15.orig/data/keymaps/i386/dvorak/dvorak-l.map kbd-1.15/data/keymaps/i386/dvorak/dvorak-l.map
--- kbd-1.15.orig/data/keymaps/i386/dvorak/dvorak-l.map	2008-06-20 12:36:01.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/dvorak/dvorak-l.map	2008-12-03 22:27:55.000000000 +0000
@@ -43,7 +43,7 @@
 		keycode  11 = three		numbersign
 		keycode  12 = two		at
 		keycode  13 = one		exclam
-		keycode  14 = BackSpace		Delete
+		keycode  14 = Delete		Delete
 ! --------------------------------------------------------------------------
 ! Row 3
 ! --------------------------------------------------------------------------
diff -Naur kbd-1.15.orig/data/keymaps/i386/dvorak/dvorak-r.map kbd-1.15/data/keymaps/i386/dvorak/dvorak-r.map
--- kbd-1.15.orig/data/keymaps/i386/dvorak/dvorak-r.map	2008-06-20 12:36:01.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/dvorak/dvorak-r.map	2008-12-03 22:28:13.000000000 +0000
@@ -43,7 +43,7 @@
 		keycode  11 = slash		question
 		keycode  12 = bracketleft	braceleft
 		keycode  13 = bracketright	braceright
-		keycode  14 = BackSpace		Delete
+		keycode  14 = Delete		Delete
 ! --------------------------------------------------------------------------
 ! Row 3
 ! --------------------------------------------------------------------------
diff -Naur kbd-1.15.orig/data/keymaps/i386/fgGIod/tr_f-latin5.map kbd-1.15/data/keymaps/i386/fgGIod/tr_f-latin5.map
--- kbd-1.15.orig/data/keymaps/i386/fgGIod/tr_f-latin5.map	2008-10-23 20:03:58.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/fgGIod/tr_f-latin5.map	2008-12-03 22:40:32.000000000 +0000
@@ -51,7 +51,7 @@
 	alt     keycode  12 = Meta_minus
 keycode  13 = minus            underscore
 	alt     keycode  13 = Meta_equal
-keycode  14 = BackSpace           Delete
+keycode  14 = Delete           Delete
 	alt     keycode  14 = Meta_Delete
 keycode  15 = Tab              Meta_Tab
 	alt     keycode  15 = Meta_Tab
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/lt.l4.map kbd-1.15/data/keymaps/i386/qwerty/lt.l4.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/lt.l4.map	2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/lt.l4.map	2008-12-03 22:42:14.000000000 +0000
@@ -205,7 +205,7 @@
 #	edit this if you want the key above <Enter> to delete symbols above
 # cursor, not before.
 keycode  14 = \
-	      BackSpace	       BackSpace	BackSpace	 BackSpace  \
+	      Delete	       Delete		Delete		 Delete	     \
 	      Delete	       Delete		Delete		 Delete	     \
 	      Meta_BackSpace   Meta_BackSpace	Meta_BackSpace Meta_BackSpace \
 	      Meta_Delete      Meta_Delete	Meta_Delete	 Meta_Delete
@@ -506,7 +506,7 @@

 # Edit this if you want strict VT100 emulation.
 string F111 = "\033[3$"
-keycode 111 = Delete	       F111		Delete		 F111	   \
+keycode 111 = Remove	       F111		Remove		 F111	   \
 	      Remove	       Remove		Remove		 Remove	    \
 	      Meta_Delete      Meta_Delete	Meta_Delete	 Meta_Delete \
 	      Boot	       Boot		Boot		 Boot
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/lt.map kbd-1.15/data/keymaps/i386/qwerty/lt.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/lt.map	2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/lt.map	2008-12-03 22:42:58.000000000 +0000
@@ -204,7 +204,7 @@
 #	edit this if you want the key above <Enter> to delete symbols above
 # cursor, not before.
 keycode  14 = \
-	      BackSpace	       BackSpace	BackSpace	 BackSpace  \
+	      Delete	       Delete		Delete		 Delete	     \
 	      Delete	       Delete		Delete		 Delete	     \
 	      Meta_BackSpace   Meta_BackSpace	Meta_BackSpace Meta_BackSpace \
 	      Meta_Delete      Meta_Delete	Meta_Delete	 Meta_Delete
@@ -505,7 +505,7 @@

 # Edit this if you want strict VT100 emulation.
 string F111 = "\033[3$"
-keycode 111 = Delete	       F111		Delete		 F111	   \
+keycode 111 = Remove	       F111		Remove		 F111	   \
 	      Remove	       Remove		Remove		 Remove	    \
 	      Meta_Delete      Meta_Delete	Meta_Delete	 Meta_Delete \
 	      Boot	       Boot		Boot		 Boot
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/no-latin1.map kbd-1.15/data/keymaps/i386/qwerty/no-latin1.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/no-latin1.map	2008-06-20 12:36:00.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/no-latin1.map	2008-12-03 22:44:25.000000000 +0000
@@ -3,7 +3,7 @@
 # Send comments to Kjetil T. Homme <kjetilho@ifi.uio.no>
 include "linux-with-alt-and-altgr"
 	plain keycode  83 = KP_Comma
-	plain keycode 111 = Delete		# "Remove" originally, weird...
+	plain keycode 111 = Remove
 strings as usual

 	keycode   1 = Escape
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ru1.map kbd-1.15/data/keymaps/i386/qwerty/ru1.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ru1.map	2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ru1.map	2008-12-03 22:45:32.000000000 +0000
@@ -143,8 +143,8 @@

 # The keycode "0xFF" is too dangerous for many programs (including emacs).
 # So let it be bracket instead of Hard Sign.
-# altgr		keycode  27 = 	+0xDF
-# altgr	shift 	keycode  27 = 	+0xFF
+altgr		keycode  27 = 	+0xDF
+altgr	shift 	keycode  27 = 	+0xFF
 	control	keycode  27 =	Control_bracketright
 altgr	control	keycode  27 =	Control_bracketright
 	alt	keycode  27 =	Meta_bracketright
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ru2.map kbd-1.15/data/keymaps/i386/qwerty/ru2.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ru2.map	2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ru2.map	2008-12-03 22:46:15.000000000 +0000
@@ -46,7 +46,7 @@
 	alt	keycode  12 =	Meta_minus
 		keycode  13 =	equal	plus		equal	plus
 	alt	keycode  13 =	Meta_equal
-		keycode  14 =	BackSpace BackSpace	BackSpace BackSpace
+		keycode  14 =	Delete Delete	Delete Delete
 	alt	keycode  14 =	Meta_Delete
 		keycode  15 =	Tab	Tab		Tab	Tab
 	alt	keycode  15 =	Meta_Tab
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ru-cp1251.map kbd-1.15/data/keymaps/i386/qwerty/ru-cp1251.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ru-cp1251.map	2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ru-cp1251.map	2008-12-03 22:47:12.000000000 +0000
@@ -39,7 +39,7 @@
 	alt	keycode  12 =	Meta_minus
 		keycode  13 =	equal	plus		equal	plus
 	alt	keycode  13 =	Meta_equal
-		keycode  14 =	BackSpace
+		keycode  14 =	Delete
 	alt	keycode  14 =	Meta_Delete
 		keycode  15 =	Tab
 	alt	keycode  15 =	Meta_Tab
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ru-ms.map kbd-1.15/data/keymaps/i386/qwerty/ru-ms.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ru-ms.map	2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ru-ms.map	2008-12-03 22:48:10.000000000 +0000
@@ -89,8 +89,8 @@
 altgr	alt     keycode  13 =    Meta_equal
 	shift alt keycode  13 = 	Meta_plus
 altgr	shift alt keycode  13 = 	Meta_plus
-		keycode  14 = 	BackSpace  BackSpace  BackSpace  BackSpace
-#		keycode  14 = 	Delete  Delete  Delete  Delete
+#		keycode  14 = 	BackSpace  BackSpace  BackSpace  BackSpace
+		keycode  14 = 	Delete  Delete  Delete  Delete
 	alt	keycode  14 =	Meta_Delete
 altgr	alt     keycode  14 = 	Meta_Delete
 		keycode  15 =	Tab	Tab		Tab	Tab
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ru_win.map kbd-1.15/data/keymaps/i386/qwerty/ru_win.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ru_win.map	2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ru_win.map	2008-12-03 22:49:17.000000000 +0000
@@ -42,7 +42,7 @@
 	alt	keycode  12 =	Meta_minus
 		keycode  13 =	equal	plus		equal	plus
 	alt	keycode  13 =	Meta_equal
-		keycode  14 =	BackSpace BackSpace	BackSpace BackSpace
+		keycode  14 =	Delete Delete	Delete Delete
 	alt	keycode  14 =	Meta_Delete
 		keycode  15 =	Tab	Tab		Tab	Tab
 	alt	keycode  15 =	Meta_Tab
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/se-ir209.map kbd-1.15/data/keymaps/i386/qwerty/se-ir209.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/se-ir209.map	2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/se-ir209.map	2008-12-03 22:50:18.000000000 +0000
@@ -345,7 +345,7 @@
 	keycode 109 = Next	Scroll_Forward
 	keycode 110 = Insert

-	keycode 111 = Delete		# "Remove" originally, weird...
+	keycode 111 = Remove
 control alt	keycode 111 = Boot
 control altgr	keycode 111 = Boot

diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/se-lat6.map kbd-1.15/data/keymaps/i386/qwerty/se-lat6.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/se-lat6.map	2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/se-lat6.map	2008-12-03 22:50:44.000000000 +0000
@@ -374,6 +374,6 @@
 	keycode 109 = Next	Scroll_Forward
 	keycode 110 = Insert

-	keycode 111 = Delete		# "Remove" originally, weird...
+	keycode 111 = Remove
 control alt	keycode 111 = Boot
 control altgr	keycode 111 = Boot
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/tr_q-latin5.map kbd-1.15/data/keymaps/i386/qwerty/tr_q-latin5.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/tr_q-latin5.map	2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/tr_q-latin5.map	2008-12-03 22:52:09.000000000 +0000
@@ -49,7 +49,7 @@
 	alt     keycode  12 = Meta_minus
 keycode  13 = minus            underscore
 	alt     keycode  13 = Meta_equal
-keycode  14 = BackSpace           Delete
+keycode  14 = Delete           Delete
 	alt     keycode  14 = Meta_Delete
 keycode  15 = Tab              Meta_Tab
 	alt     keycode  15 = Meta_Tab
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ua.map kbd-1.15/data/keymaps/i386/qwerty/ua.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ua.map	2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ua.map	2008-12-03 22:52:52.000000000 +0000
@@ -249,7 +249,7 @@
 	shift ctrll ctrlr keycode  13 = plus
 	alt ctrll ctrlr keycode  13 = Meta_equal
 	shift alt ctrll ctrlr keycode  13 = Meta_plus
-keycode  14 = BackSpace           Delete
+keycode  14 = Delete           Delete
 	control	keycode  14 = BackSpace
 	alt	keycode  14 = Meta_Delete
 	ctrlr	keycode  14 = BackSpace
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ua-utf.map kbd-1.15/data/keymaps/i386/qwerty/ua-utf.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ua-utf.map	2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ua-utf.map	2008-12-03 22:53:36.000000000 +0000
@@ -250,7 +250,7 @@
 	shift ctrll ctrlr keycode  13 = plus
 	alt ctrll ctrlr keycode  13 = Meta_equal
 	shift alt ctrll ctrlr keycode  13 = Meta_plus
-keycode  14 = BackSpace           Delete
+keycode  14 = Delete           Delete
 	control	keycode  14 = BackSpace
 	alt	keycode  14 = Meta_Delete
 	ctrlr	keycode  14 = BackSpace
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ua-utf-ws.map kbd-1.15/data/keymaps/i386/qwerty/ua-utf-ws.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ua-utf-ws.map	2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ua-utf-ws.map	2008-12-03 22:54:06.000000000 +0000
@@ -260,7 +260,7 @@
 	shift ctrll ctrlr keycode  13 = plus
 	alt ctrll ctrlr keycode  13 = Meta_equal
 	shift alt ctrll ctrlr keycode  13 = Meta_plus
-keycode  14 = BackSpace           Delete
+keycode  14 = Delete           Delete
 	control	keycode  14 = BackSpace
 	alt	keycode  14 = Meta_Delete
 	ctrlr	keycode  14 = BackSpace
diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ua-ws.map kbd-1.15/data/keymaps/i386/qwerty/ua-ws.map
--- kbd-1.15.orig/data/keymaps/i386/qwerty/ua-ws.map	2008-10-23 20:03:59.000000000 +0100
+++ kbd-1.15/data/keymaps/i386/qwerty/ua-ws.map	2008-12-03 22:54:23.000000000 +0000
@@ -260,7 +260,7 @@
 	shift ctrll ctrlr keycode  13 = plus
 	alt ctrll ctrlr keycode  13 = Meta_equal
 	shift alt ctrll ctrlr keycode  13 = Meta_plus
-keycode  14 = BackSpace           Delete
+keycode  14 = Delete           Delete
 	control	keycode  14 = BackSpace
 	alt	keycode  14 = Meta_Delete
 	ctrlr	keycode  14 = BackSpace


code:
loadkeys -b's purpose is to dump a binary keymap
for usage with busybox on stdout, however it
stupidly prints other stuff as well, rendering
the binary kmap worthless. it can be fixed by
adding -q, however this should be implicitly
enabled by -b.

--- kbd-1.15.3.org/src/loadkeys.y
+++ kbd-1.15.3/src/loadkeys.y
@@ -1086,9 +1070,6 @@
 		case 'a':
 			opta = 1;
 			break;
-		case 'b':
-			optb = 1;
-			break;
 		case 'c':
 			nocompose = 1;
 			break;
@@ -1107,6 +1088,9 @@
 		case 'u':
 			optu = 1;
 			break;
+		case 'b':
+			optb = 1;
+			/* FALLTHRU */
 		case 'q':
 			quiet = 1;
 			break;


code:
Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
Date: 2012-05-01
Initial Package Version: 1.15.3
Upstream Status: Applied
Origin: Upstream, commit:83f0743c1fed872d80a0dd31924575d9bf9c2770
Description:

loadkeys from 1.15.3 introduced a regression where it doesn’t default to
reading from stdin when started without a filename argument.

---
 src/loadkeys.y |   33 +++++++++++++++++++++------------
 1 files changed, 21 insertions(+), 12 deletions(-)

Index: devel/src/loadkeys.y
===================================================================
--- devel.orig/src/loadkeys.y	2011-07-22 19:06:52.000000000 +0200
+++ devel/src/loadkeys.y	2011-07-22 19:07:10.000000000 +0200
@@ -1035,6 +1035,22 @@
 		;
 %%

+static void parse_keymap(FILE *fd) {
+	if (!quiet && !optm)
+		fprintf(stdout, _("Loading %s\n"), pathname);
+
+	stack_push(fd, 0, pathname);
+
+	if (yyparse()) {
+		fprintf(stderr, _("syntax error in map file\n"));
+
+		if (!optm)
+			fprintf(stderr,
+				_("key bindings not changed\n"));
+		exit(EXIT_FAILURE);
+	}
+}
+
 int main(int argc, char *argv[])
 {
 	const char *short_opts = "abcC:dhmsuqvV";
@@ -1180,19 +1196,12 @@
 		}

  gotf:
-		if (!quiet && !optm)
-			fprintf(stdout, _("Loading %s\n"), pathname);
-
-		stack_push(f, 0, pathname);
-
-		if (yyparse()) {
-			fprintf(stderr, _("syntax error in map file\n"));
+		parse_keymap(f);
+	}

-			if (!optm)
-				fprintf(stderr,
-					_("key bindings not changed\n"));
-			exit(EXIT_FAILURE);
-		}
+	if (optind == argc) {
+		strcpy(pathname, "<stdin>");
+		parse_keymap(stdin);
 	}

 	do_constant();


code:
--- kbd-1.15.3/src/dumpkeys.c	2011-04-26 20:29:35.000000000 +0000
+++ kbd-1.15.3.patched/src/dumpkeys.c	2012-11-02 20:55:42.405000003 +0000
@@ -107,7 +107,7 @@
 }

 static int
-get_bind(u_char kb_index, u_char kb_table) {
+get_bind(unsigned char kb_index, unsigned char kb_table) {
 	struct kbentry ke;

 	ke.kb_index = kb_index;
@@ -169,7 +169,7 @@
 	return status;
 }

-static u_char
+static unsigned char
 maximum_val(int t) {
 	struct kbentry ke, ke0;
 	int i;
@@ -440,7 +440,7 @@
 			 (val >= 'a' && val <= 'z')));
 	    isasexpected = 0;
 	    if (isletter) {
-		u_short defs[16];
+		unsigned short defs[16];
 		defs[0] = K(KT_LETTER, val);
 		defs[1] = K(KT_LETTER, val ^ 32);
 		defs[2] = defs[0];
diff -ur kbd-1.15.3/src/kbdinfo.c kbd-1.15.3.patched/src/kbdinfo.c
--- kbd-1.15.3/src/kbdinfo.c	2011-04-26 20:29:35.000000000 +0000
+++ kbd-1.15.3.patched/src/kbdinfo.c	2012-11-02 21:22:31.081000003 +0000
@@ -1,6 +1,5 @@
 #include <stdio.h>
 #include <errno.h>
-#include <error.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
 #include <linux/kd.h>
@@ -8,10 +7,12 @@
 #include "getfd.h"
 #include "nls.h"
 #include "version.h"
+#include "error.c"

 static const char *action = NULL;
 static const char *value  = NULL;

+
 static void attr_noreturn
 usage(int code) {
 	fprintf(stderr,
diff -ur kbd-1.15.3/src/kbdrate.c kbd-1.15.3.patched/src/kbdrate.c
--- kbd-1.15.3/src/kbdrate.c	2011-03-05 14:41:20.000000000 +0000
+++ kbd-1.15.3.patched/src/kbdrate.c	2012-11-02 20:57:25.869000003 +0000
@@ -74,6 +74,7 @@
 #include <errno.h>
 #include <sys/file.h>
 #include <sys/ioctl.h>
+#include <fcntl.h>

 #ifdef __sparc__
 #include <asm/param.h>
diff -ur kbd-1.15.3/src/loadkeys.c kbd-1.15.3.patched/src/loadkeys.c
--- kbd-1.15.3/src/loadkeys.c	2011-05-01 23:22:35.000000000 +0000
+++ kbd-1.15.3.patched/src/loadkeys.c	2012-11-02 20:55:48.743000003 +0000
@@ -114,7 +114,7 @@
 int alt_is_meta = 0;

 /* the kernel structures we want to set or print */
-u_short *key_map[MAX_NR_KEYMAPS];
+unsigned short *key_map[MAX_NR_KEYMAPS];
 char *func_table[MAX_NR_FUNC];

 accent_entry accent_table[MAX_DIACR];
@@ -255,7 +255,7 @@

 	if (!key_map[k_table]) {
 		key_map[k_table] =
-		    (u_short *) xmalloc(NR_KEYS * sizeof(u_short));
+		    (unsigned short *) xmalloc(NR_KEYS * sizeof(unsigned short));
 		for (i = 0; i < NR_KEYS; i++)
 			(key_map[k_table])[i] = K_HOLE;
 	}
@@ -566,7 +566,7 @@
 	return kd.kb_cnt;
 }

-static void do_constant_key(int i, u_short key)
+static void do_constant_key(int i, unsigned short key)
 {
 	int typ, val, j;

@@ -575,7 +575,7 @@

 	if ((typ == KT_LATIN || typ == KT_LETTER) &&
 	    ((val >= 'a' && val <= 'z') || (val >= 'A' && val <= 'Z'))) {
-		u_short defs[16];
+		unsigned short defs[16];
 		defs[0] = K(KT_LETTER, val);
 		defs[1] = K(KT_LETTER, val ^ 32);
 		defs[2] = defs[0];
@@ -620,7 +620,7 @@

 	for (i = 0; i < NR_KEYS; i++) {
 		if (key_is_constant[i]) {
-			u_short key;
+			unsigned short key;

 			if (!key_map[r0])
 				lkfatal(_("impossible error in do_constant"));
@@ -800,7 +800,7 @@
 			keymap_count++;
 			if (i)
 				printf("static ");
-			printf("u_short %s_map[NR_KEYS] = {", mk_mapname(i));
+			printf("unsigned short %s_map[NR_KEYS] = {", mk_mapname(i));
 			for (j = 0; j < NR_KEYS; j++) {
 				if (!(j % 8))
 					printf("\n");
@@ -904,7 +904,7 @@
 {
 	int i, j;

-	//u_char *p;
+	//unsigned char *p;
 	char flag, magic[] = "bkeymap";
 	unsigned short v;

diff -ur kbd-1.15.3/src/loadkeys.y kbd-1.15.3.patched/src/loadkeys.y
--- kbd-1.15.3/src/loadkeys.y	2011-05-01 23:19:11.000000000 +0000
+++ kbd-1.15.3.patched/src/loadkeys.y	2012-11-02 20:55:42.410000003 +0000
@@ -55,7 +55,7 @@
 int alt_is_meta = 0;

 /* the kernel structures we want to set or print */
-u_short *key_map[MAX_NR_KEYMAPS];
+unsigned short *key_map[MAX_NR_KEYMAPS];
 char *func_table[MAX_NR_FUNC];

 accent_entry accent_table[MAX_DIACR];
@@ -196,7 +196,7 @@

 	if (!key_map[k_table]) {
 		key_map[k_table] =
-		    (u_short *) xmalloc(NR_KEYS * sizeof(u_short));
+		    (unsigned short *) xmalloc(NR_KEYS * sizeof(unsigned short));
 		for (i = 0; i < NR_KEYS; i++)
 			(key_map[k_table])[i] = K_HOLE;
 	}
@@ -507,7 +507,7 @@
 	return kd.kb_cnt;
 }

-static void do_constant_key(int i, u_short key)
+static void do_constant_key(int i, unsigned short key)
 {
 	int typ, val, j;

@@ -516,7 +516,7 @@

 	if ((typ == KT_LATIN || typ == KT_LETTER) &&
 	    ((val >= 'a' && val <= 'z') || (val >= 'A' && val <= 'Z'))) {
-		u_short defs[16];
+		unsigned short defs[16];
 		defs[0] = K(KT_LETTER, val);
 		defs[1] = K(KT_LETTER, val ^ 32);
 		defs[2] = defs[0];
@@ -561,7 +561,7 @@

 	for (i = 0; i < NR_KEYS; i++) {
 		if (key_is_constant[i]) {
-			u_short key;
+			unsigned short key;

 			if (!key_map[r0])
 				lkfatal(_("impossible error in do_constant"));
@@ -741,7 +741,7 @@
 			keymap_count++;
 			if (i)
 				printf("static ");
-			printf("u_short %s_map[NR_KEYS] = {", mk_mapname(i));
+			printf("unsigned short %s_map[NR_KEYS] = {", mk_mapname(i));
 			for (j = 0; j < NR_KEYS; j++) {
 				if (!(j % 8))
 					printf("\n");
@@ -845,7 +845,7 @@
 {
 	int i, j;

-	//u_char *p;
+	//unsigned char *p;
 	char flag, magic[] = "bkeymap";
 	unsigned short v;

diff -ur kbd-1.15.3/src/openvt.c kbd-1.15.3.patched/src/openvt.c
--- kbd-1.15.3/src/openvt.c	2011-05-01 23:27:13.000000000 +0000
+++ kbd-1.15.3.patched/src/openvt.c	2012-11-02 20:59:45.516000002 +0000
@@ -10,7 +10,7 @@
 #include <sys/vt.h>
 #include <sys/wait.h>
 #include <sys/file.h>
-
+#include <fcntl.h>
 #include "version.h"
 #include "xmalloc.h"
 #include "getfd.h"
diff -ur kbd-1.15.3/src/setvtrgb.c kbd-1.15.3.patched/src/setvtrgb.c
--- kbd-1.15.3/src/setvtrgb.c	2011-04-26 20:29:35.000000000 +0000
+++ kbd-1.15.3.patched/src/setvtrgb.c	2012-11-02 21:22:50.566000002 +0000
@@ -5,7 +5,7 @@
 #include <sys/ioctl.h>
 #include <linux/kd.h>
 #include <errno.h>
-#include <error.h>
+#include "error.c"
 #include "kbd.h"
 #include "getfd.h"
 #include "nls.h"
--- /dev/null	2012-10-16 17:31:41.304000002 +0000
+++ kbd-1.15.3.patched/src/error.c	2012-11-02 21:22:07.812000002 +0000
@@ -0,0 +1,24 @@
+#include <stdio.h>
+#include <stdarg.h>
+
+static void error(int status, int errnum, const char *fmt, ...) {
+	fflush(stdout);
+	char dest[4096];
+	va_list ap;
+	va_start(ap, fmt);
+	ssize_t result = vsnprintf(dest, sizeof(dest), fmt, ap);
+	va_end(ap);
+	dprintf(2, "program_name: %s", dest);
+	if(errnum) {
+		dprintf(2, ": ");
+		perror(fmt);
+		exit (status);
+	} else {
+		dprintf(2, "\n");
+	}
+}
+
+
+
+
+