<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel about="http://blog.gmane.org/gmane.comp.gnu.core-utils.bugs">
    <title>gmane.comp.gnu.core-utils.bugs</title>
    <link>http://blog.gmane.org/gmane.comp.gnu.core-utils.bugs</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15247"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15236"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15233"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15230"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15228"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15227"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15223"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15210"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15208"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15205"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15204"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15201"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15200"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15198"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15194"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15190"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15188"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15187"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15182"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15179"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15247">
    <title>(no subject)</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15247</link>
    <description>&lt; at &gt;menu
* Overview::                    Overview
* Hardware::                    POD, Pins, Power
* Driver::                      The Driver
* Library::                     A Library for Applications

* Testing::                     Is BDM working

* GDB::                         Building and using GDB

* Server::                      BDM Server

&lt; at &gt;c Following blank line required for remaining bug in makeinfo conds/menus

* Reporting Bugs::              Reporting Bugs
* Index::                       Index
&lt; at &gt;end menu
&lt; at &gt;end ifinfo

&lt; at &gt;c ---------------------------------------
&lt; at &gt;node Overview, Build System, Top, Top
&lt; at &gt;chapter Overview

&lt; at &gt;cindex what is this?

Welcome to Background Debug Mode (BDM) support for GDB. BDM is emulator
or debugger support in a range of Motorola processors. This package
deals with the CPU32, and Coldfire family of processors. PowerPC
processors are not supported by this package. 

CPU32 processors were the first processors to appear with BDM
support. The Coldfire family's BDM module is similar to the CPU32 family
of processors. The CPU32 has the BDM module integrated into the
processor core. The Coldfire is more modular. The debug module is
separate to the core.

BDM is not JTAG debugging although a serial bug is used. JTAG is a
standard and operates differently to BDM. BDM uses high level commands
to control the device. You do not need to clock in and out a loop of
registers.

BDM is accessed on the procesor via a three wire serial bus. The signals
are a clock, data in and data out. Various other support signals
exists. This are used to place the processor into BDM, break the
prcessor, or monitor the status of a running processor.

The CPU32 standard BDM connector is not the same as the Coldfire
connector. You need separate plug on modules for each processor
family. Check the POD you use matches the processors voltage and clock
speed. This is import for Coldfire users.

Coldfire BDM has support for realtime trace. This package does not
support realtime trace.

Coldfire BDM can operate in a limited manner while the processor is
running. The BDM module being separate from the procesor core allows
this feature.

History

Gunta Magna contributes here is a bit of history of how GDB and BDM
came to light due to mutual support.

