#ifndef lint
static char *RCSid = "$Header: /usr/brule/guest/empire/empire/emprcs/lib/gen/dtable.c,v 2.0 1995/07/27 05:56:17 empire Exp $";
#endif

/*
 * dtable.c
 *
 * machine-dependent descriptor table management
 */

#ifdef hpux
#include <unistd.h>
#endif

/*ARGSUSED*/
setfdtablesize(min, start)
	int	min;
	int	start;
{
#ifdef sequent
	extern	int errno;

	while (start >= min) {
		if (setdtablesize(start) > 0)
			break;
		start -= 16;
	}
	errno = 0;
#endif
}

int
getfdtablesize()
{
#ifdef hpux
	return (int)sysconf(_SC_OPEN_MAX);
#else
	return getdtablesize();
#endif
}
