[git] GPG-ERROR - branch, master, updated. libgpg-error-1.18-5-g4441e96

by Werner Koch cvs at cvs.gnupg.org
Fri Mar 6 10:39:01 CET 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Error codes used by GnuPG et al.".

The branch, master has been updated
       via  4441e96801fdc4c900abae8c0aa0b53e2e26e079 (commit)
       via  0f814d4c4a285573eef2391c70e21cf8126cafcb (commit)
      from  b400d7c65daaf44f227073ddde7d06986afde786 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4441e96801fdc4c900abae8c0aa0b53e2e26e079
Author: Werner Koch <wk at gnupg.org>
Date:   Fri Mar 6 09:53:49 2015 +0100

    Add host-triplet aliasing feature to mkheader.
    
    * src/Makefile.am (lock_obj_pub): Rename i586-pc-linux-gnu to
    i686-pc-linux-gnu.  Remove i486-pc-linux-gnu.
    * src/mkheader.c (canon_host_triplet): New.
    (main): Use it.
    --
    
    config.sub does not map i{4,5,6}86-pc-linux-gnu to one common triplet.
    However, they all use the same ABI and thus we do not need several
    versions of the syscfg files.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/README b/README
index d0a1d47..be7b7dc 100644
--- a/README
+++ b/README
@@ -116,7 +116,9 @@ need to figure out these values.  You may use these commands:
 If you are using a VPATH build adjust accordingly.  If this all works
 for you (make sure to run the test programs on the target platform),
 please send the generated file to the gnupg-devel mailing list so that
-we can include it in the next release.
+we can include it in the next release.  Note that in addition to the
+aliasing done by config.sub the src/mkheader build tool does some
+extra aliasing to avoid having too much identical syscfg files.
 
 
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 18a4cb7..99c2c53 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -51,8 +51,7 @@ lock_obj_pub = \
         syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h        \
         syscfg/lock-obj-pub.i486-pc-gnu.h                   \
         syscfg/lock-obj-pub.i486-pc-kfreebsd-gnu.h          \
-        syscfg/lock-obj-pub.i486-pc-linux-gnu.h             \
-        syscfg/lock-obj-pub.i586-pc-linux-gnu.h             \
+        syscfg/lock-obj-pub.i686-pc-linux-gnu.h             \
         syscfg/lock-obj-pub.m68k-unknown-linux-gnu.h        \
         syscfg/lock-obj-pub.mips-unknown-linux-gnu.h        \
         syscfg/lock-obj-pub.mips64el-unknown-linux-gnuabi64.h \
diff --git a/src/mkheader.c b/src/mkheader.c
index 9fe0695..3481771 100644
--- a/src/mkheader.c
+++ b/src/mkheader.c
@@ -23,7 +23,7 @@
 #define LINESIZE 1024
 
 static const char *host_os;
-static const char *host_triplet;
+static char *host_triplet;
 static char *srcdir;
 static const char *hdr_version;
 static const char *hdr_version_number;
@@ -63,6 +63,40 @@ xstrdup (const char *string)
 }
 
 
+/* Return a malloced string with TRIPLET.  If TRIPLET has an alias
+   return that instead.  In general build-aux/config.sub should do the
+   aliasing but some returned triplets are anyway identical and thus we
+   use this function to map it to the canonical form.  */
+static char *
+canon_host_triplet (const char *triplet)
+{
+  struct {
+    const char *name;
+    const char *alias;
+  } tbl[] = {
+    {"i486-pc-linux-gnu", "i686-pc-linux-gnu" },
+    {"i586-pc-linux-gnu" },
+
+    { NULL }
+  };
+  int i;
+  const char *lastalias = NULL;
+
+  for (i=0; tbl[i].name; i++)
+    {
+      if (tbl[i].alias)
+        lastalias = tbl[i].alias;
+      if (!strcmp (tbl[i].name, triplet))
+        {
+          if (!lastalias)
+            break; /* Ooops: first entry has no alias.  */
+          return xstrdup (lastalias);
+        }
+    }
+  return xstrdup (triplet);
+}
+
+
 /* Parse the supplied config.h file and extract required info.
    Returns 0 on success.  */
 static int
@@ -481,6 +515,7 @@ main (int argc, char **argv)
   const char *fname, *s;
   char *p1, *p2;
   const char *config_h;
+  const char *host_triplet_raw;
 
   if (argc)
     {
@@ -496,12 +531,14 @@ main (int argc, char **argv)
       return 1;
     }
   host_os = argv[0];
-  host_triplet = argv[1];
+  host_triplet_raw = argv[1];
   fname = argv[2];
   config_h = argv[3];
   hdr_version = argv[4];
   hdr_version_number = argv[5];
 
+  host_triplet = canon_host_triplet (host_triplet_raw);
+
   srcdir = malloc (strlen (fname) + 2 + 1);
   if (!srcdir)
     {
@@ -554,8 +591,12 @@ main (int argc, char **argv)
       if (!strcmp (p1, "configure_input"))
         {
           s = strrchr (fname, '/');
-          printf ("Do not edit.  Generated from %s for %s.",
-                  s? s+1 : fname, host_triplet);
+          printf ("Do not edit.  Generated from %s for:\n%*s",
+                  s? s+1 : fname, (int)(p1 - line) + 13, "");
+          if (!strcmp (host_triplet, host_triplet_raw))
+            printf ("%s", host_triplet);
+          else
+            printf ("%s (%s)", host_triplet, host_triplet_raw);
           fputs (p2, stdout);
         }
       else if (!write_special (fname, lnr, p1))
@@ -593,5 +634,6 @@ main (int argc, char **argv)
 
   fclose (fp);
 
+  xfree (host_triplet);
   return 0;
 }
