Re: new snapshot available: coreutils-7.2.66-428db1

2009-04-30 Thread Bruno Haible
Hi Jim,

 Bruno, as Elbert suggests, it looks like this change from last week is the 
 cause:
 
 Avoid link error when creating a namespace clean library.
 * lib/math.in.h (gl_signbitf, gl_signbitd, gl_signbitl): Don't define
 as macro with arguments if already defined as an alias.
 * lib/signbitf.c (gl_signbitf): Don't undefine.
 * lib/signbitd.c (gl_signbitd): Don't undefine.
 * lib/signbitl.c (gl_signbitl): Don't undefine.

Yes, you're right. This should fix it:


2009-04-30  Bruno Haible  br...@clisp.org

Fix bug introduced on 2009-04-25.
* lib/math.in.h (gl_signbitf_OPTIMIZED_MACRO,
gl_signbitd_OPTIMIZED_MACRO, gl_signbitl_OPTIMIZED_MACRO): New macros.
* lib/signbitf.c (gl_signbitd): Undefine if gl_signbitf_OPTIMIZED_MACRO
is defined.
* lib/signbitd.c (gl_signbitd): Undefine if gl_signbitd_OPTIMIZED_MACRO
is defined.
* lib/signbitl.c (gl_signbitd): Undefine if gl_signbitl_OPTIMIZED_MACRO
is defined.
Reported by Elbert_Pol elbert@gmail.com.

--- lib/math.in.h.orig  2009-04-30 13:00:25.0 +0200
+++ lib/math.in.h   2009-04-30 12:59:59.0 +0200
@@ -519,6 +519,7 @@
 extern int gl_signbitl (long double arg);
 #  if __GNUC__ = 2  !__STRICT_ANSI__
 #   if defined FLT_SIGNBIT_WORD  defined FLT_SIGNBIT_BIT  !defined 
gl_signbitf
+#define gl_signbitf_OPTIMIZED_MACRO
 #define gl_signbitf(arg) \