Somewhere in 1994/1995 Gunta Magna wrote (with the help of Michael
Schraut, at that time a student at lpr.e-technik.tu-muenchen) a first
version of the m68k Linux BDM device driver. This driver heavily based
on the work of Scott Howard (scott\&lt; at &gt;objsw.com), who wrote BD32, a DOS
tool to access 683xx controllers via BDM. He made the driver available
in source form, so I could use them.  Scott is currently maintainer of
the crossgcc mailing list (http://www.objsw.com/CrossGCC/).

Additionally Gunta Magna wrote a BDM backend for gdb-4.13. (Note: Eric
credits M.Schraut falsly as the author of the GDB patches in the header
files. This went through until Chris Johns's version for Coldfire).

The driver was only for BDM interfaces compatilble to AN1230, aka as PD
interfaces. Scott supported also the ICD compatible interface, but due to
lack of equipment at that time Gunta Magna did not include that.

Eric Norum used those sources to port it to NextStep. He did not like
my way of interfacing driver and application, and designed a new
interface. He also introduced an abstraction layer, enabling other
applications than gdb to take advantage of the BDM driver. He also added
support for 68360, which is different in detail from the 68332 version
(MBAR support).

In 1996, Gunta Magna upgraded his driver to ICD by a compile time
option, and fixed some errors. He also upgraded the gdb backend to
gdb-4.16, introducing Eric's idea of the abstraction layer. Sources for
that can be found at the ftp server of lpr.e-technik.tu-muechen.de

In 1997 Eric went Linux and ported his NextStep driver to Linux. He
also wrote/ported his NextStep gdb backend, incorporating some of the
ideas (and bugs) introduced in Gunta's 4.16-version. He also published a
schematic stemming from the Motorola customer center here in Munich
(bd32new) (See below).

In 1997 I upgraded my driver to simultaneously support ICD and PD
interfaces. The selection is made by accessing different minor numbers.
This version has been handed out to several testers (including Chris
Johns), but has never been officially released.

Chris Johns used Eric's driver and added Coldfire support.

&lt; at &gt;c ---------------------------------------
&lt; at &gt;node Build System, Layout, Overview, Top
&lt; at &gt;chapter POD, Pins, Power

&lt; at &gt;cindex hardware

Various means exist to access a BDM port on a processor. This driver
provides support for various host operating system, and adapator boards.

The driver support the IDC hardware. A circuit abd PAL equations are
provided in the package.

The Coldfire support is via the P&amp;E standard interface. You can find
information about these adaptor from the P&amp;E web site.

&lt;more on CPU32 hardware&gt;

Coldfire

The Coldfire has a 26pin header. The expanded connector is for the
realtime trace. These signals are the PST or processor status
signals. Four of these signals provide provide the status of the
processor in realtime. 

The 5206 and 5206e processor share the PST signals with the parallel
port on Coldfire. Anr application that uses the Coldfire's parallel
port, cannot relying on the PST for the realtime status of the
processor. The P&amp;E module provides a processor halted signal to the PC's
parallel port based on the PST signals. The P&amp;E Windows driver and DLL
use this signal. Using this software with the P&amp;E interface and a 5206
variant of Coldfire requires the parallel port to left for the PST
signals. The PST signals on the 5307 processor are not shared. They are
free to be used for debugging.

This driver does not require the use of the PST signals. The parallel
port on the 5206 processor can be used as a parallel port.

The 5206 and 5206e differ in Vcc voltage. The 5206 is a 5.0V processor
while the 5206e is a 3.3V processor. You need to check your POD can
handle your processors voltage. The 5206e can operate at 54MHz. The 5307
operate at 70MHz. The processor clock is carried up the BDM cable to the
POD. You need to insure the PLD on the POD is fast enough and the cable
from the target to the POD is not too long. If the cable is too long or
the PLD marginal the processor clock could be dragged out of shape
causing various problems which can be hard to find.

Various people have reported problems when using the driver with 5307
processors. Building the driver with the Makefile define &lt; at &gt;code{USE_PST}
causes the problem to go away. The error is 

&lt; at &gt;c ---------------------------------------
&lt; at &gt;node Build System, Layout, Overview, Top
&lt; at &gt;chapter The Driver

&lt; at &gt;cindex driver

Various means exist to access a BDM port on a processor. This driver
provides support for various host operating system, and adapator boards.

The code which accesses the pod is 

The driver supports different host operating systems.

&lt; at &gt;c ---------------------------------------
&lt; at &gt;node Layout, Configurations, Build System, Top
&lt; at &gt;chapter A Library for Applications

&lt; at &gt;cindex Library

The library provides an interface to the driver for user
applications. GDB currently requires this library to build. Future
release may have the library moved into the GDB patch allowing the BDM
code reside in the GDB source tree.

The library also contains the client code for talking to the BDM server.


&lt; at &gt;c ---------------------------------------
&lt; at &gt;node Layout, Configurations, Build System, Top
&lt; at &gt;chapter Testing

&lt; at &gt;cindex Testing

The driver should be tested with the `chk' program. It provides a
reasonable test of the software, driver and hardware path to the target.

&lt; at &gt;c ---------------------------------------
&lt; at &gt;node Layout, Configurations, Build System, Top
&lt; at &gt;chapter GDB

&lt; at &gt;cindex GDB

This section covers building GDB and contains some info about using GDB
with BDM.

&lt; at &gt;c ---------------------------------------
&lt; at &gt;node Layout, Configurations, Build System, Top
&lt; at &gt;chapter Server

&lt; at &gt;cindex Server

This section covers building and installing the GDB server.

Currently only a Unix version exists. It should operate on any platform
the driver can be built for.

The BDM server operates from inetd. You need to add the following line
to &lt; at &gt;file(/etc/services} :

&lt; at &gt;smallexample

bdm       6543/tcp                    # BDM server

&lt; at &gt;end smallexample

The port number &lt; at &gt;code{6543} was a random selection. If for any reason it
is a bad or taken number, please let me know.

In the file &lt; at &gt;file{/etc/inetd.con} add the following line :

&lt; at &gt;smallexample

bdm     stream  tcp     nowait  cjohns  /usr/local/sbin//bdmd bdmd

&lt; at &gt;end smallexample

I am running this server as me. If the BDM devices have global
read/write enabled, then it should be ok to use the user &lt; at &gt;code{nobody},
or something similar as the user.

The server has not been checked for security holes. If the 


&lt; at &gt;c ---------------------------------------
&lt; at &gt;node Reporting Bugs
&lt; at &gt;chapter Reporting Bugs
&lt; at &gt;cindex bugs in &lt; at &gt;code{MRB}
&lt; at &gt;cindex reporting bugs in &lt; at &gt;code{MRB}

Your bug reports play an essential role in making &lt; at &gt;code{MRB} reliable.

Reporting a bug may help you by bringing a solution to your problem, or
it may not.  But in any case the principal function of a bug report is
to help the entire community by making the next version of &lt; at &gt;code{MRB}
work better.  Bug reports are your contribution to the maintenance of
&lt; at &gt;code{MRB}.

In order for a bug report to serve its purpose, you must include the
information that enables us to fix the bug.

&lt; at &gt;menu
* Bug Criteria::                Have you found a bug?
* Bug Reporting::               How to report bugs
&lt; at &gt;end menu

&lt; at &gt;c ---------------------------------------
&lt; at &gt;node Bug Criteria
&lt; at &gt;section Have you found a bug?
&lt; at &gt;cindex bug criteria

If you are not sure whether you have found a bug, here are some guidelines:

&lt; at &gt;itemize &lt; at &gt;bullet
&lt; at &gt;item
If the you select a particular configuration and &lt; at &gt;code{MRB} does not
build. It should build if the configuration parameter selection make
sense. For example building the networking code without configuring a
network driver.

&lt; at &gt;item
The standard targets which are contained in MRB do not run.

&lt; at &gt;item
A new release of the GNU tools can break the current code.

&lt; at &gt;item
Your suggestions for improvement of &lt; at &gt;code{MRB} are welcome.
&lt; at &gt;end itemize

&lt; at &gt;c ---------------------------------------
&lt; at &gt;node Bug Reporting
&lt; at &gt;section How to report bugs
&lt; at &gt;cindex bug reports
&lt; at &gt;cindex &lt; at &gt;code{MRB} bugs, reporting

The fundamental principle of reporting bugs usefully is this:
&lt; at &gt;strong{report all the facts}. If you are not sure whether to state a
fact or leave it out, state it!

Often people omit facts because they think they know what causes the
problem and assume that some details do not matter. Play it safe and
give a specific, complete example. That is the easiest thing for you to
do, and the most helpful.

Keep in mind that the purpose of a bug report is to enable us to fix the
bug if it is new to us. Therefore, always write your bug reports on the
assumption that the bug has not been reported previously.

Sometimes people give a few sketchy facts and ask, ``Does this ring a
bell?''  Those bug reports are useless, and we urge everyone to
&lt; at &gt;emph{refuse to respond to them} except to chide the sender to report
bugs properly.

To enable us to fix the bug, you should include all these things:

&lt; at &gt;itemize &lt; at &gt;bullet
&lt; at &gt;item
The version of &lt; at &gt;code{MRB}.

Without this, we will not know whether there is any point in looking for
the bug in the current version of &lt; at &gt;code{MRB}.

&lt; at &gt;item
Any patches you may have applied to the &lt; at &gt;code{MRB} source.

&lt; at &gt;item
The type of host machine you are using, and the operating system name
and version number.

&lt; at &gt;item
What compiler (and its version) was used to compile &lt; at &gt;code{MRB}
--e.g. ``&lt; at &gt;code{gcc-2.7}''.

&lt; at &gt;item
The target you are building. If this is a new target you are developing,
you may need to provide some details of the changes you have made.

&lt; at &gt;item
A description of what behavior you observe that you believe is
incorrect.

&lt; at &gt;item
If you wish to suggest changes to the &lt; at &gt;code{MRB} source, send us context
diffs, as generated by &lt; at &gt;code{diff} with the &lt; at &gt;samp{-u}, &lt; at &gt;samp{-c}, or
&lt; at &gt;samp{-p} option.  Always send diffs from the old file to the new file.
If you even discuss something in the &lt; at &gt;code{MRB} source, refer to it by
context, not by line number.

The line numbers in our development sources will not match those in your
sources.  Your line numbers would convey no useful information to us.
&lt; at &gt;end itemize

Here are some things that are not necessary:

&lt; at &gt;itemize &lt; at &gt;bullet
&lt; at &gt;item
A patch for the bug.

A patch for the bug does help us if it is a good one.  But do not omit
the necessary information, such as the test case, on the assumption that
a patch is all we need.  We might see problems with your patch and decide
to fix the problem another way, or we might not understand it at all.

And if we cannot understand what bug you are trying to fix, or why your
patch should be an improvement, we will not install it.  A test case will
help us to understand.
&lt; at &gt;end itemize

&lt; at &gt;c ---------------------------------------
&lt; at &gt;node Index
&lt; at &gt;unnumbered Index

&lt; at &gt;printindex cp

&lt; at &gt;contents
&lt; at &gt;bye
</description>
    <dc:creator>Jan Halla</dc:creator>
    <dc:date>2008-12-02T16:56:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15236">
    <title>[PATCH] seq: plug a leak</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15236</link>
    <description>I've just pushed this:

From 9461c4d8e58f080a6b27caa923820a4ac8eea6d5 Mon Sep 17 00:00:00 2001
From: Jim Meyering &lt;meyering&lt; at &gt;redhat.com&gt;
Date: Mon, 1 Dec 2008 22:39:58 +0100
Subject: [PATCH] seq: plug a leak

* src/factor.c (emit_ul_factor): Call mpz_clear.
---
 src/factor.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/factor.c b/src/factor.c
index 187143a..83cd0a8 100644
--- a/src/factor.c
+++ b/src/factor.c
&lt; at &gt;&lt; at &gt; -82,6 +82,7 &lt; at &gt;&lt; at &gt; emit_ul_factor (unsigned long int i)
   mpz_init (t);
   mpz_set_ui (t, i);
   emit_factor (t);
+  mpz_clear (t);
 }

 static void
--
1.6.0.4.1101.g642f8
</description>
    <dc:creator>Jim Meyering</dc:creator>
    <dc:date>2008-12-01T21:44:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15233">
    <title>[PATCH] avoid warnings about initialization of automatic aggregates</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15233</link>
    <description>Finally getting serious about avoiding warnings,
I've just eliminated this batch:

From c58b5daa337b16416be50adfeb3e99e3c009c891 Mon Sep 17 00:00:00 2001
From: Jim Meyering &lt;meyering&lt; at &gt;redhat.com&gt;
Date: Sun, 30 Nov 2008 22:37:42 +0100
Subject: [PATCH] avoid warnings about initialization of automatic aggregates

* src/system.h (DZA_CONCAT0, DZA_CONCAT): New macros.
(DECLARE_ZEROED_AGGREGATE): New macro.
* src/ls.c (quote_name): Use it.
* src/pathchk.c (portable_chars_only): Use it.
* src/shred.c (main): Use it.
* src/stty.c (main): Use it.
* src/wc.c (SUPPORT_OLD_MBRTOWC): Use it.
---
 src/ls.c      |    2 +-
 src/pathchk.c |    2 +-
 src/shred.c   |    2 +-
 src/stty.c    |    4 ++--
 src/system.h  |   13 +++++++++++++
 src/wc.c      |    2 +-
 6 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/src/ls.c b/src/ls.c
index 7619ceb..0081865 100644
--- a/src/ls.c
+++ b/src/ls.c
&lt; at &gt;&lt; at &gt; -3721,7 +3721,7 &lt; at &gt;&lt; at &gt; quote_name (FILE *out, const char *name, struct quoting_options const *options,
      reach its end, replacing each non-printable multibyte
      character with a single question mark.  */
   {
-    mbstate_t mbstate = { 0, };
+    DECLARE_ZEROED_AGGREGATE (mbstate_t, mbstate);
     do
       {
 wchar_t wc;
diff --git a/src/pathchk.c b/src/pathchk.c
index 48001fc..3b2bd46 100644
--- a/src/pathchk.c
+++ b/src/pathchk.c
&lt; at &gt;&lt; at &gt; -198,7 +198,7 &lt; at &gt;&lt; at &gt; portable_chars_only (char const *file, size_t filelen)

   if (*invalid)
     {
-      mbstate_t mbstate = { 0, };
+      DECLARE_ZEROED_AGGREGATE (mbstate_t, mbstate);
       size_t charlen = mbrlen (invalid, filelen - validlen, &amp;mbstate);
       error (0, 0,
      _("nonportable character %s in file name %s"),
diff --git a/src/shred.c b/src/shred.c
index 6b7d901..1e7bffb 100644
--- a/src/shred.c
+++ b/src/shred.c
&lt; at &gt;&lt; at &gt; -1099,7 +1099,7 &lt; at &gt;&lt; at &gt; int
 main (int argc, char **argv)
 {
   bool ok = true;
-  struct Options flags = { 0, };
+  DECLARE_ZEROED_AGGREGATE (struct Options, flags);
   char **file;
   int n_files;
   int c;
diff --git a/src/stty.c b/src/stty.c
index 8eeaa2f..eb4f30f 100644
--- a/src/stty.c
+++ b/src/stty.c
&lt; at &gt;&lt; at &gt; -726,7 +726,7 &lt; at &gt;&lt; at &gt; main (int argc, char **argv)
 {
   /* Initialize to all zeroes so there is no risk memcmp will report a
      spurious difference in an uninitialized portion of the structure.  */
-  struct termios mode = { 0, };
+  DECLARE_ZEROED_AGGREGATE (struct termios, mode);

   enum output_type output_type;
   int optc;
&lt; at &gt;&lt; at &gt; -999,7 +999,7 &lt; at &gt;&lt; at &gt; main (int argc, char **argv)
     {
       /* Initialize to all zeroes so there is no risk memcmp will report a
  spurious difference in an uninitialized portion of the structure.  */
-      struct termios new_mode = { 0, };
+      DECLARE_ZEROED_AGGREGATE (struct termios, new_mode);

       if (tcsetattr (STDIN_FILENO, TCSADRAIN, &amp;mode))
 error (EXIT_FAILURE, errno, "%s", device_name);
diff --git a/src/system.h b/src/system.h
index d51caed..21182a4 100644
--- a/src/system.h
+++ b/src/system.h
&lt; at &gt;&lt; at &gt; -513,6 +513,19 &lt; at &gt;&lt; at &gt; enum
 # define IF_LINT(Code) /* empty */
 #endif

+/* With -Dlint, avoid warnings from gcc about code like mbstate_t m = {0,};
+   by wasting space on a static variable of the same type, that is thus
+   guaranteed to be initialized to 0, and use that on the RHS.  */
+#define DZA_CONCAT0(x,y) x ## y
+#define DZA_CONCAT(x,y) DZA_CONCAT0 (x, y)
+#ifdef lint
+# define DECLARE_ZEROED_AGGREGATE(Type, Var) \
+   static Type DZA_CONCAT (s0_, __LINE__); Type Var = DZA_CONCAT (s0_, __LINE__)
+#else
+# define DECLARE_ZEROED_AGGREGATE(Type, Var) \
+  Type Var = { 0, }
+#endif
+
 #ifndef __attribute__
 # if __GNUC__ &lt; 2 || (__GNUC__ == 2 &amp;&amp; __GNUC_MINOR__ &lt; 8)
 #  define __attribute__(x) /* empty */
diff --git a/src/wc.c b/src/wc.c
index 8cfd974..ad25ed8 100644
--- a/src/wc.c
+++ b/src/wc.c
&lt; at &gt;&lt; at &gt; -275,7 +275,7 &lt; at &gt;&lt; at &gt; wc (int fd, char const *file_x, struct fstatus *fstatus)
     {
       bool in_word = false;
       uintmax_t linepos = 0;
-      mbstate_t state = { 0, };
+      DECLARE_ZEROED_AGGREGATE (mbstate_t, state);
       bool in_shift = false;
 # if SUPPORT_OLD_MBRTOWC
       /* Back-up the state before each multibyte character conversion and
--
1.6.0.4.1101.g642f8
</description>
    <dc:creator>Jim Meyering</dc:creator>
    <dc:date>2008-12-01T20:21:13</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15230">
    <title>fix du and wc wrt --files0-from=F</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15230</link>
    <description>Here are the two patches I expect to push:
[as I write this I realize that while there was already very good
test coverage of most of the modified code, I should write a test that
exercises the bug in question, at least for du: read a large list from
a file and ensure that it no longer fails in a memory-limited environment. ]

From b1f67649bfa3c4b2c5c3b584799e49284d0ee4c1 Mon Sep 17 00:00:00 2001
From: Jim Meyering &lt;meyering&lt; at &gt;redhat.com&gt;
Date: Mon, 24 Nov 2008 09:55:55 +0100
Subject: [PATCH 1/2] du: read and process --files0-from= input a name at a time,

rather than by reading the entire input into RAM and *then*
processing each file name.
* src/du.c: Include "argv-iter.h", not "readtokens0.h".
(main): Rewrite to use argv-iter.
Call xfts_open on each argument, rather than on the entire
argv list at once.
Call print_size here, not from du_files.
Diagnose read failure.
* NEWS (Bug fixes): Mention it.
* THANKS: update.
Reported by Barry Kelly.  More details in
http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/15159/
---
 NEWS     |    3 +
 THANKS   |    1 +
 src/du.c |  140 ++++++++++++++++++++++++++++++++++----------------------------
 3 files changed, 81 insertions(+), 63 deletions(-)

diff --git a/NEWS b/NEWS
index f0c5550..158b089 100644
--- a/NEWS
+++ b/NEWS
&lt; at &gt;&lt; at &gt; -12,6 +12,9 &lt; at &gt;&lt; at &gt; GNU coreutils NEWS                                    -*- outline -*-

   cp uses much less memory in some situations

+  du --files0-from=FILE no longer reads all of FILE into RAM before
+  processing the first file name
+
   seq 9223372036854775807 9223372036854775808 now prints only two numbers
   on systems with extended long double support and good library support.
   Even with this patch, on some systems, it still produces invalid output,
diff --git a/THANKS b/THANKS
index d06f755..f74d4fb 100644
--- a/THANKS
+++ b/THANKS
&lt; at &gt;&lt; at &gt; -58,6 +58,7 &lt; at &gt;&lt; at &gt; Augey Mikus                         mikus&lt; at &gt;dqc.org
 Aurelien Jarno                      aurel32&lt; at &gt;debian.org
 Austin Donnelly                     Austin.Donnelly&lt; at &gt;cl.cam.ac.uk
 Axel Kittenberger                   Anshil&lt; at &gt;gmx.net
+Barry Kelly                         http://barrkel.blogspot.com/
 Bauke Jan Douma                     bjdouma&lt; at &gt;xs4all.nl
 Ben Elliston                        bje&lt; at &gt;air.net.au
 Ben Harris                          bjh21&lt; at &gt;netbsd.org
diff --git a/src/du.c b/src/du.c
index e566978..6e4d28b 100644
--- a/src/du.c
+++ b/src/du.c
&lt; at &gt;&lt; at &gt; -30,6 +30,7 &lt; at &gt;&lt; at &gt;
 #include &lt;assert.h&gt;
 #include "system.h"
 #include "argmatch.h"
+#include "argv-iter.h"
 #include "error.h"
 #include "exclude.h"
 #include "fprintftime.h"
&lt; at &gt;&lt; at &gt; -37,7 +38,6 &lt; at &gt;&lt; at &gt;
 #include "human.h"
 #include "quote.h"
 #include "quotearg.h"
-#include "readtokens0.h"
 #include "same.h"
 #include "stat-time.h"
 #include "xfts.h"
&lt; at &gt;&lt; at &gt; -649,9 +649,6 &lt; at &gt;&lt; at &gt; du_files (char **files, int bit_flags)
       fts_close (fts);
     }

-  if (print_grand_total)
-    print_size (&amp;tot_dui, _("total"));
-
   return ok;
 }

&lt; at &gt;&lt; at &gt; -660,10 +657,8 &lt; at &gt;&lt; at &gt; main (int argc, char **argv)
 {
   char *cwd_only[2];
   bool max_depth_specified = false;
-  char **files;
   bool ok = true;
   char *files_from = NULL;
-  struct Tokens tok;

   /* Bit flags that control how fts works.  */
   int bit_flags = FTS_TIGHT_CYCLE_CHECK;
&lt; at &gt;&lt; at &gt; -926,6 +921,7 &lt; at &gt;&lt; at &gt; main (int argc, char **argv)
         }
     }

+  struct argv_iterator *ai;
   if (files_from)
     {
       /* When using --files0-from=F, you may not specify any files
&lt; at &gt;&lt; at &gt; -942,78 +938,96 &lt; at &gt;&lt; at &gt; main (int argc, char **argv)
 error (EXIT_FAILURE, errno, _("cannot open %s for reading"),
        quote (files_from));

-      readtokens0_init (&amp;tok);
-
-      if (! readtokens0 (stdin, &amp;tok) || fclose (stdin) != 0)
-error (EXIT_FAILURE, 0, _("cannot read file names from %s"),
-       quote (files_from));
-
-      files = tok.tok;
+      ai = argv_iter_init_stream (stdin);
     }
   else
     {
-      files = (optind &lt; argc ? argv + optind : cwd_only);
+      char **files = (optind &lt; argc ? argv + optind : cwd_only);
+      ai = argv_iter_init_argv (files);
     }

+  if (!ai)
+    xalloc_die ();
+
   /* Initialize the hash structure for inode numbers.  */
   hash_init ();

-  /* Report and filter out any empty file names before invoking fts.
-     This works around a glitch in fts, which fails immediately
-     (without looking at the other file names) when given an empty
-     file name.  */
-  {
-    size_t i = 0;
-    size_t j;
+  bit_flags |= symlink_deref_bits;
+  static char *temp_argv[] = { NULL, NULL };

-    for (j = 0; ; j++)
-      {
-if (i != j)
-  files[i] = files[j];
+  while (true)
+    {
+      bool skip_file = false;
+      enum argv_iter_err ai_err;
+      char *file_name = argv_iter (ai, &amp;ai_err);
+      if (ai_err == AI_ERR_EOF)
+break;
+      if (!file_name)
+{
+  switch (ai_err)
+    {
+    case AI_ERR_READ:
+      error (0, errno, _("%s: read error"), quote (files_from));
+      skip_file = true;
+      continue;

-if ( ! files[i])
-  break;
+    case AI_ERR_MEM:
+      xalloc_die ();

-if (files_from &amp;&amp; STREQ (files_from, "-") &amp;&amp; STREQ (files[i], "-"))
-  {
-    /* Give a better diagnostic in an unusual case:
-       printf - | du --files0-from=- */
-    error (0, 0, _("when reading file names from stdin, "
-   "no file name of %s allowed"),
-   quote ("-"));
-    continue;
-  }
+    default:
+      assert (!"unexpected error code from argv_iter");
+    }
+}
+      if (files_from &amp;&amp; STREQ (files_from, "-") &amp;&amp; STREQ (file_name, "-"))
+{
+  /* Give a better diagnostic in an unusual case:
+     printf - | du --files0-from=- */
+  error (0, 0, _("when reading file names from stdin, "
+ "no file name of %s allowed"),
+ quote (file_name));
+  skip_file = true;
+}

-if (files[i][0])
-  i++;
-else
-  {
-    /* Diagnose a zero-length file name.  When it's one
-       among many, knowing the record number may help.  */
-    if (files_from)
-      {
-/* Using the standard `filename:line-number:' prefix here is
-   not totally appropriate, since NUL is the separator, not NL,
-   but it might be better than nothing.  */
-unsigned long int file_number = j + 1;
-error (0, 0, "%s:%lu: %s", quotearg_colon (files_from),
-       file_number, _("invalid zero-length file name"));
-      }
-    else
-      error (0, 0, "%s", _("invalid zero-length file name"));
-  }
-      }
+      /* Report and skip any empty file names before invoking fts.
+ This works around a glitch in fts, which fails immediately
+ (without looking at the other file names) when given an empty
+ file name.  */
+      if (!file_name[0])
+{
+  /* Diagnose a zero-length file name.  When it's one
+     among many, knowing the record number may help.
+     FIXME: currently print the record number only with
+     --files0-from=FILE.  Maybe do it for argv, too?  */
+  if (files_from == NULL)
+    error (0, 0, "%s", _("invalid zero-length file name"));
+  else
+    {
+      /* Using the standard `filename:line-number:' prefix here is
+ not totally appropriate, since NUL is the separator, not NL,
+ but it might be better than nothing.  */
+      unsigned long int file_number = argv_iter_n_args (ai);
+      error (0, 0, "%s:%lu: %s", quotearg_colon (files_from),
+     file_number, _("invalid zero-length file name"));
+    }
+  skip_file = true;
+}
+
+      if (skip_file)
+ok = false;
+      else
+{
+  temp_argv[0] = file_name;
+  ok &amp;= du_files (temp_argv, bit_flags);
+}
+    }

