xref: /netbsd/lib/libc/compat-43/getdtablesize.c (revision bf9ec67e)
1 /*	$NetBSD: getdtablesize.c,v 1.8 1998/10/18 13:56:21 kleink Exp $	*/
2 
3 /*
4  * Written by J.T. Conklin <jtc@netbsd.org>.
5  * Public domain.
6  */
7 
8 #include <sys/cdefs.h>
9 #if defined(LIBC_SCCS) && !defined(lint)
10 __RCSID("$NetBSD: getdtablesize.c,v 1.8 1998/10/18 13:56:21 kleink Exp $");
11 #endif /* LIBC_SCCS and not lint */
12 
13 #include "namespace.h"
14 #include <unistd.h>
15 
16 int
17 getdtablesize()
18 {
19 	return ((int)sysconf(_SC_OPEN_MAX));
20 }
21