bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

src/client.c & select


From: Conrad T. Pino
Subject: src/client.c & select
Date: Tue, 27 Sep 2005 23:11:57 -0700

Hi Derek,

I'm looking at where we're using "select" function.

What's your take on this patch?

Conrad

Index: src/client.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/client.c,v
retrieving revision 1.431
diff -u -p -r1.431 client.c
--- src/client.c        25 Sep 2005 00:28:51 -0000      1.431
+++ src/client.c        28 Sep 2005 06:09:42 -0000
@@ -2807,8 +2807,10 @@ handle_wrapper_rcs_option (char *args, s
 static void
 handle_m (char *args, size_t len)
 {
+#if ! WOE32
     fd_set wfds;
     int s;
+#endif
 
     /* In the case where stdout and stderr point to the same place,
        fflushing stderr will make output happen in the correct order.
@@ -2817,12 +2819,14 @@ handle_m (char *args, size_t len)
        based on being confused between default buffering between
        stdout and stderr.  But I'm not sure).  */
     fflush (stderr);
+#if ! WOE32
     FD_ZERO (&wfds);
     FD_SET (STDOUT_FILENO, &wfds);
     errno = 0;
     s = select (STDOUT_FILENO+1, NULL, &wfds, NULL, NULL);
     if (s < 1 && errno != 0)
         perror ("cannot write to stdout");
+#endif
     fwrite (args, sizeof *args, len, stdout);
     putc ('\n', stdout);
 }
@@ -2868,12 +2872,15 @@ handle_mbinary (char *args, size_t len)
 static void
 handle_e (char *args, size_t len)
 {
+#if ! WOE32
     fd_set wfds;
     int s;
+#endif
 
     /* In the case where stdout and stderr point to the same place,
        fflushing stdout will make output happen in the correct order.  */
     fflush (stdout);
+#if ! WOE32
     FD_ZERO (&wfds);
     FD_SET (STDERR_FILENO, &wfds);
     errno = 0;
@@ -2886,6 +2893,7 @@ handle_e (char *args, size_t len)
      */
     if (s < 1 && errno != 0)
         fperrmsg (stdout, 1, errno, "cannot write to stderr");
+#endif
     fwrite (args, sizeof *args, len, stderr);
     putc ('\n', stderr);
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]