]> cygwin.com Git - cygwin-apps/cygutils.git/commitdiff
version 1.4.15 v1_4_15
authorMark Geisert <mark@maxrnd.com>
Tue, 3 Nov 2015 10:37:50 +0000 (02:37 -0800)
committerMark Geisert <mark@maxrnd.com>
Sat, 7 Nov 2015 09:53:27 +0000 (01:53 -0800)
BRANCHES
ChangeLog
NEWS
configure.ac
src/cygdrop/cygdrop.cc
src/lpr/Printer.cc
src/mkshortcut/mkshortcut.c

index c36f39f7174820738fc2d342f16aa7c5f79b1c0f..3f1d62972198719db59dfd80ff07b7cf7a007391 100644 (file)
--- a/BRANCHES
+++ b/BRANCHES
@@ -100,3 +100,5 @@ v1_4_12
 v1_4_13 (devel)
    |
 v1_4_14
+   |
+v1_4_15
index 2c57ead109d3bbf3600d00ffc42f5b280dcda8b3..620dec0bda22a043547076857dff914e81e36363 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,20 @@
+2015-11-03  Mark Geisert  <mark@maxrnd.com>
+
+       Release 1.4.15
+       * configure.ac: Bump version number to 1.4.15.
+       * BRANCHES: Ditto.
+       * src/cygdrop/cygdrop.cc (match_priv): strcmpi() -> strcasecmp().
+       * src/lpr/Printer.cc (::mapPortName): stricmp() -> strcasecmp().
+       * src/mkshortcut/mkshortcut.cc: Don't free() adjusted pointer.
+       Also handle changed Windows behavior when saving link to relative
+       path; evident after Windows 7.  Reporter Anthony Heading refers to
+       https://msdn.microsoft.com/en-us/
+       library/windows/desktop/hh848036%28v=vs.85%29.aspx
+
 2013-07-28  Charles Wilson  <cwilson@...>
 
        Release 1.4.14
-       * configure.ac: Bump version number to 1.4.12.
+       * configure.ac: Bump version number to 1.4.14.
        Update to latest autoconf/automake.
        * BRANCHES: Ditto.
 
diff --git a/NEWS b/NEWS
index 88144a19924a8480ba7ecbe2a51ffbfd2cc88496..917ec11a9603a52cfe5af7ca26c43079e81ab825 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,14 @@
+1.4.15
+  New maintainer Mark Geisert <mark@maxrnd.com>.
+  Source code master converted from CVS to Git, still hosted at sourceware.
+  * cygdrop: Replace strcmpi() calls with strcasecmp().
+  * lpr: Replace stricmp() calls with strcasecmp().
+  * mkshortcut: Fix seg fault due to freeing adjusted pointer.  Patch from
+  reporter Anthony Heading.
+  * mkshortcut: Handle changed Windows behavior when saving a link to a
+  relative path; change evident after Windows 7.  Patch from reporter
+  Anthony Heading.
+
 1.4.14
   * cygdrop: Fix bug in obtaining security token information
   Patch from Corinna Vinschen, reported by Achim Gratz.
index 9e703b23b28f765d8b4e38215164e305f26259f9..2b6d1cdf7a85dc1ccc48e321f81e79159ae8cd90 100644 (file)
@@ -1,6 +1,6 @@
 # Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.69)
-AC_INIT(cygutils, 1.4.14, cygwin@cygwin.com)
+AC_INIT(cygutils, 1.4.15, cygwin@cygwin.com)
 AC_CONFIG_SRCDIR([config.h.in])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
