Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-02-07 20:22:40 +0300
committerCorinna Vinschen <corinna@vinschen.de>2007-02-07 20:22:40 +0300
commit59e3b6ca7dc10603d1e692928a236fe5a0523200 (patch)
tree17949dbe48d690e650c7b3cefa903f711e49477d /winsup/cygwin/fhandler.cc
parent0e37a2e6e5f9bd3922f050da2a09b0e9d1dc5afd (diff)
* cygmalloc.h (MALLOC_FAILURE_ACTION): Define empty.
* cygwin.din (posix_madvise): Export. (posix_memalign): Export. * fhandler.cc (fhandler_base::fpathconf): Return useful values in _PC_VDISABLE, _PC_SYNC_IO and _PC_SYMLINK_MAX cases. * malloc_wrapper.cc (malloc): Set errno here since it's not set in dlmalloc.c anymore. (realloc): Ditto. (calloc): Ditto. (memalign): Ditto. (valloc): Ditto. (posix_memalign): New function. * mmap.cc (posix_madvise): New function. * sysconf.cc (get_open_max): New function. (get_page_size): Ditto. (get_nproc_values): Ditto. (get_avphys): Ditto. (sc_type): New type. (sca): New array to map _SC_xxx options to sysconf return values. (sysconf): Reimplement using sca array. * include/limits.h: Add all missing values as defined by SUSv3. * include/pthread.h (PTHREAD_DESTRUCTOR_ITERATIONS): Move definition to sys/limits.h. (PTHREAD_KEYS_MAX): Ditto. * include/semaphore.h (SEM_VALUE_MAX): Ditto. * include/cygwin/stdlib.h (posix_memalign): Declare. * include/cygwin/version.h: Bump API minor number. * include/sys/mman.h: Add posix_madvise flags. (posix_madvise): Declare. * include/sys/termios.h (_POSIX_VDISABLE): Move definition to sys/limits.h.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 7c51a6e3d..bf938e7a9 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -1852,19 +1852,21 @@ fhandler_base::fpathconf (int v)
case _PC_NO_TRUNC:
return 1;
case _PC_VDISABLE:
- if (!is_tty ())
- set_errno (EINVAL);
+ if (is_tty ())
+ return _POSIX_VDISABLE;
+ set_errno (EINVAL);
break;
case _PC_ASYNC_IO:
case _PC_PRIO_IO:
- case _PC_SYNC_IO:
break;
+ case _PC_SYNC_IO:
+ return 1;
case _PC_FILESIZEBITS:
return FILESIZEBITS;
case _PC_2_SYMLINKS:
return 1;
case _PC_SYMLINK_MAX:
- break;
+ return SYMLINK_MAX;
case _PC_POSIX_PERMISSIONS:
case _PC_POSIX_SECURITY:
if (get_device () == FH_FS)