This API takes a FILE* . This is a problem, particularly on Windows, where the caller of NSPR may not be using the same CRT as NSPR itself, due to differences in compilers, or debug heap CRT, etc. IMO, an API that takes a FILE* has no place in NSPR. This function appears to be mostly for debugging. I would suggest we mark it as obsolete as a minimum, and perhaps make it return PR_NOT_IMPLEMENTED_ERROR . If somebody really needs this functionality, we could rewrite the function to take a PRFileDesc* instead.