mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-23 19:30:10 +00:00
Update.
2001-04-23 Ulrich Drepper <drepper@redhat.com> * sysdeps/posix/pathconf.c (__pathconf): For _PC_ASYNC_IO test whether named file is a regular file or a block device. * sysdeps/posix/fpathconf.c (__fpathconf): Likewise.
This commit is contained in:
parent
92c2e46b96
commit
bc183edc4e
@ -1,3 +1,9 @@
|
|||||||
|
2001-04-23 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/posix/pathconf.c (__pathconf): For _PC_ASYNC_IO test
|
||||||
|
whether named file is a regular file or a block device.
|
||||||
|
* sysdeps/posix/fpathconf.c (__fpathconf): Likewise.
|
||||||
|
|
||||||
2001-04-23 Andreas Jaeger <aj@suse.de>
|
2001-04-23 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
* nscd/nscd.h: Add noreturn attribute for start_threads.
|
* nscd/nscd.h: Add noreturn attribute for start_threads.
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <sys/statfs.h>
|
#include <sys/statfs.h>
|
||||||
#include <sys/statvfs.h>
|
#include <sys/statvfs.h>
|
||||||
|
|
||||||
@ -142,7 +143,16 @@ __fpathconf (fd, name)
|
|||||||
|
|
||||||
case _PC_ASYNC_IO:
|
case _PC_ASYNC_IO:
|
||||||
#ifdef _POSIX_ASYNC_IO
|
#ifdef _POSIX_ASYNC_IO
|
||||||
return _POSIX_ASYNC_IO;
|
{
|
||||||
|
/* AIO is only allowed on regular files and block devices. */
|
||||||
|
struct stat64 st;
|
||||||
|
|
||||||
|
if (__fxstat64 (_STAT_VER, fd, &st) < 0
|
||||||
|
|| (! S_ISREG (st.st_mode) && ! S_ISBLK (st.st_mode)))
|
||||||
|
return -1;
|
||||||
|
else
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
return -1;
|
return -1;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user