summaryrefslogtreecommitdiffstats
path: root/testutil/strerror-all.c
blob: b875392f01fb4f6bc527d6cbfc5f590b207e073b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* See LICENSE file for copyright and license details. */
#include "../libsyscalls.h"

#include <stddef.h>
#include <stdio.h>


int
main(void)
{
	size_t i, count;

#define X(...) 1
	count = (LIBSYSCALLS_LIST_ERRORS(X, +));
#undef X

	for (i = 0; i < count; i++)
		printf("%s\n", libsyscalls_strerror((enum libsyscalls_error)i));

	if (fflush(stdout) || fclose(stdout)) {
		perror(NULL);
		return 1;
	}
	return 0;
}