Documentation on Apple's Clang/Stdio.h on MacOS
in xCode V12.1 (Catalina) using C, the compiler pre-processor substitutes Darwin.C.stdio for stdio.h in the code below, which I believe is correct, but when run, it does nothing and returns an Exit Code 9 and remains running... looking for any documentation of getchar/putchar in Darwin.C.stdio.h
#pragma clang module import Darwin.C.stdio /* clang -E: implicit import for #include <stdio.h> */
int main(int argc, const char * argv[])
{
int c;
c = getchar();
while ( c != (-1)) { // while ( (c=getchar() ) != EOF ) also doesn't work
putchar(c);
c = getchar();
}
return 0;
}
MacBook Pro 13″, macOS 10.15