kripken/emscripten — pull request #2157 by rfk (2014-02-25 06:18:58+00:00)
Title: Ensure that fileno() returns -1 when given an invalid file pointer.

Previously this would throw since getStreamFromPtr returns `undefined` for invalid file pointers.