xbinary-io: rename from xsetmode
commit820fa6ad064bf3ba81dc9e2cd7fa2b98bb270902
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Feb 2017 08:17:56 +0000 (16 00:17 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Feb 2017 08:19:20 +0000 (16 00:19 -0800)
treec4de4c1ca4a0dc3d40c4d7ee6efdb3c522f51bd6
parent87c456bf6fb9453144890f0941c118a49b20fda5
xbinary-io: rename from xsetmode

This patch is taken from suggestions by Bruno Haible in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-02/msg00060.html
http://lists.gnu.org/archive/html/bug-gnulib/2017-02/msg00061.html
* lib/binary-io.c (__gl_setmode_check): Set errno to EINVAL,
not ENOTTY, when it is an inappropriate device.
* lib/binary-io.h (SET_BINARY): Resurrect.
* lib/xbinary-io.c: Rename from lib/xsetmode.c.
(xset_binary_mode_error): Rename from xsetmode_error.
* lib/xbinary-io.h: Rename from lib/xsetmode.h.
(xset_binary_mode): Rename from xsetmode.
All uses changed.
* modules/xbinary-io: Rename from modules/xsetmode.
Update file names.
* tests/test-binary-io.sh (tmpfiles): Remove no-longer-used file name.
* NEWS: Update to match revised behavior.
ChangeLog
NEWS
lib/binary-io.c
lib/binary-io.h
lib/xbinary-io.c [moved from lib/xsetmode.c with 95% similarity]
lib/xbinary-io.h [moved from lib/xsetmode.h with 67% similarity]
modules/xbinary-io [moved from modules/xsetmode with 65% similarity]
tests/test-binary-io.sh