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:
authorEric Blake <eblake@redhat.com>2009-09-22 08:09:03 +0400
committerEric Blake <eblake@redhat.com>2009-09-22 08:09:03 +0400
commit29bca9bb0c27d78ad328d8b8e9589535bf998a59 (patch)
tree90f5a4d416f4c89064e1f0770e4424d450fe7d6f /winsup/cygwin/dtable.h
parenta7b24e14d7d38f234312c59612d4eed78835ed5b (diff)
Match dup2 and fcntl error values to POSIX.
* dtable.h (OPEN_MAX_MAX): New macro. * resource.cc (getrlimit) [RLIMIT_NOFILE]: Use it. * dtable.cc (dtable::extend): Likewise. * fcntl.cc (fcntl64): Obey POSIX rule with too-large F_DUPFD. * syscalls.cc (dup2): Likewise.
Diffstat (limited to 'winsup/cygwin/dtable.h')
-rw-r--r--winsup/cygwin/dtable.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/dtable.h b/winsup/cygwin/dtable.h
index 9d187e819..c1344549e 100644
--- a/winsup/cygwin/dtable.h
+++ b/winsup/cygwin/dtable.h
@@ -1,6 +1,7 @@
/* dtable.h: fd table definition.
- Copyright 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008 Red Hat, Inc.
+ Copyright 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Red
+ Hat, Inc.
This file is part of Cygwin.
@@ -10,6 +11,8 @@ details. */
/* Initial and increment values for cygwin's fd table */
#define NOFILE_INCR 32
+/* Maximum size we allow expanding to. */
+#define OPEN_MAX_MAX (100 * NOFILE_INCR)
#include "thread.h"
#include "sync.h"