You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wasi-sdk/tests/general/main_errno.c

13 lines
350 B

#include <stdio.h>
#include <errno.h>
#include <string.h>
// It isn't required that errno be zero on entry to main, but
// for tidiness' sake, if we ever do things during startup that
// do set errno, we should reset it for tidiness' sake.
int main(void) {
int n = errno;
printf("initial errno is %d: %s\n", n, strerror(n));
return 0;
}