]> cygwin.com Git - cygwin-apps/cygutils.git/commitdiff
Remove realpath in deference to coreutils(>=8.15) implementation
authorCharles Wilson <cygwin@cwilson.fastmail.fm>
Sun, 5 Feb 2012 20:50:18 +0000 (20:50 +0000)
committerCharles Wilson <cygwin@cwilson.fastmail.fm>
Sun, 5 Feb 2012 20:50:18 +0000 (20:50 +0000)
ChangeLog
Makefile.am
NEWS
PROGLIST
README
src/realpath/realpath.c [deleted file]

index 4147a3c3fb53d690329bf0917ebf0b9346e1d446..027a038b0d5733b97802ea49ba38866941e974b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-02-05  Charles Wilson  <cwilson@...>
+
+       Remove realpath in deference to coreutils(>=8.15) implementation.
+       * Makefile.am: Remove mentions of realpath.
+       * PROGLIST: Ditto.
+       * README: Ditto.
+       * NEWS: Update.
+       * src/realpath/realpath.c: Remove.
+
 2011-10-30  Yaakov Selkowitz  <yselkowitz@users.sourceforge.net>
 
        Remove ascii in deference to new (external) package.
index b018e48c219941ede0c00a9f4b45e4251881ceae..f62e32f4217ff9742085abfebd9339f219baedb7 100644 (file)
@@ -33,7 +33,7 @@ endif
 
 bin_PROGRAMS = $(windows_progs) src/conv/conv \
        src/dump/dump $(ipc_progs) \
-       src/realpath/realpath $(cygwin_specific_progs)
+       $(cygwin_specific_progs)
 
 bin_SCRIPTS = $(ipc_scripts)
 
@@ -121,7 +121,6 @@ src_dump_dump_LDADD                 = -lpopt
 src_lpr_lpr_LDADD                   = -lwinspool
 src_mkshortcut_mkshortcut_LDADD     = -lpopt -lole32 /usr/lib/w32api/libuuid.a
 src_readshortcut_readshortcut_LDADD = -lpopt -lole32 /usr/lib/w32api/libuuid.a
-src_realpath_realpath_LDADD         = -lpopt
 
 src_lpr_lpr_SOURCES = \
        src/lpr/Printer.cc    src/lpr/Win32Utils.cc \
diff --git a/NEWS b/NEWS
index 47f6eeac54087a5afe9d04f0ffc703f11dc9268b..2221a6234592b39fe9bead3940e5cf68327225b2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@
     (Yaakov Selkowitz)
   * Remove ascii utility; replaced by separate package derived
     from ESR's implementation http://catb.org/~esr/ascii/
+  * Remove realpath utility; replaced by new implementation
+    provided by coreutils (8.15 and above).
 
 1.4.6
   * conv: no longer distribute as dos2unix, unix2dos, u2d, or d2u.
index 51dfb67e014f06d048d6cf3f23285b5b594be12e..e50510e99c2d873b489a5ccb6e8b7f9e82d5efde 100644 (file)
--- a/PROGLIST
+++ b/PROGLIST
@@ -55,14 +55,6 @@ banner.exe
   prints a large banner to stdout.  From Joerg Schaible.
   (GPLv3+)
   
-realpath.exe
-  Convert pathname argument to absolute path, with all 
-  references to `.', `..', and symlinks resolved. Note
-  that modern coreutils provide 'readlink' with a 
-  canonicalize mode (-f/-e/-m) that operates substantially
-  similar to realpath.
-  (GPLv3+)
-
 lpr.exe
   can be used to spool to a windows printer
   (GPLv3+)
diff --git a/README b/README
index e87d9fc84c831ff1957ee31d258f0cba89896d41..25bd83fd2c8f6bf78221916ac2e489dfff7fadfb 100644 (file)
--- a/README
+++ b/README
@@ -48,7 +48,7 @@ What's in this package:
 -------------------------------
 GPLv3+:
  banner     cygdrop       cygicons.dll   cygstart    dump
- lpr        mkshortcut    readshortcut   realpath
+ lpr        mkshortcut    readshortcut
 
  Clipboard:
  putclip   getclip