({ union { float _value;
\
   unsigned int _word[(sizeof (float) + sizeof (unsigned int) - 
1) / sizeof (unsigned int)]; \
@@ -528,6 +529,7 @@
 })
 #   endif
 #   if defined DBL_SIGNBIT_WORD  defined DBL_SIGNBIT_BIT  !defined 
gl_signbitd
+#define gl_signbitd_OPTIMIZED_MACRO
 #define gl_signbitd(arg) \
({ union { double _value;   
\
   unsigned int _word[(sizeof (double) + sizeof (unsigned int) 
- 1) / sizeof (unsigned int)]; \
@@ -537,6 +539,7 @@
 })
 #   endif
 #   if defined LDBL_SIGNBIT_WORD  defined LDBL_SIGNBIT_BIT  !defined 
gl_signbitl
+#define gl_signbitl_OPTIMIZED_MACRO
 #define gl_signbitl(arg) \
({ union { long double _value;  \
   unsigned int _word[(sizeof (long double) + sizeof (unsigned 
int) - 1) / sizeof (unsigned int)]; \
--- lib/signbitd.c.orig 2009-04-30 13:00:25.0 +0200
+++ lib/signbitd.c  2009-04-30 12:59:59.0 +0200
@@ -23,6 +23,10 @@
 #include isnand-nolibm.h
 #include float+.h
 
+#ifdef gl_signbitd_OPTIMIZED_MACRO
+# undef gl_signbitd
+#endif
+
 int
 gl_signbitd (double arg)
 {
--- lib/signbitf.c.orig 2009-04-30 13:00:25.0 +0200
+++ lib/signbitf.c  2009-04-30 12:59:59.0 +0200
@@ -23,6 +23,10 @@
 #include isnanf-nolibm.h
 #include float+.h
 
+#ifdef gl_signbitf_OPTIMIZED_MACRO
+# undef gl_signbitf
+#endif
+
 int
 gl_signbitf (float arg)
 {
--- lib/signbitl.c.orig 2009-04-30 13:00:25.0 +0200
+++ lib/signbitl.c  2009-04-30 12:59:59.0 +0200
@@ -23,6 +23,10 @@
 #include isnanl-nolibm.h
 #include float+.h
 
+#ifdef gl_signbitl_OPTIMIZED_MACRO
+# undef gl_signbitl
+#endif
+
 int
 gl_signbitl (long double arg)
 {





___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: new snapshot available: coreutils-7.2.66-428db1

2009-04-30 Thread Jim Meyering
James Youngman wrote:
 make check fails in doc on a vanilla NetBSD5.0 system (released
 yesterday) because no version of Perl is installed by default.   In
 fact make fails without explanation:

 $ make check
 *** Error code 1

 Stop.
 make: stopped in /home/james/tmp/cu/coreutils-7.2.66-428db1/doc


 I guess this is because some failing command starts with @.   Anyway,
 re-running with make debugging turned on, we find that the problem is
 that although configure determined that Perl was missing, it still
 decides to run it:

Hi James,

Thanks for reporting that, and especially for testing on a
just-released system!

The second change set below should fix that.

From 71ebb443d816caad6f4142403d57711d8bf2205e Mon Sep 17 00:00:00 2001
From: Jim Meyering meyer...@redhat.com
Date: Thu, 30 Apr 2009 13:44:48 +0200
Subject: [PATCH 1/2] build: doc: emit something for each make check-run rule

* doc/Makefile.am: Use $(AM_V_GEN) in place of each leading @.
(check-texinfo): Align line-continuation backslashes.
---
 doc/Makefile.am |   38 +++---
 1 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/doc/Makefile.am b/doc/Makefile.am
index 89f72ce..57063df 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -60,45 +60,45 @@ syntax_checks = \

 # List words/regexps here that should not appear in the texinfo documentation.
 check-texinfo: $(syntax_checks)
-   @fail=0; \
-   grep '@url{' $(srcdir)/*.texi  fail=1; \
-   grep '\$$@' $(srcdir)/*.texi  fail=1; \
-   grep -n '[^[:punct:]...@footnote' $(srcdir)/*.texi  fail=1; \
-   grep -n filename $(srcdir)/*.texi \
-   | $(EGREP) -v 'setfilename|[{]filename[}]' \
-  fail=1; \
-   $(PERL) -e 1 2 /dev/null  { $(PERL) -ne \
+   $(AM_V_GEN)fail=0;  \
+   grep '@url{' $(srcdir)/*.texi  fail=1;\
+   grep '\$$@' $(srcdir)/*.texi  fail=1;\
+   grep -n '[^[:punct:]...@footnote' $(srcdir)/*.texi  fail=1;   \
+   grep -n filename $(srcdir)/*.texi   \
+   | $(EGREP) -v 'setfilename|[{]filename[}]'  \
+  fail=1;\
+   $(PERL) -e 1 2 /dev/null  { $(PERL) -ne  \
  '/\bPOSIX\b/  !/\...@acronym{posix}/  !/^\* / || /{posix}/ and 
print,exit 1' \
- $(srcdir)/*.texi 2 /dev/null || fail=1; }; \
-   $(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi  fail=1; \
-   $(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/*.texi \
+ $(srcdir)/*.texi 2 /dev/null || fail=1; };   \
+   $(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi  fail=1;   \
+   $(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/*.texi  \
  | $(EGREP) -v 'search path|@vindex PATH$$|@env[{]PATH[}]'  fail=1; \
exit $$fail

 # Use `time zone', not `timezone'.
 sc-avoid-timezone:
-   @$(EGREP) timezone $(srcdir)/*.texi  exit 1 || :
+   $(AM_V_GEN)$(EGREP) timezone $(srcdir)/*.texi  exit 1 || :

 # Check for insufficient exponent grouping, e.g.,
 # @math{2^64} should be @math{2^{64}}.
 sc-exponent-grouping:
-   @$(EGREP) '\{.*\^[0-9][0-9]' $(srcdir)/*.texi  exit 1 || :
+   $(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(srcdir)/*.texi  exit 1 || :

 # E.g., use @sc{nul}, not NUL.
 sc-use-small-caps-NUL:
-   @$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi  exit 1 || :
+   $(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi  exit 1 || :

 # Say I/O, not IO.
 sc-avoid-io:
-   @$(EGREP) '$(_W)IO$(W_)' $(srcdir)/*.texi  exit 1 || :
+   $(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(srcdir)/*.texi  exit 1 || :

 # I prefer nonzero over non-zero.
 sc-avoid-non-zero:
-   @$(EGREP) non-zero $(srcdir)/*.texi  exit 1 || :
+   $(AM_V_GEN)$(EGREP) non-zero $(srcdir)/*.texi  exit 1 || :

 # Use `zeros', not `zeroes' (nothing wrong with `zeroes'. just be consistent).
 sc-avoid-zeroes:
-   @$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi  exit 1 || :
+   $(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi  exit 1 || 
:

 # ME = $(subdir)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
 ME = doc/Makefile
@@ -115,7 +115,7 @@ find_upper_case_var =   \
  } \
END {$$m and (warn $(ME): do not use upper case in \...@var{...}\n), exit 
1}'
 sc-lower-case-var:
-   @$(PERL) -e 1 2 /dev/null  \
- $(PERL) -lne $(find_upper_case_var) $(srcdir)/*.texi
+   $(AM_V_GEN)$(PERL) -e 1 2 /dev/null \
+  $(PERL) -lne $(find_upper_case_var) $(srcdir)/*.texi

 check: check-texinfo
--
1.6.3.rc3.212.g8c698


From 0e945ebcc5cb018771819f8b91737db3298bab02 Mon Sep 17 00:00:00 2001
From: Jim Meyering meyer...@redhat.com
Date: Thu, 30 Apr 2009 13:50:40 +0200
Subject: [PATCH 2/2] build: make check now fails in a friendlier manner for 
missing Perl

* doc/Makefile.am 

Re: new snapshot available: coreutils-7.2.66-428db1

2009-04-30 Thread James Youngman
make check fails in doc on a vanilla NetBSD5.0 system (released
yesterday) because no version of Perl is installed by default.   In
fact make fails without explanation:

$ make check
*** Error code 1

Stop.
make: stopped in /home/james/tmp/cu/coreutils-7.2.66-428db1/doc


I guess this is because some failing command starts with @.   Anyway,
re-running with make debugging turned on, we find that the problem is
that although configure determined that Perl was missing, it still
decides to run it:


$ make -d A check
[...]
*** Failed target:  sc-lower-case-var
*** Failed command: /bin/ksh
/home/james/tmp/cu/coreutils-7.2.66-428db1/build-aux/missing --run
perl -e 1 2 /dev/null  /bin/ksh
/home/james/tmp/cu/coreutils-7.2.66-428db1/build-aux/missing --run
perl -lne '/\...@var{/ or next; while (/\...@var{(.+?)}/g) { $v = $1; $v =~
/[A-Z]/  $v !~ /^\\/ and (print $ARGV:$.:$_), $m = 1 } END {$m and
(warn doc/Makefile: do not use upper case in \...@var{...}\n), exit 1}'
./*.texi
*** Error code 1

Stop.
make: stopped in /home/james/tmp/cu/coreutils-7.2.66-428db1/doc
Applying :@ to 
Result of :@ is 


I believe the cause is not that I changed a timestamp and hence forced
a generated file to be regenerated, but simply that make check will
fail without Perl:

doc/Makefile contains:

syntax_checks = \
  sc-avoid-io   \
  sc-avoid-non-zero \
  sc-avoid-timezone \
  sc-avoid-zeroes   \
  sc-exponent-grouping  \
  sc-lower-case-var \
  sc-use-small-caps-NUL

[...]

sc-lower-case-var:
@$(PERL) -e 1 2 /dev/null  \
  $(PERL) -lne $(find_upper_case_var) $(srcdir)/*.texi



From config.log:
configure:27190: checking for perl5.005 or newer
configure:27214: result: no
configure:27216: WARNING:
WARNING: You don't seem to have perl5.005 or newer installed, or you lack
 a usable version of the Perl File::Compare module.  As a result,
 you may be unable to run a few tests or to regenerate certain
 files if you modify the sources from which they are derived.

configure:27247: checking for sys/pstat.h



James.


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


mv italian translation

2009-04-30 Thread Stefano Mersi

How to reproduce the bug
# mkdir myDir
# mv myDir myDir

when trying to move a diretcory into itself the progam says in italian:
mv: impossibile spostare myDir in una sottodirectory di sé stessa, 
myDir/myDir


There is a grammar error:
sé stessa should become se stessa

Thanks



___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: mv italian translation

2009-04-30 Thread Philip Rowlands

On Thu, 30 Apr 2009, Stefano Mersi wrote:


when trying to move a diretcory into itself the progam says in italian:
mv: impossibile spostare myDir in una sottodirectory di sé stessa, 
myDir/myDir


There is a grammar error:
sé stessa should become se stessa


Please report translations bugs here:
http://translationproject.org/team/it.html


Cheers,
Phil


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: new snapshot available: coreutils-7.2.66-428db1

2009-04-30 Thread Jim Meyering
Bruno Haible wrote:
 Yes, you're right. This should fix it:

 2009-04-30  Bruno Haible  br...@clisp.org

   Fix bug introduced on 2009-04-25.
   * lib/math.in.h (gl_signbitf_OPTIMIZED_MACRO,
   gl_signbitd_OPTIMIZED_MACRO, gl_signbitl_OPTIMIZED_MACRO): New macros.
   * lib/signbitf.c (gl_signbitd): Undefine if gl_signbitf_OPTIMIZED_MACRO
   is defined.
   * lib/signbitd.c (gl_signbitd): Undefine if gl_signbitd_OPTIMIZED_MACRO
   is defined.
   * lib/signbitl.c (gl_signbitd): Undefine if gl_signbitl_OPTIMIZED_MACRO
   is defined.
   Reported by Elbert_Pol elbert@gmail.com.

Thanks for the quick fix.
I've just published another coreutils snapshot.


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


new snapshot available: coreutils-7.2.69-269b

2009-04-30 Thread Jim Meyering
So far there have been only two problems (thanks for the testing
and reports, Elbert Pol and James Youngman!) and both are fixed
in this new snapshot.

I'll release coreutils-7.3 tomorrow if this no-known-problems
condition persists for a few hours longer.

coreutils snapshot:
  http://meyering.net/cu/coreutils-ss.tar.gz  9.3 MB
  http://meyering.net/cu/coreutils-ss.tar.xz  3.9 MB
  http://meyering.net/cu/coreutils-ss.tar.gz.sig
  http://meyering.net/cu/coreutils-ss.tar.xz.sig
aka
  http://meyering.net/cu/coreutils-7.2.69-269b.tar.gz
  http://meyering.net/cu/coreutils-7.2.69-269b.tar.xz

Changes in coreutils since 7.2.66-428db1:

Jim Meyering (4):
  build: update from gnulib, for the lib/*-state.c compilation fixes
  build: doc: emit something for each make check-run rule
  build: make check now fails in a friendlier manner for missing Perl
  build: update from gnulib, for fixed lib/signbitl.c


Changes in gnulib since 7.2.66-428db1:
* gnulib c335e0e...278d609 (22):
   Fix compilation error introduced on 2009-04-25.
   autoupdate
   Comment tweaks.
   Fix a compilation error.
   autoupdate
   New module 'libunistring'.
   maint.mk: allow package-specific header to provide config.h
   top/maint.mk (sc_avoid_if_before_free): Except useless-if-before-free 
script.
   maintainer-makefile: depend on all required helper scripts
   Make the lib vs. lib64 recognition work on openSUSE 11 with gcc -m32.
   Simplify gl_LIBSIGSEGV.
   Correct last commits.
   Correct last commit.
   Correct last commit.
   Simplify calling convention of u*_conv_from_encoding.
   Trivial simplification of last commit.
   Simplify calling convention of u*_conv_to_encoding.
   Avoid test failures on AIX and OSF/1.
   Require a POSIX compliant malloc().
   Avoid link error when creating a namespace clean library.
   vc-list-files: fix another quoting bug
   vc-list-files: fix shell quoting error


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils


Re: new snapshot available: coreutils-7.2.69-269b

2009-04-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Jim Meyering on 4/30/2009 10:14 AM:
 So far there have been only two problems (thanks for the testing
 and reports, Elbert Pol and James Youngman!) and both are fixed
 in this new snapshot.
 
 I'll release coreutils-7.3 tomorrow if this no-known-problems
 condition persists for a few hours longer.

How about this quickie cleanup patch?  stdopen is unused (was it ever
used? only lib/ChangeLog-2007 mentions it), and it seems that our current
reliance on gnulib's stdio--.h and friends does the same job.

- --
Don't work too hard, make some time for fun as well!

Eric Blake e...@byu.net
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkn5+/UACgkQ84KuGfSFAYA1CQCeLCZZ/ashgBCutJVSU3i3DjBU
tigAoJI58uhBKXwAcLEEf9hkXaGhYnSQ
=+CpQ
-END PGP SIGNATURE-
From f69e20799be0829f9b710b593d33e10720e59096 Mon Sep 17 00:00:00 2001
From: Eric Blake e...@byu.net
Date: Thu, 30 Apr 2009 13:18:49 -0600
Subject: [PATCH] stdopen: remove unused code

* m4/stdopen.m4: Delete now-unused file.
* lib/stdopen.h: Likewise.
* lib/stdopen.c: Likewise.
---
 lib/stdopen.c |   74 -
 lib/stdopen.h |   16 
 m4/stdopen.m4 |   13 --
 3 files changed, 0 insertions(+), 103 deletions(-)
 delete mode 100644 lib/stdopen.c
 delete mode 100644 lib/stdopen.h
 delete mode 100644 m4/stdopen.m4

diff --git a/lib/stdopen.c b/lib/stdopen.c
deleted file mode 100644
index e9b5544..000
--- a/lib/stdopen.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* stdopen.c - ensure that the three standard file descriptors are in use
-
-   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
-
-   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/.  */
-
-/* Written by Paul Eggert and Jim Meyering.  */
-
-#include config.h
-
-#include stdopen.h
-
-#include sys/types.h
-#include sys/stat.h
-#include fcntl.h
-#include unistd.h
-#include errno.h
-
-/* Try to ensure that all of the standard file numbers (0, 1, 2)
-   are in use.  Without this, each application would have to guard
-   every call to open, dup, fopen, etc. with tests to ensure they
-   don't use one of the special file numbers when opening a file.
-   Return false if at least one of the file descriptors is initially
-   closed and an attempt to reopen it fails.  Otherwise, return true.  */
-bool
-stdopen (void)
-{
-  int fd;
-  bool ok = true;
-
-  for (fd = 0; fd = 2; fd++)
-{
-  if (fcntl (fd, F_GETFD)  0)
-   {
- if (errno != EBADF)
-   ok = false;
- else
-   {
- static const int contrary_mode[]
-   = { O_WRONLY, O_RDONLY, O_RDONLY };
- int mode = contrary_mode[fd];
- int new_fd;
- /* Open /dev/null with the contrary mode so that the typical
-read (stdin) or write (stdout, stderr) operation will fail.
-With descriptor 0, we can do even better on systems that
-have /dev/full, by opening that write-only instead of
-/dev/null.  The only drawback is that a write-provoked
-failure comes with a misleading errno value, ENOSPC.  */
- if (mode == O_RDONLY
- || (new_fd = open (/dev/full, mode) != fd))
-   new_fd = open (/dev/null, mode);
- if (new_fd != fd)
-   {
- if (0 = new_fd)
-   close (new_fd);
- ok = false;
-   }
-   }
-   }
-}
-
-  return ok;
-}
diff --git a/lib/stdopen.h b/lib/stdopen.h
deleted file mode 100644
index d54e5f1..000
--- a/lib/stdopen.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef STDOPEN_H
-# define STDOPEN_H 1
-
-# include stdbool.h
-
-# ifdef __cplusplus
-extern C {
-# endif
-
-bool stdopen (void);
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif
diff --git a/m4/stdopen.m4 b/m4/stdopen.m4
deleted file mode 100644
index b18c22d..000
--- a/m4/stdopen.m4
+++ /dev/null
@@ -1,13 +0,0 @@
-#serial 1
-dnl Copyright (C) 2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, 

Re: new snapshot available: coreutils-7.2.69-269b

2009-04-30 Thread Jim Meyering
Eric Blake wrote:
 According to Jim Meyering on 4/30/2009 10:14 AM:
 So far there have been only two problems (thanks for the testing
 and reports, Elbert Pol and James Youngman!) and both are fixed
 in this new snapshot.

 I'll release coreutils-7.3 tomorrow if this no-known-problems
 condition persists for a few hours longer.

 How about this quickie cleanup patch?  stdopen is unused (was it ever
 used? only lib/ChangeLog-2007 mentions it), and it seems that our current
 reliance on gnulib's stdio--.h and friends does the same job.

Yes, I know it's unused.
I've refrained from removing it because it
demonstrates a sometimes-useful alternate paradigm.
But removing it is the way to go.  This isn't the place for it.

Please go ahead and remove it.


___
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils