aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2001-09-07 08:31:16 +0000
committerCorinna Vinschen <corinna@vinschen.de>2001-09-07 08:31:16 +0000
commitb0cce7e1278a4e5b31b9d595c28d1d5d2e302051 (patch)
treeba715b1a4ea7bb9efd1b11f3eaf813bae1e975a4
parentddeaa23fbbb2b272b793187671bf1daf713f8b09 (diff)
downloadnewlib-b0cce7e1278a4e5b31b9d595c28d1d5d2e302051.zip
newlib-b0cce7e1278a4e5b31b9d595c28d1d5d2e302051.tar.gz
newlib-b0cce7e1278a4e5b31b9d595c28d1d5d2e302051.tar.bz2
* include/limits.h: Define PIPE_BUF.
* syscalls.cc (fpathconf): Use PIPE_BUF instead of numerical constant. (pathconf): Ditto.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/include/limits.h5
-rw-r--r--winsup/cygwin/syscalls.cc4
3 files changed, 13 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 55d6a64..cf7a748 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+Fri Sep 7 10:27:00 2001 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/limits.h: Define PIPE_BUF.
+ * syscalls.cc (fpathconf): Use PIPE_BUF instead of numerical constant.
+ (pathconf): Ditto.
+
Thu Sep 6 20:04:05 2001 Christopher Faylor <cgf@cygnus.com>
* fhandler_socket.cc (fhandler_socket::fhandler_socket): Ensure that
diff --git a/winsup/cygwin/include/limits.h b/winsup/cygwin/include/limits.h
index 4a2ad3a..9eaac0b 100644
--- a/winsup/cygwin/include/limits.h
+++ b/winsup/cygwin/include/limits.h
@@ -129,6 +129,11 @@ details. */
#undef OPEN_MAX
#define OPEN_MAX 256
+/* # of bytes in a pipe buf. This is the max # of bytes which can be
+ written to a pipe in one atomic operation. */
+#undef PIPE_BUF
+#define PIPE_BUF 4096
+
/* POSIX values */
/* These should never vary from one system type to another */
/* They represent the minimum values that POSIX systems must support.
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 6f26e88..5e5566a 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -1533,7 +1533,7 @@ fpathconf (int fd, int v)
case _PC_PATH_MAX:
return PATH_MAX;
case _PC_PIPE_BUF:
- return 4096;
+ return PIPE_BUF;
case _PC_CHOWN_RESTRICTED:
case _PC_NO_TRUNC:
return -1;
@@ -1575,7 +1575,7 @@ pathconf (const char *file, int v)
case _PC_MAX_INPUT:
return _POSIX_MAX_CANON;
case _PC_PIPE_BUF:
- return 4096;
+ return PIPE_BUF;
case _PC_CHOWN_RESTRICTED:
case _PC_NO_TRUNC:
return -1;