mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 19:53:32 +08:00
Update.
* sysdeps/generic/bits/confname.h: Define _PC_REC_INCR_XFER_SIZE, _PC_REC_MAX_XFER_SIZE, _PC_REC_MIN_XFER_SIZE, and _PC_REC_XFER_ALIGN. * sysdeps/posix/pathconf.c (__pathconf): Implement handling of _PC_REC_INCR_XFER_SIZE, _PC_REC_MAX_XFER_SIZE, _PC_REC_MIN_XFER_SIZE, and _PC_REC_XFER_ALIGN.
This commit is contained in:
parent
7287c36dd8
commit
2da161d47e
@ -1,5 +1,12 @@
|
||||
2001-01-25 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/generic/bits/confname.h: Define _PC_REC_INCR_XFER_SIZE,
|
||||
_PC_REC_MAX_XFER_SIZE, _PC_REC_MIN_XFER_SIZE, and
|
||||
_PC_REC_XFER_ALIGN.
|
||||
* sysdeps/posix/pathconf.c (__pathconf): Implement handling of
|
||||
_PC_REC_INCR_XFER_SIZE, _PC_REC_MAX_XFER_SIZE,
|
||||
_PC_REC_MIN_XFER_SIZE, and _PC_REC_XFER_ALIGN.
|
||||
|
||||
* conform/conformtest.pl: Run Unix tests for XPG6.
|
||||
Implement handling of known namespace violations.
|
||||
Improve printing of results.
|
||||
|
@ -50,8 +50,16 @@ enum
|
||||
#define _PC_PRIO_IO _PC_PRIO_IO
|
||||
_PC_SOCK_MAXBUF,
|
||||
#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF
|
||||
_PC_FILESIZEBITS
|
||||
_PC_FILESIZEBITS,
|
||||
#define _PC_FILESIZEBITS _PC_FILESIZEBITS
|
||||
_PC_REC_INCR_XFER_SIZE,
|
||||
#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE
|
||||
_PC_REC_MAX_XFER_SIZE,
|
||||
#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE
|
||||
_PC_REC_MIN_XFER_SIZE,
|
||||
#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE
|
||||
_PC_REC_XFER_ALIGN
|
||||
#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN
|
||||
};
|
||||
|
||||
/* Values for the argument to `sysconf'. */
|
||||
|
@ -50,8 +50,16 @@ enum
|
||||
#define _PC_PRIO_IO _PC_PRIO_IO
|
||||
_PC_SOCK_MAXBUF,
|
||||
#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF
|
||||
_PC_FILESIZEBITS
|
||||
_PC_FILESIZEBITS,
|
||||
#define _PC_FILESIZEBITS _PC_FILESIZEBITS
|
||||
_PC_REC_INCR_XFER_SIZE,
|
||||
#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE
|
||||
_PC_REC_MAX_XFER_SIZE,
|
||||
#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE
|
||||
_PC_REC_MIN_XFER_SIZE,
|
||||
#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE
|
||||
_PC_REC_XFER_ALIGN
|
||||
#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN
|
||||
};
|
||||
|
||||
/* Values for the argument to `sysconf'. */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 1991, 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1991,1995,1996,1998,2000,2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -162,6 +162,41 @@ __pathconf (const char *path, int name)
|
||||
/* We let platforms with larger file sizes overwrite this value. */
|
||||
return 32;
|
||||
#endif
|
||||
|
||||
|
||||
case _PC_REC_INCR_XFER_SIZE:
|
||||
/* XXX It is not entirely clear what the limit is supposed to do.
|
||||
What is incremented? */
|
||||
return -1;
|
||||
|
||||
case _PC_REC_MAX_XFER_SIZE:
|
||||
/* XXX It is not entirely clear what the limit is supposed to do.
|
||||
In general there is no top limit of the number of bytes which
|
||||
case be transported at once. */
|
||||
return -1;
|
||||
|
||||
case _PC_REC_MIN_XFER_SIZE:
|
||||
{
|
||||
/* XXX It is not entirely clear what the limit is supposed to do.
|
||||
I assume this is the block size of the filesystem. */
|
||||
struct statvfs64 sv;
|
||||
|
||||
if (__statvfs64 (path, &sv) < 0)
|
||||
return -1;
|
||||
return sv.f_bsize;
|
||||
}
|
||||
|
||||
case _PC_REC_XFER_ALIGN:
|
||||
{
|
||||
/* XXX It is not entirely clear what the limit is supposed to do.
|
||||
I assume that the number should reflect the minimal block
|
||||
alignment. */
|
||||
struct statvfs64 sv;
|
||||
|
||||
if (__statvfs64 (path, &sv) < 0)
|
||||
return -1;
|
||||
return sv.f_frsize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user