-    ok = (i == j);
-  }
+  argv_iter_free (ai);

-  bit_flags |= symlink_deref_bits;
-  ok &amp;= du_files (files, bit_flags);
+  if (files_from &amp;&amp; (ferror (stdin) || fclose (stdin) != 0))
+    error (EXIT_FAILURE, 0, _("error reading %s"), quote (files_from));

-  /* This isn't really necessary, but it does ensure we
-     exercise this function.  */
-  if (files_from)
-    readtokens0_free (&amp;tok);
+  if (print_grand_total)
+    print_size (&amp;tot_dui, _("total"));

   hash_free (htab);

--
1.6.0.4.1101.g642f8


From 622f12ed8fd799ad83546233a60655a6a0d2a4b6 Mon Sep 17 00:00:00 2001
From: Jim Meyering &lt;meyering&lt; at &gt;redhat.com&gt;
Date: Tue, 25 Nov 2008 18:38:26 +0100
Subject: [PATCH 2/2] wc: read and process --files0-from= input a name at a time,

when the file name list is not too large.  Before, wc would always
reading the entire file name list into RAM and *then* process each
file name.
* src/wc.c: Include "argv-iter.h".
(main): Rewrite to use argv-iter when the input file name list
is known to be too large.
* NEWS (Bug fixes): Mention it.
---
 NEWS     |    4 ++
 src/wc.c |  139 ++++++++++++++++++++++++++++++++++++++++++--------------------
 2 files changed, 99 insertions(+), 44 deletions(-)

