Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include <errno.h>
  3. #include <unistd.h>
  4. #include <limits.h>
  5.  
  6. long
  7. pathconf(const char *path, int name)
  8. {
  9.   switch (name)
  10.   {
  11.   case _PC_LINK_MAX:            return LINK_MAX;
  12.   case _PC_MAX_CANON:           return MAX_CANON;
  13.   case _PC_MAX_INPUT:           return MAX_INPUT;
  14.   case _PC_NAME_MAX:            return NAME_MAX;
  15.   case _PC_PATH_MAX:            return PATH_MAX;
  16.   case _PC_PIPE_BUF:            return PIPE_BUF;
  17.   case _PC_CHOWN_RESTRICTED:    return _POSIX_CHOWN_RESTRICTED;
  18.   case _PC_NO_TRUNC:            return _POSIX_NO_TRUNC;
  19.   case _PC_VDISABLE:            return _POSIX_VDISABLE;
  20.  
  21.   default:
  22.     errno = EINVAL;
  23.     return -1;
  24.   }
  25. }
  26.