diff --git a/src/syscfg/lock-obj-pub.i586-pc-linux-gnu.h b/src/syscfg/lock-obj-pub.i686-pc-linux-gnu.h
similarity index 92%
rename from src/syscfg/lock-obj-pub.i586-pc-linux-gnu.h
rename to src/syscfg/lock-obj-pub.i686-pc-linux-gnu.h
index fc2d132..b97273b 100644
--- a/src/syscfg/lock-obj-pub.i586-pc-linux-gnu.h
+++ b/src/syscfg/lock-obj-pub.i686-pc-linux-gnu.h
@@ -1,4 +1,4 @@
-## lock-obj-pub.i586-pc-linux-gnu.h
+## lock-obj-pub.i686-pc-linux-gnu.h
 ## File created by gen-posix-lock-obj - DO NOT EDIT
 ## To be included by mkheader into gpg-error.h
 

commit 0f814d4c4a285573eef2391c70e21cf8126cafcb
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Feb 3 19:17:36 2015 +0100

    w32: Add a manifest to libgpg-error.
    
    * src/gpg-error.w32-manifest.in: New.
    * src/Makefile.am (EXTRA_DIST): Add it.
    (versioninfo.lo): Depend on it.
    * src/versioninfo.rc.in: Add it.
    * configure.ac (AC_CONFIG_FILES): Add it.
    (BUILD_VERSION): New.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/configure.ac b/configure.ac
index 0f9b194..dc3fb05 100644
--- a/configure.ac
+++ b/configure.ac
@@ -486,12 +486,13 @@ AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION",
                    [GIT commit id revision used to build this package])
 
 changequote(,)dnl
-BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
+BUILD_VERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./'`
 changequote([,])dnl
-BUILD_FILEVERSION="${BUILD_FILEVERSION}0,mym4_revision_dec"
+BUILD_VERSION="${BUILD_VERSION}0.mym4_revision_dec"
+BUILD_FILEVERSION=`echo "${BUILD_VERSION}" | tr . ,`
+AC_SUBST(BUILD_VERSION)
 AC_SUBST(BUILD_FILEVERSION)
 
-
 AC_ARG_ENABLE([build-timestamp],
               AC_HELP_STRING([--enable-build-timestamp],
                 [set an explicit build timestamp for reproducibility.
@@ -526,7 +527,7 @@ AC_CONFIG_FILES([Makefile])
 AC_CONFIG_FILES([doc/Makefile po/Makefile.in m4/Makefile])
 AC_CONFIG_FILES([src/Makefile tests/Makefile])
 AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpg-error.asd])
-AC_CONFIG_FILES([src/versioninfo.rc])
+AC_CONFIG_FILES([src/versioninfo.rc src/gpg-error.w32-manifest])
 AC_CONFIG_FILES([src/gpg-error-config], [chmod +x src/gpg-error-config])
 
 AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index 403f5d2..18a4cb7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -82,7 +82,8 @@ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
 	mkerrcodes.awk mkerrcodes1.awk mkerrcodes2.awk mkerrcodes.c \
 	mkheader.c gpg-error.h.in mkw32errmap.c w32-add.h w32ce-add.h \
 	err-sources.h err-codes.h gpg-error-config.in gpg-error.m4 \
-	gpg-error.vers gpg-error.def.in versioninfo.rc.in \
+	gpg-error.vers gpg-error.def.in \
+        versioninfo.rc.in gpg-error.w32-manifest.in \
 	$(lock_obj_pub)
 
 BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
@@ -120,6 +121,7 @@ export_symbols = -export-symbols gpg-error.def
 # no need to use this DLL.  Thus we force gcc to link that statically.
 extra_ltoptions = -XCClinker -static-libgcc
 
+versioninfo.lo : gpg-error.w32-manifest
 
 install-def-file: gpg-error.def
 	-$(INSTALL) -d $(DESTDIR)$(libdir)
diff --git a/src/gpg-error.w32-manifest.in b/src/gpg-error.w32-manifest.in
new file mode 100644
index 0000000..07f6891
--- /dev/null
+++ b/src/gpg-error.w32-manifest.in
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<description>Error codes and shared functions for GnuPG and others</description>
+<assemblyIdentity
+    type="win32"
+    name="GnuPG.libgpg-error"
+    version="@BUILD_VERSION@"
+    />
+<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+  <application>
+    <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/><!-- Vista -->
+    <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/><!-- 7 -->
+    <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/><!-- 8 -->
+    <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/><!-- 8.1 -->
+  </application>
+</compatibility>
+</assembly>
diff --git a/src/versioninfo.rc.in b/src/versioninfo.rc.in
index bcf5893..8a053a9 100644
--- a/src/versioninfo.rc.in
+++ b/src/versioninfo.rc.in
@@ -50,3 +50,4 @@ BEGIN
     END
 END
 
+1 RT_MANIFEST "gpg-error.w32-manifest"

-----------------------------------------------------------------------

Summary of changes:
 README                                             |  4 +-
 configure.ac                                       |  9 ++--
 src/Makefile.am                                    |  7 +--
 src/gpg-error.w32-manifest.in                      | 17 ++++++++
 src/mkheader.c                                     | 50 ++++++++++++++++++++--
 ...inux-gnu.h => lock-obj-pub.i686-pc-linux-gnu.h} |  2 +-
 src/versioninfo.rc.in                              |  1 +
 7 files changed, 77 insertions(+), 13 deletions(-)
 create mode 100644 src/gpg-error.w32-manifest.in
 rename src/syscfg/{lock-obj-pub.i586-pc-linux-gnu.h => lock-obj-pub.i686-pc-linux-gnu.h} (92%)


hooks/post-receive
-- 
Error codes used by GnuPG et al.
http://git.gnupg.org




More information about the Gnupg-commits mailing list