http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46333
--- Comment #5 from Jay <jay.krell at cornell dot edu> 2010-11-07 00:07:31 UTC --- Huh, I misread and I don't see why _flsbuf/__flsbuf/_filbuf/__filbuf aren't declared. Anyway, I'll try: # if defined(HAVE_PUTC_UNLOCKED) && (!defined(__cplusplus) || defined(__GNUC__) || !defined(__sun)) on # define putc(C, Stream) putc_unlocked (C, Stream) and analogous on # define getc(Stream) getc_unlocked (Stream)