index b71a13841ba53b3846bd856afbe61dc99ded010c..35bcc19f5fb9f69b9e4dbef5c66ee2c3e1ab90dc 100644 (file)
@@ -171,11 +171,11 @@ match_strsid (const char * strsid, const char * pattern)
 static bool
 match_priv (const char * priv, const char * pattern)
 {
-  if (!strcmpi (priv, pattern))
+  if (!strcasecmp (priv, pattern))
     return true;
   char buf[strlen (pattern) + 16];
   sprintf (buf, "Se%sPrivilege", pattern);
-  return !strcmpi (priv, buf);
+  return !strcasecmp (priv, buf);
 }
 
 /* use long options for standard options, for
index 2dd0b8b63fa0a5c39e0fab503d9ad897534edd07..98dab60a27ac3a91bf5f01a0a2fecb7ad738dd5f 100644 (file)
@@ -225,7 +225,7 @@ void Printer::mapPortName() throw(PrinterException)
       PrinterList list = enumPrinters(PRINTER_ENUM_NAME, empty);
       for (PrinterList::iterator it = list.begin(); it != list.end(); ++it)
         {
-          if (stricmp(m_devName.c_str(), it->pPortName) == 0)
+          if (strcasecmp(m_devName.c_str(), it->pPortName) == 0)
             {
               if (m_debugFlag)
                 cout << "Mapped '" << m_devName << "' to '" << it->pPrinterName
@@ -241,7 +241,7 @@ void Printer::mapPortName() throw(PrinterException)
       PrinterList list = enumPrinters(PRINTER_ENUM_LOCAL, 0);
       for (PrinterList::iterator it = list.begin(); it != list.end(); ++it)
         {
-          if (stricmp(m_devName.c_str(), it->pPortName) == 0)
+          if (strcasecmp(m_devName.c_str(), it->pPortName) == 0)
             {
               if (m_debugFlag)
                 cout << "Mapped '" << m_devName << "' to '" << it->pPrinterName
@@ -254,7 +254,7 @@ void Printer::mapPortName() throw(PrinterException)
       list = enumPrinters(PRINTER_ENUM_CONNECTIONS, 0);
       for (PrinterList::iterator it = list.begin(); it != list.end(); ++it)
         {
-          if (stricmp(m_devName.c_str(), it->pPortName) == 0)
+          if (strcasecmp(m_devName.c_str(), it->pPortName) == 0)
             {
               if (m_debugFlag)
                 cout << "Mapped '" << m_devName << "' to '" << it->pPrinterName
index ebb7a31509c3898d8f2f16f7768102900451c8c3..6707eb43e3d0a4c96c7bca60ca379af338396862 100644 (file)
@@ -412,7 +412,7 @@ mkshortcut (optvals opts)
   char* exe_name = NULL;
   char* dir_name = NULL;
   char* desc = NULL;
-  char *buf_str, *tmp_str;
+  char *buf_str, *tmp_str, *base_str;
   int tmp;
 
   /* For OLE interface */
@@ -421,6 +421,7 @@ mkshortcut (optvals opts)
   IShellLink *shell_link;
   IPersistFile *persist_file;
   WCHAR widepath[MAX_PATH];
+  char link_path[MAX_PATH];
 
   /*  If there's a colon in the TARGET, it should be a URL */
   if (strchr (opts.target_arg, ':') != NULL)
@@ -489,6 +490,7 @@ mkshortcut (optvals opts)
     {
       /*  Strip trailing /'s if any */
       buf_str = xstrndup (opts.target_arg, strlen(opts.target_arg));
+      base_str = buf_str;
       tmp_str = buf_str;
       tmp = strlen (buf_str) - 1;
       while (strrchr (buf_str, '/') == (buf_str + tmp))
@@ -504,7 +506,7 @@ mkshortcut (optvals opts)
           buf_str++;
         }
       link_name = xstrndup (tmp_str, strlen (tmp_str));
-      free (buf_str);
+      free (base_str);
     }
   /*  User specified a name, so check it and convert  */
   else
@@ -596,6 +598,16 @@ mkshortcut (optvals opts)
       free (buf_str);
     }
 
+  /* After Windows 7, saving link to relative path fails; work around that */
+  hres = GetFullPathName (link_name, sizeof (link_path), link_path, 0);
+  if (hres == 0)
+    {
+      fprintf (stderr, "%s: Could not qualify link name\n", program_name);
+      return 2;
+    }
+  free (link_name);
+  link_name = xstrndup (link_path, strlen (link_path));
+
   /* Setup description text */
   if (opts.desc_arg != NULL)
     {
This page took 0.042391 seconds and 5 git commands to generate.