diff --git a/src/realpath/realpath.c b/src/realpath/realpath.c
deleted file mode 100644 (file)
index 1931fc6..0000000
+++ /dev/null
@@ -1,231 +0,0 @@
-/* realpath - return the canonicalized absolute pathname
- * Copyright (C) 2001 Steven Barker
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- * See the COPYING file for full license information.
- */
-
-/* Modified 2002-01-26 Charles Wilson:
- *   -- use popt for option handling
- *   -- remove gettext dependency
- */
-
-#if HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "common.h"
-
-#if defined(_WIN32) && !defined(__CYGWIN__)
-#define        realpath(a,b)           _fullpath(b,a,MAX_PATH)
-#endif /* _WIN32 && !__CYGWIN__ */
-
-/* The official name of this program (e.g., no `g' prefix).  */
-#define PROGRAM_NAME "realpath"
-#define AUTHORS "Steven Barker"
-
-static const char versionID[] = PACKAGE_VERSION;
-static const char revID[] =
-  "$Id$";
-static const char copyrightID[] =
-  "Copyright (c) 2001,...\nSteven Barker. All rights reserved.\nLicensed under GPL v2.0\n";
-
-/* The name this program was run with. */
-static char *program_name;
-static poptContext optCon;
-
-static void printTopDescription (FILE * f, char *name);
-static void printBottomDescription (FILE * f, char *name);
-static const char *getVersion (void);
-static void usage (FILE * f, char *name);
-static void help (FILE * f, char *name);
-static void version (FILE * f, char *name);
-static void license (FILE * f, char *name);
-
-int
-main (int argc, const char **argv)
-{
-  const char **rest;
-  int rc;
-  int ec = 0;
-  char *input;
-  char *result;
-
-  struct poptOption helpOptionsTable[] = {
-    {"help", '?', POPT_ARG_NONE, NULL, '?',
-     "Show this help message", NULL},
-    {"usage", '\0', POPT_ARG_NONE, NULL, 'u',
-     "Display brief usage message", NULL},
-    {"version", '\0', POPT_ARG_NONE, NULL, 'v',
-     "Display version information", NULL},
-    {"license", '\0', POPT_ARG_NONE, NULL, 'l',
-     "Display licensing information", NULL},
-    {NULL, '\0', 0, NULL, 0, NULL, NULL}
-  };
-
-  struct poptOption opt[] = {
-    {NULL, '\0', POPT_ARG_INCLUDE_TABLE, helpOptionsTable, 0,
-     "Help options", NULL},
-    {NULL, '\0', 0, NULL, 0, NULL, NULL}
-  };
-
-  if ((program_name = strdup (argv[0])) == NULL)
-    {
-      fprintf (stderr, "%s: memory allocation error\n", argv[0]);
-      exit (1);
-    }
-  if ((result = malloc (PATH_MAX)) == NULL)
-    {
-      fprintf (stderr, "%s: memory allocation error\n", program_name);
-      free (program_name);
-      exit (1);
-    }
-
-  optCon = poptGetContext (NULL, argc, argv, opt, 0);
-  poptSetOtherOptionHelp (optCon, "[OPTIONS...] PATH");
-
-  while ((rc = poptGetNextOpt (optCon)) > 0)
-    {
-      switch (rc)
-        {
-        case '?':
-          help (stdout, program_name);
-          goto exit;
-        case 'u':
-          usage (stdout, program_name);
-          goto exit;
-        case 'v':
-          version (stdout, program_name);
-          goto exit;
-        case 'l':
-          license (stdout, program_name);
-          goto exit;
-        }
-    }
-  if (rc < -1)
-    {
-      fprintf (stderr, "%s: bad argument %s: %s\n",
-               program_name, poptBadOption (optCon, POPT_BADOPTION_NOALIAS),
-               poptStrerror (rc));
-      ec = 2;
-      goto exit;
-    }
-  rest = poptGetArgs (optCon);
-
-  if (rest == NULL)
-    {
-      fprintf (stderr, "%s: not enough arguments\n", program_name);
-      usage (stderr, program_name);
-    }
-  else
-    {
-      if ((input = strdup (*rest++)) == NULL)
-        {
-          fprintf (stderr, "%s: memory allocation error\n", program_name);
-          ec = 1;
-          goto exit;
-        }
-      if (*rest != NULL)
-        {                       /* should only have ONE member of **rest  */
-          fprintf (stderr, "%s: too many arguments\n", program_name);
-          usage (stderr, program_name);
-          free (input);
-        }
-      else
-        {
-          if (!realpath (input, result))
-            {
-              ec = errno;
-              perror (program_name);
-              free (input);
-              goto exit;
-            }
-          printf ("%s\n", result);
-          free (input);
-        }
-    }
-
-exit:
-  poptFreeContext (optCon);
-  free (program_name);
-  free (result);
-  return (ec);
-}
-
-static const char *
-getVersion ()
-{
-  return versionID;
-}
-
-static void
-printTopDescription (FILE * f, char *name)
-{
-  fprintf (f, "%s is part of cygutils version %s\n", name, getVersion ());
-  fprintf (f, "%s was originally authored by %s\n", name, AUTHORS);
-  fprintf (f,
-           "  Print PATH with all references to `.', `..', and symlinks resolved.\n\n");
-}
-static void
-printBottomDescription (FILE * f, char *name)
-{
-/* fprintf(f, "\n");
- * fprintf(f, "Report bugs to <bug-sh-utils@gnu.org>.\n");
- */
-}
-
-static
-printLicense (FILE * f, char *name)
-{
-  fprintf (f,
-           "This program is free software: you can redistribute it and/or modify\n"
-           "it under the terms of the GNU General Public License as published by\n"
-           "the Free Software Foundation, either version 3 of the License, or\n"
-           "(at your option) any later version.\n\n"
-           "This program is distributed in the hope that it will be useful,\n"
-           "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
-           "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
-           "GNU General Public License for more details.\n\n"
-           "You should have received a copy of the GNU General Public License\n"
-           "along with this program.  If not, see <http://www.gnu.org/licenses/>.\n\n"
-           "See the COPYING file for full license information.\n");
-}
-
-static void
-usage (FILE * f, char *name)
-{
-  poptPrintUsage (optCon, f, 0);
-}
-
-static void
-help (FILE * f, char *name)
-{
-  printTopDescription (f, name);
-  poptPrintHelp (optCon, f, 0);
-  printBottomDescription (f, name);
-}
-
-static void
-version (FILE * f, char *name)
-{
-  printTopDescription (f, name);
-}
-
-static void
-license (FILE * f, char *name)
-{
-  printTopDescription (f, name);
-  printLicense (f, name);
-}
This page took 0.036755 seconds and 5 git commands to generate.