From: Ulrich Drepper Date: Fri, 8 Aug 2003 07:08:23 +0000 (+0000) Subject: Return __getpagesize () for _PC_PIPE_BUF if PIPE_BUF is not defined. X-Git-Tag: cvs/glibc-2_3_3~376 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1b990bd670519f84341d4e1e470bb577e2b01709;p=thirdparty%2Fglibc.git Return __getpagesize () for _PC_PIPE_BUF if PIPE_BUF is not defined. --- diff --git a/sysdeps/unix/sysv/linux/fpathconf.c b/sysdeps/unix/sysv/linux/fpathconf.c index c1cdb1b8996..8b6fbebbf0a 100644 --- a/sysdeps/unix/sysv/linux/fpathconf.c +++ b/sysdeps/unix/sysv/linux/fpathconf.c @@ -45,6 +45,13 @@ __fpathconf (fd, name) case _PC_2_SYMLINKS: return __statfs_symlinks (__fstatfs (fd, &fsbuf), &fsbuf); + case _PC_PIPE_BUF: +#ifdef PIPE_BUF + return PIPE_BUF; +#else + return __getpagesize (); +#endif + default: return posix_fpathconf (fd, name); } diff --git a/sysdeps/unix/sysv/linux/pathconf.c b/sysdeps/unix/sysv/linux/pathconf.c index d4159753a62..1e0679343f8 100644 --- a/sysdeps/unix/sysv/linux/pathconf.c +++ b/sysdeps/unix/sysv/linux/pathconf.c @@ -46,6 +46,13 @@ __pathconf (const char *file, int name) case _PC_2_SYMLINKS: return __statfs_symlinks (__statfs (file, &fsbuf), &fsbuf); + case _PC_PIPE_BUF: +#ifdef PIPE_BUF + return PIPE_BUF; +#else + return __getpagesize (); +#endif + default: return posix_pathconf (file, name); }