diff --git a/NEWS b/NEWS
index 158b089..6a85dd7 100644
--- a/NEWS
+++ b/NEWS
&lt; at &gt;&lt; at &gt; -20,6 +20,10 &lt; at &gt;&lt; at &gt; GNU coreutils NEWS                                    -*- outline -*-
   Even with this patch, on some systems, it still produces invalid output,
   from 3 to at least 1026 lines long. [bug introduced in coreutils-6.11]

+  wc --files0-from=FILE no longer reads all of FILE into RAM, before
+  processing the first file name, unless the list of names is known
+  to be small enough.
+
 ** Changes in behavior

   cp and mv: the --reply={yes,no,query} option has been removed.
diff --git a/src/wc.c b/src/wc.c
index 8cfd974..25494d6 100644
--- a/src/wc.c
+++ b/src/wc.c
&lt; at &gt;&lt; at &gt; -20,14 +20,17 &lt; at &gt;&lt; at &gt;
 #include &lt;config.h&gt;

 #include &lt;stdio.h&gt;
+#include &lt;assert.h&gt;
 #include &lt;getopt.h&gt;
 #include &lt;sys/types.h&gt;
 #include &lt;wchar.h&gt;
 #include &lt;wctype.h&gt;

 #include "system.h"
+#include "argv-iter.h"
 #include "error.h"
 #include "mbchar.h"
+#include "physmem.h"
 #include "quote.h"
 #include "quotearg.h"
 #include "readtokens0.h"
&lt; at &gt;&lt; at &gt; -515,17 +518,19 &lt; at &gt;&lt; at &gt; wc_file (char const *file, struct fstatus *fstatus)
 /* Return the file status for the NFILES files addressed by FILE.
    Optimize the case where only one number is printed, for just one
    file; in that case we can use a print width of 1, so we don't need
-   to stat the file.  */
+   to stat the file.  Handle the case of (nfiles == 0) in the same way;
+   that happens when we don't know how long the list of file names will be.  */

 static struct fstatus *
-get_input_fstatus (int nfiles, char * const *file)
+get_input_fstatus (int nfiles, char *const *file)
 {
-  struct fstatus *fstatus = xnmalloc (nfiles, sizeof *fstatus);
+  struct fstatus *fstatus = xnmalloc (nfiles ? nfiles : 1, sizeof *fstatus);

-  if (nfiles == 1
-      &amp;&amp; ((print_lines + print_words + print_chars
-   + print_bytes + print_linelength)
-  == 1))
+  if (nfiles == 0
+      || (nfiles == 1
+  &amp;&amp; ((print_lines + print_words + print_chars
+       + print_bytes + print_linelength)
+      == 1)))
     fstatus[0].failed = 1;
   else
     {
&lt; at &gt;&lt; at &gt; -577,7 +582,6 &lt; at &gt;&lt; at &gt; compute_number_width (int nfiles, struct fstatus const *fstatus)
 int
 main (int argc, char **argv)
 {
-  int i;
   bool ok;
   int optc;
   int nfiles;
&lt; at &gt;&lt; at &gt; -637,6 +641,8 &lt; at &gt;&lt; at &gt; main (int argc, char **argv)
  | print_linelength))
     print_lines = print_words = print_bytes = true;

+  bool read_tokens = false;
+  struct argv_iterator *ai;
   if (files_from)
     {
       FILE *stream;
&lt; at &gt;&lt; at &gt; -661,69 +667,114 &lt; at &gt;&lt; at &gt; main (int argc, char **argv)
    quote (files_from));
 }

