Subject: bug#19378: closed (Re: bug#19377: bug#19378: [PATCH 3/4] cat, chcon, chgrp, chmod, chown, cp, du, head: support wildcards on OS/2)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 18 Dec 2014 15:26:04 +0000

Your bug report

#19377: [PATCH 3/4] cat, chcon, chgrp, chmod, chown, cp, du, head: support wildcards on OS/2

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
19377: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19377
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#19377: bug#19378: [PATCH 3/4] cat, chcon, chgrp, chmod, chown, cp, du, head: support wildcards on OS/2
From: Jim Meyering <[email-masked]>
To: KO Myung-Hun <[email-masked]>
Cc: [email-masked], Paul Eggert <[email-masked]>,Pádraig Brady <[email-masked]>
Date: Thu, 18 Dec 2014 07:24:47 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

On Mon, Dec 15, 2014 at 9:11 PM, KO Myung-Hun <[email-masked]> wrote:
> Jim Meyering wrote:
>> On Mon, Dec 15, 2014 at 8:35 PM, KO Myung-Hun <[email-masked]> wrote:
>>> Paul Eggert wrote:
>>>> KO Myung-Hun wrote:
>>>>>   /* Redirection and wildcarding when done by the utility itself.
>>>>>      Generally a noop, but used in particular for native VMS. */
>>>>>   #ifndef initialize_main
>>>>> -# define initialize_main(ac, av)
>>>>> +# ifndef __OS2__
>>>>> +#  define initialize_main(ac, av)
>>>>> +# else
>>>>
>>>> What happened to VMS?  The comment doesn't seem to match the code, and
>>>
>>> I don't know of VMS. Do you mean to change comments for OS/2 ?
>>>
>>>> this suggests that the code should be moved to wherever VMS does its thing.
>>>
>>> Where is it ? I didn't find initialize_main() or others for VMS.
>>
>> It was never defined in any version-controlled file,
>> so please just update the comment, replacing VMS with OS/2.
>
> Ok. Fixed.

Thanks.
Pushed with minor grammar fixes in the commit log.

Subject: [PATCH 3/4] cat, chcon, chgrp, chmod, chown, cp, du, head: support wildcards on OS/2
From: KO Myung-Hun <[email-masked]>
To: [email-masked]
Date: Sun, 14 Dec 2014 12:47:40 +0900
List-Id: <debbugs-submit.debbugs.gnu.org>

And ln,ls,mv,rm,tail.

* src/cat.c (main): Expand wildcards on OS/2.
* src/chcon.c (main): Likewise.
* src/chgrp.c (main): Likewise.
* src/chmod.c (main): Likewise.
* src/chown.c (main): Likewise.
* src/cp.c (main): Likewise.
* src/du.c (main): Likewise.
* src/head.c (main): Likewise.
* src/ln.c (main): Likewise.
* src/ls.c (main): Likewise.
* src/mv.c (main): Likewise.
* src/rm.c (main): Likewise.
* src/tail.c (main): Likewise.

Patches from coreutils 8.8 by Paul Smedley.
---
 src/cat.c   | 4 ++++
 src/chcon.c | 4 ++++
 src/chgrp.c | 4 ++++
 src/chmod.c | 4 ++++
 src/chown.c | 4 ++++
 src/cp.c    | 4 ++++
 src/du.c    | 4 ++++
 src/head.c  | 4 ++++
 src/ln.c    | 4 ++++
 src/ls.c    | 4 ++++
 src/mv.c    | 4 ++++
 src/rm.c    | 4 ++++
 src/tail.c  | 4 ++++
 13 files changed, 52 insertions(+)

diff --git a/src/cat.c b/src/cat.c
index c7bb7e1..0138114 100644
--- a/src/cat.c
+++ b/src/cat.c
@@ -544,6 +544,10 @@ main (int argc, char **argv)
   bool show_tabs = false;
   int file_open_mode = O_RDONLY;
 
