xsetmode: new module
commit7de8fbeeb844990ff3be4a49601c721a3b8c0dc2
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 15 Feb 2017 22:30:33 +0000 (15 14:30 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 15 Feb 2017 22:55:07 +0000 (15 14:55 -0800)
tree2e391135615305893a240855d38250bd9020a23a
parentb03f418bdbcf889d02467c6df2257b3710074485
xsetmode: new module

This is to fix a problem noted by Eric Blake.
Code was using xfreopen to change files to binary mode, but this
fails for stdout when in append mode.  Such code should use
xsetmode instead.
* NEWS: Document incompatible changes to binary-io module.
* lib/binary-io.c (__gl_setmode_check) [__DJGPP__ || __EMX__]:
New function.
* lib/binary-io.h (__gl_setmode): Rename from set_binary_mode.
(set_binary_mode): New function, which also checks for tty.
* lib/xsetmode.c, lib/xsetmode.h, modules/xsetmode: New files.
ChangeLog
NEWS
lib/binary-io.c
lib/binary-io.h
lib/xsetmode.c [new file with mode: 0644]
lib/xsetmode.h [new file with mode: 0644]
modules/xsetmode [new file with mode: 0644]