-      readtokens0_init (&amp;tok);
-
-      if (! readtokens0 (stream, &amp;tok) || fclose (stream) != 0)
-error (EXIT_FAILURE, 0, _("cannot read file names from %s"),
-       quote (files_from));
-
-      files = tok.tok;
-      nfiles = tok.n_tok;
+      /* Read the file list into RAM if we can detect its size and that
+ size is reasonable.  Otherwise, we'll read a name at a time.  */
+      struct stat st;
+      if (fstat (fileno (stream), &amp;st) == 0
+  &amp;&amp; S_ISREG (st.st_mode)
+  &amp;&amp; st.st_size &lt;= MIN (10 * 1024 * 1024, physmem_available () / 2))
+{
+  read_tokens = true;
+  readtokens0_init (&amp;tok);
+  if (! readtokens0 (stream, &amp;tok) || fclose (stream) != 0)
+    error (EXIT_FAILURE, 0, _("cannot read file names from %s"),
+   quote (files_from));
+  files = tok.tok;
+  nfiles = tok.n_tok;
+  ai = argv_iter_init_argv (files);
+}
+      else
+{
+  files = NULL;
+  nfiles = 0;
+  ai = argv_iter_init_stream (stream);
+}
     }
   else
     {
-      static char *stdin_only[2];
+      static char *stdin_only[] = { NULL };
       files = (optind &lt; argc ? argv + optind : stdin_only);
       nfiles = (optind &lt; argc ? argc - optind : 1);
-      stdin_only[0] = NULL;
+      ai = argv_iter_init_argv (files);
     }

   fstatus = get_input_fstatus (nfiles, files);
   number_width = compute_number_width (nfiles, fstatus);

+  int i;
   ok = true;
-  for (i = 0; i &lt; nfiles; i++)
+  for (i = 0; /* */; i++)
     {
-      if (files[i])
+      bool skip_file = false;
+      enum argv_iter_err ai_err;
+      char *file_name = argv_iter (ai, &amp;ai_err);
+      if (ai_err == AI_ERR_EOF)
+break;
+      if (!file_name)
 {
-  if (files_from &amp;&amp; STREQ (files_from, "-") &amp;&amp; STREQ (files[i], "-"))
+  switch (ai_err)
     {
-      ok = false;
-      /* Give a better diagnostic in an unusual case:
- printf - | wc --files0-from=- */
-      error (0, 0, _("when reading file names from stdin, "
-     "no file name of %s allowed"),
-     quote ("-"));
+    case AI_ERR_READ:
+      error (0, errno, _("%s: read error"), quote (files_from));
+      skip_file = true;
       continue;
+    case AI_ERR_MEM:
+      xalloc_die ();
+    default:
+      assert (!"unexpected error code from argv_iter");
     }
+}
+      if (files_from &amp;&amp; STREQ (files_from, "-") &amp;&amp; STREQ (file_name, "-"))
+{
+  /* Give a better diagnostic in an unusual case:
+     printf - | wc --files0-from=- */
+  error (0, 0, _("when reading file names from stdin, "
+ "no file name of %s allowed"),
+ quote (file_name));
+  skip_file = true;
+}

+      if (!file_name[0])
+{
   /* Diagnose a zero-length file name.  When it's one
-     among many, knowing the record number may help.  */
-  if (files[i][0] == '\0')
+     among many, knowing the record number may help.
+     FIXME: currently print the record number only with
+     --files0-from=FILE.  Maybe do it for argv, too?  */
+  if (files_from == NULL)
+    error (0, 0, "%s", _("invalid zero-length file name"));
+  else
     {
-      ok = false;
-      if (files_from)
-{
-  /* Using the standard `filename:line-number:' prefix here is
-     not totally appropriate, since NUL is the separator, not NL,
-     but it might be better than nothing.  */
-  unsigned long int file_number = i + 1;
-  error (0, 0, "%s:%lu: %s", quotearg_colon (files_from),
- file_number, _("invalid zero-length file name"));
-}
-      else
-error (0, 0, "%s", _("invalid zero-length file name"));
-      continue;
+      /* Using the standard `filename:line-number:' prefix here is
+ not totally appropriate, since NUL is the separator, not NL,
+ but it might be better than nothing.  */
+      unsigned long int file_number = argv_iter_n_args (ai);
+      error (0, 0, "%s:%lu: %s", quotearg_colon (files_from),
+     file_number, _("invalid zero-length file name"));
     }
+  skip_file = true;
 }

-      ok &amp;= wc_file (files[i], &amp;fstatus[i]);
+      if (skip_file)
+ok = false;
+      else
+ok &amp;= wc_file (file_name, &amp;fstatus[nfiles ? i : 0]);
     }

-  if (1 &lt; nfiles)
+  /* No arguments on the command line is fine.  That means read from stdin.
+     However, no arguments on the --files0-from input stream is an error
+     means don't read anything.  */
+  if (ok &amp;&amp; !files_from &amp;&amp; argv_iter_n_args (ai) == 0)
+    ok &amp;= wc_file (NULL, &amp;fstatus[0]);
+
+  if (read_tokens)
+    readtokens0_free (&amp;tok);
+
+  if (1 &lt; argv_iter_n_args (ai))
     write_counts (total_lines, total_words, total_chars, total_bytes,
   max_line_length, _("total"));

+  argv_iter_free (ai);
+
   free (fstatus);

   if (have_read_stdin &amp;&amp; close (STDIN_FILENO) != 0)
--
1.6.0.4.1101.g642f8
</description>
    <dc:creator>Jim Meyering</dc:creator>
    <dc:date>2008-12-01T19:23:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15228">
    <title>avoid a warning in hostname.c</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15228</link>
    <description>I also pushed another little change:

http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=21eb87e6eafee9111ac2da32cfbfb9ee34a4b465

commit 21eb87e6eafee9111ac2da32cfbfb9ee34a4b465
Author: Jim Meyering &lt;meyering&lt; at &gt;redhat.com&gt;
Date:   Mon Dec 1 07:27:55 2008 +0100

    * src/hostname.c (sethostname) [!HAVE_SETHOSTNAME]: Remove declaration.

diff --git a/src/hostname.c b/src/hostname.c
index b325c27..89cc568 100644
--- a/src/hostname.c
+++ b/src/hostname.c
&lt; at &gt;&lt; at &gt; -32,15 +32,11 &lt; at &gt;&lt; at &gt;

 #define AUTHORS proper_name ("Jim Meyering")

-#if HAVE_SETHOSTNAME &amp;&amp; !defined sethostname
-int sethostname ();
-#endif
-
 #if !defined HAVE_SETHOSTNAME &amp;&amp; defined HAVE_SYSINFO &amp;&amp; \
      defined HAVE_SYS_SYSTEMINFO_H
 # include &lt;sys/systeminfo.h&gt;