+#ifdef __OS2__
+  _wildcard (&argc, &argv);
+#endif
+
   static struct option const long_options[] =
   {
     {"number-nonblank", no_argument, NULL, 'b'},
diff --git a/src/chcon.c b/src/chcon.c
index 675c2b1..bfe87ac 100644
--- a/src/chcon.c
+++ b/src/chcon.c
@@ -422,6 +422,10 @@ main (int argc, char **argv)
   char *reference_file = NULL;
   int optc;
 
+#ifdef __OS2__
+  _wildcard (&argc, &argv);
+#endif
+
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
   setlocale (LC_ALL, "");
diff --git a/src/chgrp.c b/src/chgrp.c
index cec51db..711cf92 100644
--- a/src/chgrp.c
+++ b/src/chgrp.c
@@ -184,6 +184,10 @@ main (int argc, char **argv)
   bool ok;
   int optc;
 
+#ifdef __OS2__
+  _wildcard (&argc, &argv);
+#endif
+
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
   setlocale (LC_ALL, "");
diff --git a/src/chmod.c b/src/chmod.c
index 6ad8767..02048c7 100644
--- a/src/chmod.c
+++ b/src/chmod.c
@@ -422,6 +422,10 @@ main (int argc, char **argv)
   char const *reference_file = NULL;
   int c;
 
+#ifdef __OS2__
+  _wildcard (&argc, &argv);
+#endif
+
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
   setlocale (LC_ALL, "");
diff --git a/src/chown.c b/src/chown.c
index e3f931d..ed8d35b 100644
--- a/src/chown.c
+++ b/src/chown.c
@@ -176,6 +176,10 @@ main (int argc, char **argv)
   bool ok;
   int optc;
 
+#ifdef __OS2__
+  _wildcard (&argc, &argv);
+#endif
+
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
   setlocale (LC_ALL, "");
diff --git a/src/cp.c b/src/cp.c
index 791a744..5b141db 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -928,6 +928,10 @@ main (int argc, char **argv)
   bool no_target_directory = false;
   char const *scontext = NULL;
 
+#ifdef __OS2__
+  _wildcard (&argc, &argv);
+#endif
+
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
   setlocale (LC_ALL, "");
diff --git a/src/du.c b/src/du.c
index f5726c7..d1807d8 100644
--- a/src/du.c
+++ b/src/du.c
@@ -728,6 +728,10 @@ main (int argc, char **argv)
   cwd_only[0] = bad_cast (".");
   cwd_only[1] = NULL;
 
+#ifdef __OS2__
+  _wildcard (&argc, &argv);
+#endif
+
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
   setlocale (LC_ALL, "");
diff --git a/src/head.c b/src/head.c
index 2782f8e..64f26ea 100644
--- a/src/head.c
+++ b/src/head.c
@@ -949,6 +949,10 @@ main (int argc, char **argv)
   static char const *const default_file_list[] = {"-", NULL};
   char const *const *file_list;
 
+#ifdef __OS2__
+  _wildcard (&argc, &argv);
+#endif
+
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
   setlocale (LC_ALL, "");
diff --git a/src/ln.c b/src/ln.c
index ce812cc..a8ed947 100644
--- a/src/ln.c
+++ b/src/ln.c
@@ -470,6 +470,10 @@ main (int argc, char **argv)
   int n_files;
   char **file;
 
+#ifdef __OS2__
+  _wildcard (&argc, &argv);
+#endif
+
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
   setlocale (LC_ALL, "");
diff --git a/src/ls.c b/src/ls.c
index 5bae06f..f909735 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -1247,6 +1247,10 @@ main (int argc, char **argv)
   struct pending *thispend;
   int n_files;
 
+#ifdef __OS2__
+  _wildcard (&argc, &argv);
+#endif
+
   /* The signals that are trapped, and the number of such signals.  */
   static int const sig[] =
     {
diff --git a/src/mv.c b/src/mv.c
index 2eacb2c..f79a6f8 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -356,6 +356,10 @@ main (int argc, char **argv)
   char **file;
   bool selinux_enabled = (0 < is_selinux_enabled ());
 
+#ifdef __OS2__
+  _wildcard (&argc, &argv);
+#endif
+
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
   setlocale (LC_ALL, "");
diff --git a/src/rm.c b/src/rm.c
index 4c8ee6e..e76a817 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -210,6 +210,10 @@ main (int argc, char **argv)
   bool prompt_once = false;
   int c;
 
+#ifdef __OS2__
+  _wildcard (&argc, &argv);
+#endif
+
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
   setlocale (LC_ALL, "");
diff --git a/src/tail.c b/src/tail.c
index 4c5f943..134e4df 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -2150,6 +2150,10 @@ main (int argc, char **argv)
      see if it has changed.  */
   double sleep_interval = 1.0;
 
+#ifdef __OS2__
+  _wildcard (&argc, &argv);
+#endif
+
   initialize_main (&argc, &argv);
   set_program_name (argv[0]);
   setlocale (LC_ALL, "");
-- 
1.8.5.2