Re: more gcc warnings

2005-07-16 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Paul Eggert on 7/15/2005 4:10 PM: For coreutils we don't need to worry about this. We can assume that if freopen (NULL, ...) is being called, then the call is either freopen (NULL, rb, stdin) or freopen (NULL, wb, stdout). With

Re: more gcc warnings

2005-07-16 Thread Paul Eggert
Eric Blake [EMAIL PROTECTED] writes: Of course, this is cygwin-specific; it would need accompanying autoconf magic and #ifdef'ery to install it only on platforms with O_BINARY and where freopen(NULL) doesn't work, without causing compile errors on other platforms. Thanks. Can you write the

Re: more gcc warnings

2005-07-15 Thread Paul Eggert
Eric Blake [EMAIL PROTECTED] writes: If all that changed was the addition or subtraction of O_APPEND, For coreutils we don't need to worry about this. We can assume that if freopen (NULL, ...) is being called, then the call is either freopen (NULL, rb, stdin) or freopen (NULL, wb, stdout).

Re: more gcc warnings

2005-07-14 Thread Eric Blake
Paul Eggert eggert at CS.UCLA.EDU writes: I dislike all that isatty stuff -- is there some way that we could easily remove it from the mainline sources, and put it in config.h or somewhere we we don't have to see it? For example, can we replace this: if (O_BINARY ! isatty

Re: more gcc warnings

2005-07-14 Thread Paul Eggert
Eric Blake [EMAIL PROTECTED] writes: As it is, you will need a wrapper for freopen. At least Solaris 8 and cygwin 1.5.18 choke on the program below, Solaris 8 won't choke with the way coreutils invokes it, since it always looks something like this: if (O_BINARY ! isatty

Re: text vs. binary [Re: more gcc warnings]

2005-07-12 Thread Paul Eggert
[EMAIL PROTECTED] (Eric Blake) writes: http://lists.gnu.org/archive/html/bug-coreutils/2005-05/msg00136.html I just looked at that, and don't really follow all the DOS stuff, but have these comments anyway: cat - POSIX requires binary input and output, and this already has -B option to

Re: text vs. binary [Re: more gcc warnings]

2005-07-12 Thread Bob Proulx
Paul Eggert wrote: [EMAIL PROTECTED] (Eric Blake) writes: nohup - POSIX requires that stdout from utility may to go to nohup.out, so nohup.out should probably be opened in same mode as nohup's stdout (if it exists) nohup.out is currently opened in text mode. Let's just leave that

Re: more gcc warnings

2005-07-11 Thread Paul Eggert
[EMAIL PROTECTED] (Eric Blake) writes: cygwin's headers are poorly documented; I often resort to grepping /usr/include. setmode() is in io.h, along with get_osfhandle and a redundant declaration of access(). I've been putting off cleaning up this mess, but I found the time this weekend to

text vs. binary [Re: more gcc warnings]

2005-07-11 Thread Eric Blake
I've been putting off cleaning up this mess, but I found the time this weekend to give it a start. I installed the following patch. It avoids the use of setmode and io.h entirely, and it cleans up some of the inconsistencies in the code (in some cases, they were bugs that even infected the

Re: more gcc warnings

2005-07-09 Thread Paul Eggert
Paul Eggert [EMAIL PROTECTED] writes: Does the following patch fix your problems with Cygwin? 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. ___ Bug-coreutils

Re: more gcc warnings

2005-07-09 Thread Eric Blake
-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.

Re: more gcc warnings

2005-07-09 Thread Paul Eggert
Eric Blake [EMAIL PROTECTED] writes: One more that I hadn't paid attention to - for systems with O_BINARY, the macro SET_BINARY was using setmode() without a prototype, Which include file declares setmode()? Where is this documented? I looked in the cygwin web site without much luck. Should

Re: more gcc warnings

2005-07-09 Thread Eric Blake
One more that I hadn't paid attention to - for systems with O_BINARY, the macro SET_BINARY was using setmode() without a prototype, Which include file declares setmode()? Where is this documented? I looked in the cygwin web site without much luck. cygwin's headers are poorly documented;

more gcc warnings

2005-07-08 Thread Eric Blake
A couple of porting problems caught by compiling with gcc -Wall on cygwin: ls.c and stty.c use ioctl without including sys/ioctl.h, triggering a warning about implicit declarations. Even worse, since ioctl is a varargs function, this is undefined C (luckily, it compiles and links okay on

Re: more gcc warnings

2005-07-08 Thread Eric Blake
[EMAIL PROTECTED] (Eric Blake) writes: ls.c and stty.c use ioctl without including sys/ioctl.h, triggering a warning about implicit declarations. Even worse, since ioctl is a varargs function, this is undefined C (luckily, it compiles and links okay on cygwin). Thanks for reporting

Re: more gcc warnings

2005-07-08 Thread Paul Eggert
[EMAIL PROTECTED] (Eric Blake) writes: ls.c and stty.c use ioctl without including sys/ioctl.h, triggering a warning about implicit declarations. Even worse, since ioctl is a varargs function, this is undefined C (luckily, it compiles and links okay on cygwin). Thanks for reporting this.

Re: more gcc warnings

2005-07-08 Thread Paul Eggert
Does the following patch fix your problems with Cygwin? (I haven't had time to write a changelog entry for it.) Most likely it won't work on some older hosts, but we can cross that bridge if we come to it. Index: configure.ac ===