I'm outputting some stuff to stdout with the write* functions, but with what I'm doing at the moment I need complete control over each byte that gets output. On windows, write auto-converts \n to \r\n, which is normally good, but this time I need to get around that and output it just as-is. How can I do that? Is there a lower level function that's guaranteed not to interact poorly with write (ie, no potential for any weird buffering-race issues)?
Also, are there any other situations where any of the write functions might alter the specific bytes passed in?