-int
+static int
 sethostname (char *name, size_t namelen)
 {
   /* Using sysinfo() is the SVR4 mechanism to set a hostname. */
</description>
    <dc:creator>Jim Meyering</dc:creator>
    <dc:date>2008-12-01T17:09:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15227">
    <title>FYI: argv-iter: new module</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15227</link>
    <description>I've just pushed the argv-iter module:
(with a few tweaks since the initial discussion),

  http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=ca738e4414

along with a test module:

  http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=d3b5555f10

and code to make coreutils use the new module:

  http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=80325aca2d

This is all in preparation for the fix for
the bug in du's --files0-from=F implementation,
which will follow soon.

wc needs a similar fix, but can benefit from having
the entire list of file names up front (alignment),
so there's a twist.
</description>
    <dc:creator>Jim Meyering</dc:creator>
    <dc:date>2008-12-01T17:08:03</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15223">
    <title>Failure to compile latest coreutils-6.12</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15223</link>
    <description>Hello guys,

I am using 2.6.21.5 kernel (gcc 4.3.2, ld 2.17.50.0.17*). I've tried
compiling the latest coreutils
that I downloaded from the official website and I keep getting the same
error message.

mv unistd.h-t unistd.h
make  all-am
make[3]: Entering directory `/mnt/lfs/tmp/coreutils-6.12/lib'
depbase=`echo set-mode-acl.o | sed 's|[^/]*$|.deps/&amp;|;s|\.o$||'`;\
        gcc -std=gnu99  -I.      -g -O2 -MT set-mode-acl.o -MD -MP -MF
$depbase.Tpo -c -o set-mode-acl.o set-mode-acl.c &amp;&amp;\
        mv -f $depbase.Tpo $depbase.Po
In file included from acl.h:20,
                 from set-mode-acl.c:22:
/usr/include/sys/types.h:52: error: two or more data types in declaration
specifiers
/usr/include/sys/types.h:52: error: two or more data types in declaration
specifiers
/usr/include/sys/types.h:52: error: two or more data types in declaration
specifiers
/usr/include/sys/types.h:72: error: two or more data types in declaration
specifiers
/usr/include/sys/types.h:77: error: two or more data types in declaration
specifiers
/usr/include/sys/types.h:100: error: two or more data types in declaration
specifiers
In file included from gettext.h:169,
                 from acl-internal.h:49,
                 from set-mode-acl.c:24:
./string.h:214: error: expected identifier or '(' before '__extension__'


Also during configure process I've noticed this message.

configure: WARNING: sys/sysmacros.h: present but cannot be compiled
configure: WARNING: sys/sysmacros.h:     check for missing prerequisite
headers?
configure: WARNING: sys/sysmacros.h: see the Autoconf documentation
configure: WARNING: sys/sysmacros.h:     section "Present But Cannot Be
Compiled"
configure: WARNING: sys/sysmacros.h: proceeding with the preprocessor's
result
configure: WARNING: sys/sysmacros.h: in the future, the compiler will take
precedence
configure: WARNING:     ## ------------------------------------ ##
configure: WARNING:     ## Report this to bug-coreutils&lt; at &gt;gnu.org ##
configure: WARNING:     ## ------------------------------------ ##


Looks like there is a confusion with the data types &lt;sys/types.h&gt; file which
is followed by the parse error
at the end. Hope this info helps. I'll try editing sys/types.h tomorrow and
see where I can get. I also have applied 2 patches

../coreutils-6.12-i18n-2.patch
../utils/coreutils-6.12-uname-1.patch

It seems to be a bug. Please help me resolve this one.
Thanks for your support, it is greatly appreciated.

Best Regards,
Andrew
</description>
    <dc:creator>EA Games</dc:creator>
    <dc:date>2008-12-01T13:49:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15210">
    <title>du --files-from feature request</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15210</link>
    <description>Hi,
A feature request for du,  a way to sum  from a list of files without
doing tr \n \0

I had to sort some files and and needed to know how large the group of
 files that I had found were.

I spend many hours trying to figure this out / and searching for solution.
It turns out that the \0 delimited list requirement was very painful.
I wish I could cat the output of find  into du and get the total

btw, my find options included restricting it to type file,

http://www.mail-archive.com/debian-bugs-dist&lt; at &gt;lists.debian.org/msg396774.html

Geraud suggests a mode for du to to avoid situations like this:


Example:
$ find &lt;dir&gt; -&lt;options&gt; &gt;files.list
    # create a NL-separated list of files
$ wc -l files.list
    # wc could not be used to count NUL-separated items
    # (another more complex program would be needed)
$ sed -i -e &lt;expr&gt; files.list
    # sed is designed for "regular" lines (NL-terminated)
$ wc -l files.list
$ emacs files.list
    # editing a NUL-separated list in emacs would be inconvenient
$ tr $'\n' $'\0' &lt;files.list &gt;files0.list
    # an additional command that I would like not to type
$ du -csb --from-files0 files0.list | tail -n1
    # note the additional tail command that also could be avoided
    # if there were an option to only display the grand total
$ IFS=$'\n' for i in `cat files.list`; do archive "$i"; done
    # if the list is not too long
    # does not work with NUL-separated lists (or I do not know how)
$ xargs -n1 -d \\n --arg-file=files.list archive
    # if the list is very long
    # here files0.list could be used
</description>
    <dc:creator>Aaron Peterson</dc:creator>
    <dc:date>2008-12-01T00:16:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15208">
    <title>[bug #24974] Document that comm's option "-1","-2" and "-3" can be combined</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15208</link>
    <description>
URL:
  &lt;http://savannah.gnu.org/bugs/?24974&gt;

                 Summary: Document that comm's option "-1","-2" and "-3" can
be combined
                 Project: GNU Core Utilities
            Submitted by: None
            Submitted on: Sun 30 Nov 2008 22:11:59 UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Hello,

Could you explicitly document that "-1", "-2" and "-3" options
of "comm" can be combined.
This isn't obvious, and may lead some people [me!] to use
other tools instead.

Thanks in advance

Franklin
fpiat &lt; at &gt; klabs;be




    _______________________________________________________

Reply to this item at:

  &lt;http://savannah.gnu.org/bugs/?24974&gt;

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/
</description>
    <dc:creator>anonymous</dc:creator>
    <dc:date>2008-11-30T22:12:02</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15205">
    <title>FYI: 5 small changes</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15205</link>
    <description>These are test-related, except the last one,
which is to avoid a warning.

From b5b3690d069b0bd4a1d561a8c1b527768d067b5d Mon Sep 17 00:00:00 2001
From: Jim Meyering &lt;meyering&lt; at &gt;redhat.com&gt;
Date: Mon, 24 Nov 2008 10:03:25 +0100
Subject: [PATCH 1/5] tests: avoid failure of cp/link-heap on some systems

* tests/cp/link-heap: Raise virtual memory limit from 10,000
to 14,000, to avoid failure on Debian/unstable (libc6 2.7-16).
---
 tests/cp/link-heap |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/cp/link-heap b/tests/cp/link-heap
index b20c7d3..7aa142d 100755
--- a/tests/cp/link-heap
+++ b/tests/cp/link-heap
&lt; at &gt;&lt; at &gt; -36,6 +36,6 &lt; at &gt;&lt; at &gt; mkdir e || framework_failure
 mv $a $b e || framework_failure

 fail=0
-(ulimit -v 10000; cp -al e f) || fail=1
+(ulimit -v 14000; cp -al e f) || fail=1

 Exit $fail
--
1.6.0.4.1101.g642f8


From 847ab6a518b0e5d88f4e1aba29aa1caeef889fa2 Mon Sep 17 00:00:00 2001
From: Jim Meyering &lt;meyering&lt; at &gt;redhat.com&gt;
Date: Fri, 28 Nov 2008 21:32:39 +0100
Subject: [PATCH 2/5] tests: start long-running cp/link-heap earlier

* tests/Makefile.am (TESTS): Move cp/link-heap nearer the start of the
list, so that its termination doesn't delay a parallel "make check".
---
 tests/Makefile.am |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8c768bb..307e5a8 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
&lt; at &gt;&lt; at &gt; -74,6 +74,7 &lt; at &gt;&lt; at &gt; TESTS =\
   misc/invalid-opt\
   rm/ext3-perf\
   rm/cycle\
+  cp/link-heap\
   chmod/no-x\
   chgrp/basic\
   rm/dangling-symlink\
&lt; at &gt;&lt; at &gt; -124,7 +125,7 &lt; at &gt;&lt; at &gt; TESTS =\
   misc/ptx\
   misc/test\
   misc/seq\
-  misc/seq-long-double\
+  misc/seq-long-double\
   misc/head\
   misc/head-elide-tail\
   tail-2/tail-n0f\
&lt; at &gt;&lt; at &gt; -262,7 +263,6 &lt; at &gt;&lt; at &gt; TESTS =\
   cp/file-perm-race\
   cp/into-self\
   cp/link\
-  cp/link-heap\
   cp/link-no-deref\
   cp/link-preserve\
   cp/no-deref-link1\
--
1.6.0.4.1101.g642f8


From d6a62182f07766296244ccc4f8c2d1a800e987bd Mon Sep 17 00:00:00 2001
From: Jim Meyering &lt;meyering&lt; at &gt;redhat.com&gt;
Date: Fri, 28 Nov 2008 22:08:09 +0100
Subject: [PATCH 3/5] build: don't reject definition of STREQ

* maint.mk (sc_prohibit_strcmp): Tighten rule: exclude
macro definitions like the one in system.h.
* .x-sc_prohibit_strcmp: Don't exempt src/system.h.
---
 .x-sc_prohibit_strcmp |    1 -
 maint.mk              |    3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.x-sc_prohibit_strcmp b/.x-sc_prohibit_strcmp
index fdceaf0..56631ab 100644
--- a/.x-sc_prohibit_strcmp
+++ b/.x-sc_prohibit_strcmp
&lt; at &gt;&lt; at &gt; -1,2 +1 &lt; at &gt;&lt; at &gt;
-^src/system\.h
 ChangeLog
diff --git a/maint.mk b/maint.mk
index a7d0b86..cb3c6a5 100644
--- a/maint.mk
+++ b/maint.mk
&lt; at &gt;&lt; at &gt; -132,7 +132,8 &lt; at &gt;&lt; at &gt; sc_prohibit_atoi_atof:
 # Use STREQ rather than comparing strcmp == 0, or != 0.
 sc_prohibit_strcmp:
 &lt; at &gt;grep -nE '! *str''cmp *\(|\&lt;str''cmp *\([^)]+\) *=='\
-    $$($(VC_LIST_EXCEPT)) &amp;&amp;\
+    $$($(VC_LIST_EXCEPT))\
+  | grep -vE ':# *define STREQ\(' &amp;&amp;\
   { echo '$(ME): use STREQ in place of the above uses of str''cmp' \
 1&gt;&amp;2; exit 1; } || :

--
1.6.0.4.1101.g642f8


From 90f74735aa2f4753a3ae9cea848ef98daa31b7a6 Mon Sep 17 00:00:00 2001
From: Jim Meyering &lt;meyering&lt; at &gt;redhat.com&gt;
Date: Sat, 29 Nov 2008 11:22:00 +0100
Subject: [PATCH 4/5] tests: df: skip total-verify if df fails

* tests/df/total-verify: Skip the test if df fails.
---
 tests/df/total-verify |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tests/df/total-verify b/tests/df/total-verify
index caf6d1a..ba27747 100755
--- a/tests/df/total-verify
+++ b/tests/df/total-verify
&lt; at &gt;&lt; at &gt; -23,6 +23,8 &lt; at &gt;&lt; at &gt; fi

 . $srcdir/test-lib.sh

+df || skip_test_ "df fails"
+
 cat &lt;&lt;\EOF &gt; check-df || framework_failure
 my ($total, $used, $avail) = (0, 0, 0);
 while (&lt;&gt;)
--
1.6.0.4.1101.g642f8


From b14e5c40b9e7f6140a800a0b69eec693ea73fd09 Mon Sep 17 00:00:00 2001
From: Jim Meyering &lt;meyering&lt; at &gt;redhat.com&gt;
Date: Sun, 30 Nov 2008 17:39:11 +0100
Subject: [PATCH 5/5] m4: avoid a warning from gcc's -Wstrict-prototypes

* m4/jm-macros.m4 (ARGMATCH_DIE_DECL): Use proper prototype for usage.
---
 m4/jm-macros.m4 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4
index 8fa1740..a53be5b 100644
--- a/m4/jm-macros.m4
+++ b/m4/jm-macros.m4
&lt; at &gt;&lt; at &gt; -38,7 +38,7 &lt; at &gt;&lt; at &gt; AC_DEFUN([coreutils_MACROS],
   # By default, argmatch should fail calling usage (1).
   AC_DEFINE(ARGMATCH_DIE, [usage (1)],
     [Define to the function xargmatch calls on failures.])
-  AC_DEFINE(ARGMATCH_DIE_DECL, [void usage ()],
+  AC_DEFINE(ARGMATCH_DIE_DECL, [void usage (int _e)],
     [Define to the declaration of the xargmatch failure function.])

   # used by ls
--
1.6.0.4.1101.g642f8
</description>
    <dc:creator>Jim Meyering</dc:creator>
    <dc:date>2008-11-30T18:27:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15204">
    <title>[PATCH] remove explicit declaration of putenv, ...</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15204</link>
    <description>FYI, I've just pushed this and the dd/reblock fix:

From 57e2022b8d4fa6a2fbb420447705701535e58b0d Mon Sep 17 00:00:00 2001
From: Jim Meyering &lt;meyering&lt; at &gt;redhat.com&gt;
Date: Wed, 12 Nov 2008 11:02:50 +0100
Subject: [PATCH] remove explicit declaration of putenv, ...

* src/date.c: ... now that gnulib guarantees that it's in &lt;stdlib.h&gt;.
* src/env.c: Likewise.
---
 src/date.c |    2 --
 src/env.c  |    2 --
 2 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/date.c b/src/date.c
index e94de60..43e2005 100644
--- a/src/date.c
+++ b/src/date.c
&lt; at &gt;&lt; at &gt; -38,8 +38,6 &lt; at &gt;&lt; at &gt;

 #define AUTHORS proper_name ("David MacKenzie")

-int putenv ();
-
 static bool show_date (const char *format, struct timespec when);

 enum Time_spec
diff --git a/src/env.c b/src/env.c
index 97bec71..fb9d793 100644
--- a/src/env.c
+++ b/src/env.c
&lt; at &gt;&lt; at &gt; -91,8 +91,6 &lt; at &gt;&lt; at &gt;
   proper_name ("Richard Mlynarik"), \
   proper_name ("David MacKenzie")

-int putenv ();
-
 extern char **environ;

 static struct option const longopts[] =
--
1.6.0.4.1101.g642f8
</description>
    <dc:creator>Jim Meyering</dc:creator>
    <dc:date>2008-11-30T18:15:28</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15201">
    <title>cp --parents requires path as destination,can it be made to take filename?</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15201</link>
    <description>Hi,  I just spent a few hours learning how to find files and got a cp
command up that looked like it should work..

I ran into a problem that was very tough to find the solution to though,

cp: with --parents, the destination must be a directory
Try `cp --help' for more information.

I have since found a promising lead that suggested using the dirname
command to solve my problem.. hours later that I wish I knew that.

anyway, is there some drastic reason why --parents doesn't work with a
full filename with filname and path?

btw, I need the paths

-T --parents seems like it should make it write to a file...


#!/bin/bash
DESTDIR="/media/disk/highpriority"

find -maxdepth 2 -type f -name '*' | while read line; do
DESTtail=`echo "$line" | cut -c 2-` ;
#echo cp -v "$line" "$DESTDIR$DESTtail";
cp -T --parents -v "$line" "$DESTDIR$DESTtail";
done


Thanks.
</description>
    <dc:creator>Aaron Peterson</dc:creator>
    <dc:date>2008-11-30T11:39:28</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15200">
    <title>(no subject)</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15200</link>
    <description>
I think this is what the apache download page says to do to check the signature of the downloaded file....

c:\Users\MyName\Documents&gt;"c:\Program Files\GNU\GnuPG\gpg.exe" --verify apache.asc
gpg: no signed data
gpg: can't hash datafile: file open error

That did not work so well...SOOO...

This is what I did... Does this output mean everything is ok? It seems mostly ok... 

c:\Users\MyName\Documents&gt;"c:\Program Files\GNU\GnuPG\gpg.exe" --verify apache.asc c:\Users\MyName\Desktop\apache-ant-1.7.1-bin.zip
gpg: Signature made 06/27/08 00:50:34 using DSA key ID AA0077B0
gpg: Good signature from "Kev Jackson (apache key) &lt;kevj&lt; at &gt;apache.org&gt;"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: F54C 925C 2454 F21D 8669  2540 A0BF F93D AA00 77B0</description>
    <dc:creator>Martin Douglas</dc:creator>
    <dc:date>2008-11-29T21:15:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15198">
    <title>dd: reblock failure -- sporadic failures</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15198</link>
    <description>This seems very strange.  Periodically I have seen the dd reblock test
fail.  It isn't a hard failure and that seems like a critical clue to
me.  But it also seems quite strange.

  http://buildbot.proulx.com:9000/i686-gnu-linux-full/builds/990/step-test/0

  + dd bs=3 ibs=1 obs=1
  ...
  + diff -u err exp-no-reblock
  --- err         2008-11-29 07:07:22.000000000 -0700
  +++ exp-no-reblock   2008-11-29 07:07:21.000000000 -0700
  &lt; at &gt;&lt; at &gt; -1,3 +1,3 &lt; at &gt;&lt; at &gt;
  -1+1 records in
  -1+1 records out
  +0+2 records in
  +0+2 records out
   4 bytes (4 B) copied
  + fail=1

Bob
</description>
    <dc:creator>Bob Proulx</dc:creator>
    <dc:date>2008-11-29T18:36:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15194">
    <title>[PATCH] cp, mv: remove 3-year-deprecated+warned-about --reply option</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15194</link>
    <description>I'm finally removing the --reply option to mv and cp.
This is in my queue to push very soon:

From f9e0096c158e95afe8ae1c68ea291981382208a2 Mon Sep 17 00:00:00 2001
From: Jim Meyering &lt;meyering&lt; at &gt;redhat.com&gt;
Date: Wed, 8 Oct 2008 08:51:38 +0200
Subject: [PATCH] cp, mv: remove 3-year-deprecated+warned-about --reply option

* src/cp.c (reply_args, reply_vals): Remove globals.
[REPLY_OPTION]: Remove enum.
(long_opts) ["reply"]: Remove initializer.
(main): Remove case stmt.
* src/mv.c: Likewise.
* NEWS (Changes in behavior): Mention this.
---
 NEWS     |    3 +++
 src/cp.c |   22 ----------------------
 src/mv.c |   23 +----------------------
 3 files changed, 4 insertions(+), 44 deletions(-)

diff --git a/NEWS b/NEWS
index 360cb4b..f0c5550 100644
--- a/NEWS
+++ b/NEWS
&lt; at &gt;&lt; at &gt; -19,6 +19,9 &lt; at &gt;&lt; at &gt; GNU coreutils NEWS                                    -*- outline -*-

 ** Changes in behavior

+  cp and mv: the --reply={yes,no,query} option has been removed.
+  Using it has elicited a warning for the last three years.
+
   ls -l now marks SELinux-only files with the less obtrusive '.',
   rather than '+'.  A file with any other combination of MAC and ACL
   is still marked with a '+'.
diff --git a/src/cp.c b/src/cp.c
index 95eba0c..8e34965 100644
--- a/src/cp.c
+++ b/src/cp.c
&lt; at &gt;&lt; at &gt; -76,7 +76,6 &lt; at &gt;&lt; at &gt; enum
   NO_PRESERVE_ATTRIBUTES_OPTION,
   PARENTS_OPTION,
   PRESERVE_ATTRIBUTES_OPTION,
-  REPLY_OPTION,
   SPARSE_OPTION,
   STRIP_TRAILING_SLASHES_OPTION,
   UNLINK_DEST_BEFORE_OPENING
&lt; at &gt;&lt; at &gt; -108,18 +107,6 &lt; at &gt;&lt; at &gt; static enum Sparse_type const sparse_type[] =
 };
 ARGMATCH_VERIFY (sparse_type_string, sparse_type);

