Files
RedBear-OS/tests/unistd/sysconf.c
T
Tibor Nagy 4381bb2a22 tests: Remove redundant return statements
When the execution reaches the end of the main functions, they implicitly return a successful status.
2019-02-20 21:09:03 +01:00

26 lines
424 B
C

#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#define SC(N) { \
errno = 0; \
printf("%s (%d): %ld (%d)\n", #N, _SC_ ## N, sysconf(_SC_ ## N), errno); \
}
int main(void) {
SC(ARG_MAX);
SC(CHILD_MAX);
SC(CLK_TCK);
SC(NGROUPS_MAX);
SC(OPEN_MAX);
SC(STREAM_MAX);
SC(TZNAME_MAX);
SC(VERSION);
SC(PAGESIZE);
SC(RE_DUP_MAX);
SC(LOGIN_NAME_MAX);
SC(TTY_NAME_MAX);
SC(SYMLOOP_MAX);
SC(HOST_NAME_MAX);
}