OSDN Git Service

* winsup.h: Change strchr inline for strange gcc problem.
authorcgf <cgf>
Thu, 10 Aug 2000 19:33:54 +0000 (19:33 +0000)
committercgf <cgf>
Thu, 10 Aug 2000 19:33:54 +0000 (19:33 +0000)
* select.cc (select_stuff::wait): Bounds check w4 array.

winsup/cygwin/ChangeLog
winsup/cygwin/fhandler.cc
winsup/cygwin/select.cc
winsup/cygwin/winsup.h

index 5874261..d8dbddb 100644 (file)
@@ -1,3 +1,8 @@
+Thu Aug 10 15:31:39 2000  Christopher Faylor <cgf@cygnus.com>
+
+       * winsup.h: Change strchr inline for strange gcc problem.
+       * select.cc (select_stuff::wait): Bounds check w4 array.
+
 Thu Aug 10 15:17:53 2000  Christopher Faylor <cgf@cygnus.com>
 
        * dir.cc (readdir): Ensure that errno is *only* set when we've run out
index 46fb51e..5e84dd5 100644 (file)
@@ -13,6 +13,7 @@ details. */
 #include <errno.h>
 #include <unistd.h>
 #include <stdlib.h>
+#include <string.h>
 
 static NO_COPY const int CHUNK_SIZE = 1024; /* Used for crlf conversions */
 
index 6d2296b..bb8c355 100644 (file)
@@ -250,6 +250,11 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
      counting the number of active fds. */
   while ((s = s->next))
     {
+      if (m > MAXIMUM_WAIT_OBJECTS)
+       {
+         set_errno (EINVAL);
+         return -1;
+       }
       if (!s->startup (s, this))
        {
          __seterrno ();
index ff68462..5094028 100644 (file)
@@ -38,7 +38,7 @@ details. */
 
 #undef strchr
 #define strchr cygwin_strchr
-extern inline char * strchr(const char * s, int c)
+extern "C" inline __stdcall char * strchr(const char * s, int c)
 {
 register char * __res;
 __asm__ __volatile__(