summaryrefslogtreecommitdiff
path: root/lib/libc/stdio/fgets.c
blob: d0f7d2d96bfb459de585ba296ded99e9e9156704 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdio.h>

char *fgets(char *restrict s, int n, FILE *restrict stream)
{
	char *r;

	flockfile(stream);
	r = fgets_unlocked(s, n, stream);
	funlockfile(stream);

	return r;
}