Subversion Repositories Kolibri OS

Rev

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. #include <time.h>
  6. #include <stdio.h>
  7. #include <fcntl.h>
  8.  
  9. long
  10. sysconf(int name)
  11. {
  12.   switch (name)
  13.   {
  14.   case _SC_ARG_MAX:     return ARG_MAX;
  15.   case _SC_CHILD_MAX:   return CHILD_MAX;
  16.   case _SC_CLK_TCK:     return CLOCKS_PER_SEC;
  17.   case _SC_NGROUPS_MAX: return NGROUPS_MAX;
  18.   case _SC_OPEN_MAX:    return 255;
  19.   case _SC_JOB_CONTROL: return -1;
  20.   case _SC_SAVED_IDS:   return -1;
  21.   case _SC_STREAM_MAX:  return _POSIX_STREAM_MAX;
  22.   case _SC_TZNAME_MAX:  return TZNAME_MAX;
  23.   case _SC_VERSION:     return _POSIX_VERSION;
  24.  
  25.   default:
  26.     errno = EINVAL;
  27.     return -1;
  28.   }
  29. }
  30.