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>2001-04-19 01:10:15 +0400
committerChristopher Faylor <me@cgf.cx>2001-04-19 01:10:15 +0400
commit0381fec68f46471d29d3b87c5361e05fcdeb2cd5 (patch)
tree718cfaf2d3d8734c48f8957892329c0e8fc2fbfc /winsup/cygwin/select.cc
parenta2d47fe9d983ec85075172211172af9e5ab4054f (diff)
Throughout, change fdtab references to cygheap->fdtab.
* child_info.h (cygheap_exec_info): Eliminate special fdtab stuff. * spawn.cc (spawn_guts): Ditto. * cygheap.cc (cygheap_init): Initialize fdtab, if appropriate. * cygheap.h (CYGHEAPSIZE): Include size of init_cygheap. (_cmalloc_entry): Include fdtab here. * dtable.h (dtable): Declare/define new methods. * dtable.cc (dtable::vfork_child_fixup): New method. (dtable::fixup_after_exec): Remove unneeded extra arguments. * dcrt0.cc (dll_crt0_1): Ditto. * environ.cc (getwinenv): Use case sensitive comparison. (winenv): Make a copy of environment cache to avoid realloc problems when duplicate environment variables exist in the environment. (From Egor Duda) * net.cc (cygwin_socket): Revert Apr 14 change. * include/sys/file.h: Protect against previous X_OK definition. * passwd.cc: Eliminate passwd_sem throughout. * security.cc: Ditto. * cygwin.din: Export New functions. * passwd.cc (read_etc_passwd): Make race safe. (getpwuid_r): New function. (getpwnam_r): New function.
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r--winsup/cygwin/select.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc
index db59e5834..c23073918 100644
--- a/winsup/cygwin/select.cc
+++ b/winsup/cygwin/select.cc
@@ -36,6 +36,7 @@ details. */
#include "cygerrno.h"
#include "fhandler.h"
#include "dtable.h"
+#include "cygheap.h"
#include "sync.h"
#include "sigproc.h"
#include "perthread.h"
@@ -92,7 +93,7 @@ fhandler_##what::ready_for_read (int fd, DWORD howlong, int ignra) \
me.fd = fd; \
(void) select_read (&me); \
while (!peek_##what (&me, ignra) && howlong == INFINITE) \
- if (fd >= 0 && fdtab.not_open (fd)) \
+ if (fd >= 0 && cygheap->fdtab.not_open (fd)) \
break; \
else if (WaitForSingleObject (signal_arrived, 10) == WAIT_OBJECT_0) \
break; \
@@ -101,7 +102,7 @@ fhandler_##what::ready_for_read (int fd, DWORD howlong, int ignra) \
#define set_handle_or_return_if_not_open(h, s) \
h = (s)->fh->get_handle (); \
- if (fdtab.not_open ((s)->fd)) \
+ if (cygheap->fdtab.not_open ((s)->fd)) \
{ \
(s)->saw_error = TRUE; \
set_errno (EBADF); \
@@ -211,11 +212,11 @@ select_stuff::test_and_set (int i, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds)
{
select_record *s = NULL;
- if (UNIX_FD_ISSET (i, readfds) && (s = fdtab.select_read (i, s)) == NULL)
+ if (UNIX_FD_ISSET (i, readfds) && (s = cygheap->fdtab.select_read (i, s)) == NULL)
return 0; /* error */
- if (UNIX_FD_ISSET (i, writefds) && (s = fdtab.select_write (i, s)) == NULL)
+ if (UNIX_FD_ISSET (i, writefds) && (s = cygheap->fdtab.select_write (i, s)) == NULL)
return 0; /* error */
- if (UNIX_FD_ISSET (i, exceptfds) && (s = fdtab.select_except (i, s)) == NULL)
+ if (UNIX_FD_ISSET (i, exceptfds) && (s = cygheap->fdtab.select_except (i, s)) == NULL)
return 0; /* error */
if (s == NULL)
return 1; /* nothing to do */