this code:
#include <stdio.h>
#include <iostream>
using namespace std;
int main() {
cout << fileno(stdout) << endl;
}
Works fine in this compiler: http://sourceforge.net/projects/mingwbuilds/files/host-windows/releases/4.7.2/32-bit/threads-posix/sjlj/x32-4.7.2-release-posix-sjlj-rev6.7z
but in this package : http://nuwen.net/files/mingw/mingw-9.5-without-git.exe
it returns: test.cpp:5:24: error: 'fileno' was not declared in this scope
filenois not part of C or C++, but is POSIX. Therefore it has no place on Windows. To write portable code, stick to the features provided by the C and C++ standards.That’s probably why they don’t ship it in a GCC port for Windows. By contrast, the POSIX threads implementation you linked to likely relies on it as an implementation detail to keep the ported code as similar as possible to the original code.
Any further rationale is subjective and off-topic; in short, you’d have to ask them!