-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Paul Eggert on 7/9/2005 1:40 AM:
> 
>>Does the following patch fix your problems with Cygwin?

It hasn't hit anonymous CVS yet, but manual application of the patch from
your email silenced gcc -Wall, so the problem has been addressed.  Thanks
for your help!

> Clearly the stropt.h -> stropts.h fix was needed, so I installed that
> patch.  If you still have problems with Cygwin please let us know.
> 

One more that I hadn't paid attention to - for systems with O_BINARY, the
macro SET_BINARY was using setmode() without a prototype, and cksum.c
calls SET_BINARY while using fileno() without a prototype.  This fixes it
for cygwin, but leaves other O_BINARY hosts (such as mingw) as is unless a
maintainer for those ports chimes in.  Should <stdio.h> be included in
"system.h", adding bulk to all the *.c files even though it only helps
one, or should we redo this patch to just fix cksum.c to include <stdio.h>
(perhaps conditioned on O_BINARY which implies the use of fileno)?  There
are a couple of other programs (such as expand.c) that only call fileno
inside the SET_BINARY macro, but at least they already include <stdio.h>.

On an unrelated question, I noticed that some files have copyright lines
that don't match GNU coding standards.  For example, ls.c has

Copyright (C) 85, 88, 90, 91, 1995-2005 Free Software Foundation, Inc.

http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices states
"Do not abbreviate the year list using a range; for instance, do not write
`1996--1998'; instead, write `1996, 1997, 1998'. Do write each relevant
year as a four-digit number. In the normal course of maintenance, you may
come across copyright notices which omit the century, as in `1996, 97,
98'?change these to include the century. However, there is no need to
systematically change the notice in every old file."

2005-07-09  Eric Blake  <[EMAIL PROTECTED]>

        * src/system.h [O_BINARY && __CYGWIN__]: Include actual headers
        for setmode and fileno.

Index: src/system.h
===================================================================
RCS file: /cvsroot/coreutils/coreutils/src/system.h,v
retrieving revision 1.132
diff -u -p -r1.132 system.h
- --- src/system.h        6 Jul 2005 09:34:09 -0000       1.132
+++ src/system.h        9 Jul 2005 12:34:13 -0000
@@ -217,7 +217,10 @@ initialize_exit_failure (int status)
 #endif

 #if O_BINARY
- -# ifndef __DJGPP__
+# if defined __CYGWIN__
+#  include <io.h>
+#  include <stdio.h>
+# elif !defined __DJGPP__
 #  define setmode _setmode
 #  define fileno(_fp) _fileno (_fp)
 # endif /* not DJGPP */

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

Eric Blake             [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCz8lM84KuGfSFAYARAvvlAJ9RX/Ndg1elQiDsoXfD7yiCI+alwgCdFN8Y
FoGlwtOEx8VxFaRsCUeCux4=
=UUqW
-----END PGP SIGNATURE-----


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

Reply via email to