Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-08-10 23:33:54 +0400
committerChristopher Faylor <me@cgf.cx>2000-08-10 23:33:54 +0400
commitb5ae313ab59b7098d554245f60e969d305c03616 (patch)
treea54329bb55765e9ed5c940f4c4ef598d25681238
parentb58f5598cbc77801bdbcc1de4d2fe0027fb68493 (diff)
* winsup.h: Change strchr inline for strange gcc problem.
* select.cc (select_stuff::wait): Bounds check w4 array.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler.cc1
-rw-r--r--winsup/cygwin/select.cc5
-rw-r--r--winsup/cygwin/winsup.h2
4 files changed, 12 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 587426151..d8dbddbd1 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 46fb51e35..5e84dd57e 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -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 */
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index 6d2296b95..bb8c35586 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -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 ();
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
index ff684628e..509402857 100644
--- a/winsup/cygwin/winsup.h
+++ b/winsup/cygwin/winsup.h
@@ -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__(