1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Chris Torek.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 20 unchanged lines hidden (view full) ---
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#if defined(LIBC_SCCS) && !defined(lint)
34static char sccsid[] = "@(#)findfp.c 8.2 (Berkeley) 1/4/94";
35#endif /* LIBC_SCCS and not lint */
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/lib/libc/stdio/findfp.c 249810 2013-04-23 14:36:44Z emaste $");
38
39#include <sys/param.h>
40#include <machine/atomic.h>
41#include <unistd.h>
42#include <stdio.h>
43#include <stdlib.h>
44#include <string.h>
45
--- 113 unchanged lines hidden (view full) ---
159}
160
161/*
162 * XXX. Force immediate allocation of internal memory. Not used by stdio,
163 * but documented historically for certain applications. Bad applications.
164 */
165__warn_references(f_prealloc,
166 "warning: this program uses f_prealloc(), which is not recommended.");
167
168void
169f_prealloc(void)
170{
171 struct glue *g;
172 int n;
173
174 n = getdtablesize() - FOPEN_MAX + 20; /* 20 for slop. */
--- 40 unchanged lines hidden ---
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Chris Torek.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 20 unchanged lines hidden (view full) ---
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#if defined(LIBC_SCCS) && !defined(lint)
34static char sccsid[] = "@(#)findfp.c 8.2 (Berkeley) 1/4/94";
35#endif /* LIBC_SCCS and not lint */
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/lib/libc/stdio/findfp.c 249810 2013-04-23 14:36:44Z emaste $");
38
39#include <sys/param.h>
40#include <machine/atomic.h>
41#include <unistd.h>
42#include <stdio.h>
43#include <stdlib.h>
44#include <string.h>
45
--- 113 unchanged lines hidden (view full) ---
159}
160
161/*
162 * XXX. Force immediate allocation of internal memory. Not used by stdio,
163 * but documented historically for certain applications. Bad applications.
164 */
165__warn_references(f_prealloc,
166 "warning: this program uses f_prealloc(), which is not recommended.");
167
168void
169f_prealloc(void)
170{
171 struct glue *g;
172 int n;
173
174 n = getdtablesize() - FOPEN_MAX + 20; /* 20 for slop. */
--- 40 unchanged lines hidden ---