/* See LICENSE file for copyright and license details. */ #include "../libsyscalls.h" #include #include int main(int argc, char **argv) { size_t count; (void) argv; if (argc != 1) { fprintf(stderr, "usage error\n"); return 3; } #define X(...) 1 count = (LIBSYSCALLS_LIST_ERRORS(X, +)); #undef X printf("%s\n", libsyscalls_strerror((enum libsyscalls_error)-1)); printf("%s\n", libsyscalls_strerror((enum libsyscalls_error)count)); if (fflush(stdout) || fclose(stdout)) { perror(NULL); return 1; } return 0; }