/* See LICENSE file for copyright and license details. */ #include "../libsyscalls.h" #include #include #if defined(__clang__) # pragma clang diagnostic ignored "-Wunsafe-buffer-usage" /* clang is just being silly */ #endif int main(int argc, char **argv) { size_t count; if (argc < 1 || argc > 2) { fprintf(stderr, "usage error\n"); return 3; } #define X(...) 1 count = (LIBSYSCALLS_LIST_ERRORS(X, +)); #undef X libsyscalls_perror(argv[1], (enum libsyscalls_error)-1); libsyscalls_perror(argv[1], (enum libsyscalls_error)count); return fflush(stderr) || fclose(stderr); }