diff options
Diffstat (limited to 'sysdeps/posix')
-rw-r--r-- | sysdeps/posix/fpathconf.c | 17 | ||||
-rw-r--r-- | sysdeps/posix/pathconf.c | 17 | ||||
-rw-r--r-- | sysdeps/posix/sysconf.c | 8 |
3 files changed, 38 insertions, 4 deletions
diff --git a/sysdeps/posix/fpathconf.c b/sysdeps/posix/fpathconf.c index 93f0b99590..539a6caa25 100644 --- a/sysdeps/posix/fpathconf.c +++ b/sysdeps/posix/fpathconf.c @@ -202,6 +202,23 @@ __fpathconf (fd, name) return -1; return sv.f_frsize; } + + case _PC_ALLOC_SIZE_MIN: + { + /* 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 (__fstatvfs64 (fd, &sv) < 0) + return -1; + return sv.f_frsize; + } + + case _PC_SYMLINK_MAX: + /* In general there are no limits. If a system has one it should + overwrite this case. */ + return -1; } } diff --git a/sysdeps/posix/pathconf.c b/sysdeps/posix/pathconf.c index edb3961c67..4ce5c0d1d7 100644 --- a/sysdeps/posix/pathconf.c +++ b/sysdeps/posix/pathconf.c @@ -198,6 +198,23 @@ __pathconf (const char *path, int name) return -1; return sv.f_frsize; } + + case _PC_ALLOC_SIZE_MIN: + { + /* 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; + } + + case _PC_SYMLINK_MAX: + /* In general there are no limits. If a system has one it should + overwrite this case. */ + return -1; } } diff --git a/sysdeps/posix/sysconf.c b/sysdeps/posix/sysconf.c index 4b6eced244..7a0cd4204c 100644 --- a/sysdeps/posix/sysconf.c +++ b/sysdeps/posix/sysconf.c @@ -951,9 +951,9 @@ __sysconf (name) return -1; #endif - case _SC_MULTIPLE_PROCESS: -#ifdef _POSIX_MULTIPLE_PROCESS - return _POSIX_MULTIPLE_PROCESS; + case _SC_MULTI_PROCESS: +#ifdef _POSIX_MULTI_PROCESS + return _POSIX_MULTI_PROCESS; #else return -1; #endif @@ -1109,7 +1109,7 @@ __sysconf (name) return -1; #endif - case _SC_SYMLOOP: + case _SC_SYMLOOP_MAX: #ifdef SYMLOOP_MAX return SYMLOOP_MAX; #else |