-/* Valid arguments to the `--reply' option. */
-static char const* const reply_args[] =
-{
-  "yes", "no", "query", NULL
-};
-/* The values that correspond to the above strings. */
-static int const reply_vals[] =
-{
-  I_ALWAYS_YES, I_ALWAYS_NO, I_ASK_USER
-};
-ARGMATCH_VERIFY (reply_args, reply_vals);
-
 static struct option const long_opts[] =
 {
   {"archive", no_argument, NULL, 'a'},
&lt; at &gt;&lt; at &gt; -138,8 +125,6 &lt; at &gt;&lt; at &gt; static struct option const long_opts[] =
   {"preserve", optional_argument, NULL, PRESERVE_ATTRIBUTES_OPTION},
   {"recursive", no_argument, NULL, 'R'},
   {"remove-destination", no_argument, NULL, UNLINK_DEST_BEFORE_OPENING},
-  {"reply", required_argument, NULL, REPLY_OPTION}, /* Deprecated 2005-07-03,
-       remove in 2008. */
   {"sparse", required_argument, NULL, SPARSE_OPTION},
   {"strip-trailing-slashes", no_argument, NULL, STRIP_TRAILING_SLASHES_OPTION},
   {"suffix", required_argument, NULL, 'S'},
&lt; at &gt;&lt; at &gt; -1001,13 +986,6 &lt; at &gt;&lt; at &gt; main (int argc, char **argv)
   x.recursive = true;
   break;

-case REPLY_OPTION: /* Deprecated */
-  x.interactive = XARGMATCH ("--reply", optarg,
-     reply_args, reply_vals);
-  error (0, 0,
- _("the --reply option is deprecated; use -i or -f instead"));
-  break;
-
 case UNLINK_DEST_BEFORE_OPENING:
   x.unlink_dest_before_opening = true;
   break;
diff --git a/src/mv.c b/src/mv.c
index fc255f3..053504d 100644
--- a/src/mv.c
+++ b/src/mv.c
&lt; at &gt;&lt; at &gt; -52,33 +52,18 &lt; at &gt;&lt; at &gt;
    non-character as a pseudo short option, starting with CHAR_MAX + 1.  */
 enum
 {
-  REPLY_OPTION = CHAR_MAX + 1,
-  STRIP_TRAILING_SLASHES_OPTION
+  STRIP_TRAILING_SLASHES_OPTION = CHAR_MAX + 1
 };

 /* Remove any trailing slashes from each SOURCE argument.  */
 static bool remove_trailing_slashes;

-/* Valid arguments to the `--reply' option. */
-static char const* const reply_args[] =
-{
-  "yes", "no", "query", NULL
-};
-
-/* The values that correspond to the above strings. */
-static int const reply_vals[] =
-{
-  I_ALWAYS_YES, I_ALWAYS_NO, I_ASK_USER
-};
-
 static struct option const long_options[] =
 {
   {"backup", optional_argument, NULL, 'b'},
   {"force", no_argument, NULL, 'f'},
   {"interactive", no_argument, NULL, 'i'},
   {"no-target-directory", no_argument, NULL, 'T'},
-  {"reply", required_argument, NULL, REPLY_OPTION}, /* Deprecated 2005-07-03,
-       remove in 2008. */
   {"strip-trailing-slashes", no_argument, NULL, STRIP_TRAILING_SLASHES_OPTION},
   {"suffix", required_argument, NULL, 'S'},
   {"target-directory", required_argument, NULL, 't'},
&lt; at &gt;&lt; at &gt; -390,12 +375,6 &lt; at &gt;&lt; at &gt; main (int argc, char **argv)
 case 'i':
   x.interactive = I_ASK_USER;
   break;
-case REPLY_OPTION: /* Deprecated */
-  x.interactive = XARGMATCH ("--reply", optarg,
-     reply_args, reply_vals);
-  error (0, 0,
- _("the --reply option is deprecated; use -i or -f instead"));
-  break;
 case STRIP_TRAILING_SLASHES_OPTION:
   remove_trailing_slashes = true;
   break;
--
1.6.0.4.1101.g642f8
</description>
    <dc:creator>Jim Meyering</dc:creator>
    <dc:date>2008-11-29T11:19:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15190">
    <title>cp command option -x, --one-file-system</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15190</link>
    <description>
cp command option :

 -x, --one-file-system
     stay on this file system

sometimes does not stay on the same filesystem.

using cmd line :
cp -r -u -p -x -f -v --target-directory='/abc/def/123/456/xx" /home
or
cp -rupxfv --target-directory='/abc/def/123/456/xx" /home

where '/home' is mounted on a different volume than '/'.

Detected by a call from python with os.popen().
</description>
    <dc:creator>ebloch</dc:creator>
    <dc:date>2008-11-28T12:51:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15188">
    <title>Something strange with "date +%s" and timezones</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15188</link>
    <description>I am in MST (US Mountain Time).  My shell is csh.

Observe:

 % date --ver
date (GNU coreutils) 6.10
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
&lt;http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.
 % date +%s ; sh -c 'TZ=GMT0 date +%s'
1227827980
1227827980
 % date -d '1/1/1970' +%s ; sh -c 'TZ=GMT0 date -d '1/1/1970' +%s'
25200
0
 %

Note that if I don't specify a date, then %s gives the same result for
either timezone.  But if I do specify a date, then the result differs
(in the expected way) between the two invocations.

It seems to me that it should either return the same thing or not return the
same thing, consistently.  In general with date, it shouldn't matter whether
or not you use "-d".

What say you?
</description>
    <dc:creator>Stan Marsh</dc:creator>
    <dc:date>2008-11-27T23:28:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15187">
    <title>[PATCH]: chmod, chown, chgrp: Reduce verbosity of silent mode</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15187</link>
    <description>_______________________________________________
Bug-coreutils mailing list
Bug-coreutils&lt; at &gt;gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils
</description>
    <dc:creator>Ondřej Vašík</dc:creator>
    <dc:date>2008-11-27T14:28:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15182">
    <title>credo</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15182</link>
    <description>Hi Jim and all you coreutils maintainers,

I've a feeling a tremendous amount of work has been done over
the past year. The coreutils are being perfected by the minute.
Might I take a moment to say: Thanks!

At the risk of sounding corny:

    Who's cute and cool in cure and chore?
    Why it's the cast of the coreutils corps!
    The crew who code because they char...


;-)
Bauke Jan Douma
</description>
    <dc:creator>Bauke Jan Douma</dc:creator>
    <dc:date>2008-11-26T22:14:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15179">
    <title>[bug #24949] coreutils pwd not implementing latest POSIX features</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15179</link>
    <description>
URL:
  &lt;http://savannah.gnu.org/bugs/?24949&gt;

                 Summary: coreutils pwd not implementing latest POSIX
features
                 Project: GNU Core Utilities
            Submitted by: psmith
            Submitted on: Wed 26 Nov 2008 03:50:44 PM EST
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

I've noticed that in the POSIX standard (The Open Group Base Specifications
Issue 6 IEEE Std 1003.1, 2004 Edition), the pwd utility is expected to take
two options:


SYNOPSIS
    pwd [-L | -P ]
        
DESCRIPTION
    The pwd utility shall write to standard output an absolute pathame
    of the current working directory, which does not contain the
    filenames dot or dot-dot.
        
OPTIONS
    The pwd utility shall conform to the Base Definitions volume of
    IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
        
    The following options shall be supported by the implementation:

    -L
        If the PWD environment variable contains an absolute pathname of
        the current directory that does not contain the filenames dot or
        dot-dot, pwd shall write this pathname to standard output.
        Otherwise, the -L option shall behave as the -P option.
    -P
        The absolute pathname written shall not contain filenames that,
        in the context of the pathname, refer to files of type symbolic
        link.

    If both -L and -P are specified, the last one shall apply. If
    neither -L nor -P is specified, the pwd utility shall behave as if
    -L had been specified.


It doesn't appear that the coreutils implementation of pwd supports this.

I realize that most shells including bash have a pwd builtin which is
typically used when the user runs "pwd".  However, pwd is not required to be a
shell builtin by POSIX, and so a strictly conforming sh implementation is not
required to provide it.  It seems to me that coreutils "pwd" should conform.

What do you all think?  I can provide a patch if it would be something you're
interested in.




    _______________________________________________________

Reply to this item at:

  &lt;http://savannah.gnu.org/bugs/?24949&gt;

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/
</description>
    <dc:creator>Paul D. Smith</dc:creator>
    <dc:date>2008-11-26T20:50:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15177">
    <title>[PATCH]: typo in last units factorization patch</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.core-utils.bugs/15177</link>
    <description>_______________________________________________
Bug-coreutils mailing list
Bug-coreutils&lt; at &gt;gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils
</description>
    <dc:creator>Ondřej Vašík</dc:creator>
    <dc:date>2008-11-26T15:06:38</dc:date>
  </item>
  <textinput about="http://search.gmane.org/?group=$group=gmane.comp.gnu.core-utils.bugs">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.gnu.core-utils.bugs</link>
  </textinput>
</rdf:RDF>
