summaryrefslogtreecommitdiff
path: root/lib/binary-io.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* binary-io: Attempted use of O_BINARY on consoles no longer fails.Bruno Haible2019-05-311-7/+9
| | | | | | | | | | | Reported by KO Myung-Hun <komh78@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2019-05/msg00124.html>. * lib/binary-io.h (__gl_setmode_check): Remove function. (set_binary_mode): Declare as notinline on DJGPP and EMX. * lib/binary-io.c (__gl_setmode_check): Remove function. (set_binary_mode): Define here on DJGPP and EMX. Inline __gl_setmode_check. In case of a tty, don't return an error code.
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* xbinary-io: rename from xsetmodePaul Eggert2017-02-161-1/+1
| | | | | | | | | | | | | | | | | | 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.
* xsetmode: new modulePaul Eggert2017-02-151-1/+34
| | | | | | | | | | | | | 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.
* binary-io, math, pthread, sys_socket, u64, unistd: port to strict CPaul Eggert2015-10-131-0/+1
| | | | | | | * lib/binary-io.c, lib/math.c, lib/pthread.c, lib/sys_socket.c: * lib/u64.c, lib/unistd.c: Append 'typedef int dummy;', to pacify compilers that are picky about empty translation units.
* binary-io, eealloc, mbfile, mbiter, mbutil, xsize: better 'inline'Paul Eggert2012-09-221-0/+3
* lib/binary-io.c, lib/eealloc.c, lib/mbfile.c, lib/mbiter.c: * lib/mbuiter.c, lib/xsize.c: New files. * lib/binary-io.h (BINARY_IO_INLINE): * lib/eealloc.h (EEALLOC_INLINE): * lib/mbfile.h (MBFILE_INLINE): * lib/mbiter.h (MBITER_INLINE): * lib/mbuiter.h (MBUITER_INLINE): * lib/xsize.h (XSIZE_INLINE): New macros. Replace all uses of 'static inline' with them. Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. * m4/eealloc.m4 (gl_EEALLOC): * m4/mbfile.m4 (gl_MBFILE): * m4/mbiter.m4 (gl_MBITER): * m4/xsize.m4 (gl_XSIZE): Do not require AC_C_INLINE. * modules/binary-io (Files, lib_SOURCES): Add lib/binary-io.c * modules/eealloc (Files, lib_SOURCES): Add lib/eealloc.c. * modules/mbfile (Files, lib_SOURCES): Add lib/mbfile.c. * modules/mbiter (Files, lib_SOURCES): Add lib/mbiter.c. * modules/mbuiter (Files, lib_SOURCES): Add lib/mbuiter.c. * modules/xsize (Files, lib_SOURCES): Add lib/xsize.c. * modules/binary-io, modules/eealloc, modules/mbfile: * modules/mbiter, modules/mbuiter: (Depends-on): Add extern-inline.