Re: more 5.3.0 issues on cygwin

2005-01-24 Thread Jim Meyering
Eric Blake [EMAIL PROTECTED] wrote:
...
 However, the Makefile.am patches are still important to allow the
 tests/help-version script to succeed without filling the disk (otherwise,
 you eval `args=$yes.exe_args', then run `yes.exe .exe_args' which runs
 away, rather than the intended `yes --version').  Likewise, the system.h
 patch is necessary for df (NTFS uses 1k blocks as captured in S_BLKSIZE,
 but without the patch, ST_NBLOCKSIZE defaults to 512, so sizes were 50% of
 their correct value).

Thanks.  I've applied those.

 2005-01-17  Eric Blake  [EMAIL PROTECTED]  (tiny change)

   * src/Makefile.am (all_programs.list): Strip $(EXEEXT) and remove
   duplicates.
   * man/Makefile.am (all_programs): Revert previous patch; updated
   all_programs.list fixes this.
   (.x.1): No need to add $(EXEEXT).

 2005-01-03  Corinna Vinschen  [EMAIL PROTECTED]  (tiny change)

 * src/system.h: Use S_BLKSIZE value for ST_NBLOCKSIZE where
   available.


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


more 5.3.0 issues on cygwin

2005-01-17 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

First, a ping on
http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00063.html,
regarding non-portable group names (I have a cygwin box with the primary
group name of Domain Users, which breaks the assumptions of
tests/group-names that group names are space-separated).

Next, another $(EXEEXT) bug was still floating around, this time in
tests/Makefile.am, breaking the tests/help-version script.  I think it
would be easier to make the all_programs.list target of src/Makefile strip
$(EXEEXT) rather than forcing all callers (currently man/Makefile and
tests/Makefile) to do so, hence the attached patch.  This also stops
listing programs twice in the output, when they appear in both
EXTRA_PROGRAMS and in OPTIONAL_BIN_PROGRAMS or DF_PROG.

Finally, here are some trivial changes that have been part of the cygwin
release.  There are other changes in the cygwin install, but they are not
trivial (for example, making cp, mv, and ln smart enough to auto-append
.exe to the target if it was implied from the source name, since cygwin's
stat() on `progname' is designed to work even if the file is really named
`progname.exe').

2005-01-17  Eric Blake  [EMAIL PROTECTED]  (tiny change)

* src/Makefile.am (all_programs.list): Strip $(EXEEXT) and remove
duplicates.
* man/Makefile.am (all_programs): Revert previous patch; updated
all_programs.list fixes this.
(.x.1): No need to add $(EXEEXT).

2005-01-03  Corinna Vinschen  [EMAIL PROTECTED]  (tiny change)

* src/install.c (strip): Check for .exe here since strip doesn't.
* src/system.h: Use S_BLKSIZE value for ST_NBLOCKSIZE where
available.
* src/od.c (OPENMODE): New macro.
(open_next_file): Use OPENMODE in fopen call.

- --
Life is short - so eat dessert first!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB67nY84KuGfSFAYARAuL1AKCaEDY9WJC64Bs8zm6fYDK76yL+NACggo2D
SCGG2xDjXdlK7+fNNSrqHBw=
=mgTZ
-END PGP SIGNATURE-
Index: man/Makefile.am
===
RCS file: /cvsroot/coreutils/coreutils/man/Makefile.am,v
retrieving revision 1.36
diff -u -p -r1.36 Makefile.am
--- man/Makefile.am 11 Jan 2005 16:51:03 -  1.36
+++ man/Makefile.am 17 Jan 2005 13:09:06 -
@@ -128,10 +128,10 @@ mapped_name = `echo $*|sed 's/install/gi
@rm -f $@
@echo Updating man page $@;   \
mkdir $t;   \
-   (cd $t  $(LN_S) ../../src/$(mapped_name)$(EXEEXT) $*$(EXEEXT)); \
+   (cd $t  $(LN_S) ../../src/$(mapped_name) $*); \
$(PERL) -- $(srcdir)/help2man   \
--include=$(srcdir)/$*.x\
-   --output=$@ $t/$*$(EXEEXT)
+   --output=$@ $t/$*
@chmod a-w $@
@rm -rf $t
 
@@ -155,7 +155,7 @@ check-x-vs-1:
 
 all_programs = \
   (cd ../src  MAKEFLAGS= $(MAKE) -s all_programs.list)   \
-   | sed -e 's,$(EXEEXT)$$,,' | grep -v '\['
+   | grep -v '\['
 
 .PHONY: check-programs-vs-x
 check-programs-vs-x:
Index: src/Makefile.am
===
RCS file: /cvsroot/coreutils/coreutils/src/Makefile.am,v
retrieving revision 1.48
diff -u -p -r1.48 Makefile.am
--- src/Makefile.am 11 Jan 2005 16:50:27 -  1.48
+++ src/Makefile.am 17 Jan 2005 13:09:06 -
@@ -228,7 +228,8 @@ all_programs = \
   $(EXTRA_PROGRAMS)
 
 all_programs.list:
-   @echo $(all_programs) | tr ' ' '\n' | $(ASSORT)
+   @echo $(all_programs) | tr ' ' '\n' | sed -e 's,$(EXEEXT)$$,,' \
+ | $(ASSORT) -u
 
 pm = progs-makefile
 pr = progs-readme
Index: src/system.h
===
RCS file: /cvsroot/coreutils/coreutils/src/system.h,v
retrieving revision 1.98
diff -u -p -r1.98 system.h
--- src/system.h3 Jan 2005 23:43:39 -   1.98
+++ src/system.h17 Jan 2005 13:09:06 -
@@ -337,7 +337,11 @@ initialize_exit_failure (int status)
 #endif
 
 #ifndef ST_NBLOCKSIZE
-# define ST_NBLOCKSIZE 512
+# ifdef S_BLKSIZE
+#  define ST_NBLOCKSIZE S_BLKSIZE
+# else
+#  define ST_NBLOCKSIZE 512
+# endif
 #endif
 
 /* Redirection and wildcarding when done by the utility itself.
Index: src/install.c
===
RCS file: /cvsroot/coreutils/coreutils/src/install.c,v
retrieving revision 1.172
diff -u -p -r1.172 install.c
--- src/install.c   26 Nov 2004 07:39:32 -  1.172
+++ src/install.c   17 Jan 2005 13:09:07 -
@@ -566,6 +566,20 @@ strip (const char *path)
   error (EXIT_FAILURE, errno, _(fork system call failed));
   break;
 case 0:/* Child. */
+#ifdef __CYGWIN__
+  {
+

Re: more 5.3.0 issues on cygwin

2005-01-17 Thread Jim Meyering
Eric Blake [EMAIL PROTECTED] wrote:
...
 * src/od.c (OPENMODE): New macro.
 (open_next_file): Use OPENMODE in fopen call.
...
 Index: src/od.c
 ===
 RCS file: /cvsroot/coreutils/coreutils/src/od.c,v
 retrieving revision 1.152
 diff -u -p -r1.152 od.c
 --- src/od.c  28 Sep 2004 01:09:03 -  1.152
 +++ src/od.c  17 Jan 2005 13:09:07 -
 @@ -70,6 +70,12 @@ typedef unsigned long long int ulonglong
  typedef unsigned long int ulonglong_t;
  #endif

 +#ifdef O_BINARY
 +# define OPENMODE rb
 +#else
 +# define OPENMODE r
 +#endif
 +
  enum size_spec
{
  NO_SIZE,
 @@ -906,7 +912,7 @@ open_next_file (void)
   }
else
   {
 -   in_stream = fopen (input_filename, r);
 +   in_stream = fopen (input_filename, OPENMODE);
 if (in_stream == NULL)
   {
 error (0, errno, %s, input_filename);

Why is that needed?
od.c already does this:

  SET_BINARY (fileno (in_stream));

where that macro is defined in system.h:

#if O_BINARY
# ifndef __DJGPP__
#  define setmode _setmode
#  define fileno(_fp) _fileno (_fp)
# endif /* not DJGPP */
# define SET_MODE(_f, _m) setmode (_f, _m)
# define SET_BINARY(_f) do {if (!isatty(_f)) setmode (_f, O_BINARY);} while (0)

Maybe those #if directives don't work on your system?


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