Deleted Added
full compact
findfp.c (249808) findfp.c (249810)
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>
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 249808 2013-04-23 13:33:13Z emaste $");
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

--- 40 unchanged lines hidden (view full) ---

86
87#if NOT_YET
88#define SET_GLUE_PTR(ptr, val) atomic_set_rel_ptr(&(ptr), (uintptr_t)(val))
89#else
90#define SET_GLUE_PTR(ptr, val) ptr = val
91#endif
92
93static struct glue *
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

--- 40 unchanged lines hidden (view full) ---

86
87#if NOT_YET
88#define SET_GLUE_PTR(ptr, val) atomic_set_rel_ptr(&(ptr), (uintptr_t)(val))
89#else
90#define SET_GLUE_PTR(ptr, val) ptr = val
91#endif
92
93static struct glue *
94moreglue(n)
95 int n;
94moreglue(int n)
96{
97 struct glue *g;
98 static FILE empty = { ._fl_mutex = PTHREAD_MUTEX_INITIALIZER };
99 FILE *p;
100
101 g = (struct glue *)malloc(sizeof(*g) + ALIGNBYTES + n * sizeof(FILE));
102 if (g == NULL)
103 return (NULL);

--- 112 unchanged lines hidden ---
95{
96 struct glue *g;
97 static FILE empty = { ._fl_mutex = PTHREAD_MUTEX_INITIALIZER };
98 FILE *p;
99
100 g = (struct glue *)malloc(sizeof(*g) + ALIGNBYTES + n * sizeof(FILE));
101 if (g == NULL)
102 return (NULL);

--- 112 unchanged lines hidden ---