Add some more sysconf() types. (Mostly stolen from other compat_* s)

This commit is contained in:
carrel 1997-10-19 19:25:07 +00:00
parent f08eca2b03
commit c2418895f6
2 changed files with 33 additions and 9 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: hpux.h,v 1.12 1997/10/05 18:29:54 thorpej Exp $ */
/* $NetBSD: hpux.h,v 1.13 1997/10/19 19:25:07 carrel Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -329,8 +329,14 @@ struct hpux_sigaction {
#define HPUXSIG_SETMASK 2 /* set specified signal set */
/* sysconf stuff */
#define HPUX_SYSCONF_ARGMAX 0 /* max len of arg to exec() */
#define HPUX_SYSCONF_CHILDMAX 1 /* max # of proc per userid */
#define HPUX_SYSCONF_CLKTICK 2
#define HPUX_SYSCONF_NGRPMAX 3 /* max # of supp groups per proc */
#define HPUX_SYSCONF_OPENMAX 4
#define HPUX_SYSCONF_JOBCNTRL 5 /* 1 iff Posix job cntrl supported */
#define HPUX_SYSCONF_SAVEDIDS 6 /* 1 iff Posix saved ids supported */
#define HPUX_SYSCONF_VERSION 7 /* Posix version date */
#define HPUX_SYSCONF_CPUTYPE 10001
#define HPUX_SYSCONF_CPUM020 0x20C
#define HPUX_SYSCONF_CPUM030 0x20D

View File

@ -1,4 +1,4 @@
/* $NetBSD: hpux_compat.c,v 1.37 1997/10/17 18:43:48 scottr Exp $ */
/* $NetBSD: hpux_compat.c,v 1.38 1997/10/19 19:25:11 carrel Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -474,18 +474,36 @@ hpux_sys_sysconf(p, v, retval)
register_t *retval;
{
struct hpux_sys_sysconf_args *uap = v;
switch (SCARG(uap, name)) {
/* clock ticks per second */
switch (SCARG(uap, name)) {
case HPUX_SYSCONF_ARGMAX:
*retval = ARG_MAX;
break;
case HPUX_SYSCONF_CHILDMAX:
*retval = maxproc;
break;
case HPUX_SYSCONF_CLKTICK:
*retval = hz;
break;
/* open files */
case HPUX_SYSCONF_OPENMAX:
*retval = NOFILE;
case HPUX_SYSCONF_NGRPMAX:
*retval = NGROUPS_MAX;
break;
case HPUX_SYSCONF_OPENMAX:
*retval = maxfiles;
break;
case HPUX_SYSCONF_JOBCNTRL:
*retval = 1;
break;
case HPUX_SYSCONF_SAVEDIDS:
#ifdef _POSIX_SAVED_IDS
*retval = 1;
#else
*retval = 0;
#endif
break;
case HPUX_SYSCONF_VERSION:
*retval = 198808;
break;
/* architecture */
case HPUX_SYSCONF_CPUTYPE:
*retval = hpux_cpu_sysconf_arch();