Blame SOURCES/libgpg-error-1.29-multilib.patch

af0758
diff -up libgpg-error-1.29/configure.ac.multilib libgpg-error-1.29/configure.ac
af0758
--- libgpg-error-1.29/configure.ac.multilib	2018-04-11 14:41:10.479019981 +0200
af0758
+++ libgpg-error-1.29/configure.ac	2018-04-11 14:43:31.288394113 +0200
af0758
@@ -215,13 +215,13 @@ GNUPG_FUNC_MKDIR_TAKES_ONE_ARG
af0758
 
af0758
 
af0758
 # Find a 64 bit integer type to be used instead of off_t.  We prefer
af0758
-# the standard integer types over int64_t and finally try long long.
af0758
-if test "$ac_cv_sizeof_int" = "8"; then
af0758
+# int64_t and finally try long long.
af0758
+if test "$ac_cv_header_stdint_h" = yes; then
af0758
+   replacement_for_off_t="int64_t"
af0758
+elif test "$ac_cv_sizeof_int" = "8"; then
af0758
    replacement_for_off_t="int"
af0758
 elif test "$ac_cv_sizeof_long" = "8"; then
af0758
    replacement_for_off_t="long"
af0758
-elif test "$ac_cv_header_stdint_h" = yes; then
af0758
-   replacement_for_off_t="int64_t"
af0758
 elif test "$ac_cv_sizeof_long_long" = "8"; then
af0758
    replacement_for_off_t="long long"
af0758
 else
af0758
diff -up libgpg-error-1.29/configure.multilib libgpg-error-1.29/configure
af0758
--- libgpg-error-1.29/configure.multilib	2018-04-11 09:34:30.000000000 +0200
af0758
+++ libgpg-error-1.29/configure	2018-04-11 14:41:10.481020028 +0200
af0758
@@ -11301,7 +11301,7 @@ shlibpath_var=
af0758
 shlibpath_overrides_runpath=unknown
af0758
 version_type=none
af0758
 dynamic_linker="$host_os ld.so"
af0758
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
af0758
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib64 /usr/lib64"
af0758
 need_lib_prefix=unknown
af0758
 hardcode_into_libs=no
af0758
 
af0758
@@ -11775,7 +11775,7 @@ fi
af0758
   # Append ld.so.conf contents to the search path
af0758
   if test -f /etc/ld.so.conf; then
af0758
     lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
af0758
-    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
af0758
+    sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib64 /usr/lib64 $lt_ld_extra"
af0758
   fi
af0758
 
af0758
   # We used to test for /lib/ld.so.1 and disable shared libraries on
af0758
@@ -15879,12 +15879,12 @@ fi
af0758
 
af0758
 # Find a 64 bit integer type to be used instead of off_t.  We prefer
af0758
 # the standard integer types over int64_t and finally try long long.
af0758
-if test "$ac_cv_sizeof_int" = "8"; then
af0758
+if test "$ac_cv_header_stdint_h" = yes; then
af0758
+   replacement_for_off_t="int64_t"
af0758
+elif test "$ac_cv_sizeof_int" = "8"; then
af0758
    replacement_for_off_t="int"
af0758
 elif test "$ac_cv_sizeof_long" = "8"; then
af0758
    replacement_for_off_t="long"
af0758
-elif test "$ac_cv_header_stdint_h" = yes; then
af0758
-   replacement_for_off_t="int64_t"
af0758
 elif test "$ac_cv_sizeof_long_long" = "8"; then
af0758
    replacement_for_off_t="long long"
af0758
 else
af0758
diff -up libgpg-error-1.29/src/gen-posix-lock-obj.c.multilib libgpg-error-1.29/src/gen-posix-lock-obj.c
af0758
--- libgpg-error-1.29/src/gen-posix-lock-obj.c.multilib	2016-11-16 13:22:03.000000000 +0100
af0758
+++ libgpg-error-1.29/src/gen-posix-lock-obj.c	2018-04-11 14:41:10.481020028 +0200
af0758
@@ -72,6 +72,7 @@ main (void)
af0758
 #ifdef USE_POSIX_THREADS
af0758
   unsigned char *p;
af0758
   int i;
af0758
+  int initidx = 0;
af0758
 #endif
af0758
   struct {
af0758
     long vers;
af0758
@@ -111,11 +112,12 @@ main (void)
af0758
 
af0758
   /* To force a probably suitable alignment of the structure we use a
af0758
      union and include a long and a pointer to a long.  */
af0758
-  printf ("typedef struct\n"
af0758
+  printf ("#include <pthread.h>\n"
af0758
+          "typedef struct\n"
af0758
           "{\n"
af0758
           "  long _vers;\n"
af0758
           "  union {\n"
af0758
-          "    volatile char _priv[%d];\n"
af0758
+          "    volatile char _priv[sizeof(pthread_mutex_t)];\n"
af0758
           "%s"
af0758
           "    long _x_align;\n"
af0758
           "    long *_xp_align;\n"
af0758
@@ -123,7 +125,6 @@ main (void)
af0758
           "} gpgrt_lock_t;\n"
af0758
           "\n"
af0758
           "#define GPGRT_LOCK_INITIALIZER {%d,{{",
af0758
-          SIZEOF_PTHREAD_MUTEX_T,
af0758
 # if USE_16BYTE_ALIGNMENT
af0758
           "    int _x16_align __attribute__ ((aligned (16)));\n",
af0758
 # elif USE_DOUBLE_FOR_ALIGNMENT
af0758
@@ -137,10 +138,16 @@ main (void)
af0758
   p = (unsigned char *)&mt;;
af0758
   for (i=0; i < sizeof mtx; i++)
af0758
     {
af0758
+      if (p[i] != 0)
af0758
+        initidx = i;
af0758
+    }
af0758
+
af0758
+  for (i=0; i <= initidx; i++)
af0758
+    {
af0758
       if (i && !(i % 8))
af0758
         printf (" \\\n%*s", 36, "");
af0758
       printf ("%u", p[i]);
af0758
-      if (i < sizeof mtx - 1)
af0758
+      if (i < initidx)
af0758
         putchar (',');
af0758
     }
af0758
   fputs ("}}}\n", stdout);
af0758
diff -up libgpg-error-1.29/src/gpg-error.h.in.multilib libgpg-error-1.29/src/gpg-error.h.in
af0758
--- libgpg-error-1.29/src/gpg-error.h.in.multilib	2018-04-11 14:41:10.481020028 +0200
af0758
+++ libgpg-error-1.29/src/gpg-error.h.in	2018-04-11 14:45:28.184203566 +0200
af0758
@@ -17,7 +17,7 @@
af0758
  * License along with this program; if not, see <https://www.gnu.org/licenses/>.
af0758
  * SPDX-License-Identifier: LGPL-2.1+
af0758
  *
af0758
- * @configure_input@
af0758
+ * Do not edit.  Generated from gpg-error.h.in.
af0758
  */
af0758
 
af0758
 /* The GnuPG project consists of many components.  Error codes are