lib/binary-io.h


Log

Author Commit Date CI Message
Paul Eggert 2cdc1baf 2020-01-01T00:00:18 maint: Run 'make update-copyright'
Bruno Haible 9c383f22 2019-05-29T02:44:52 binary-io: Attempted use of O_BINARY on consoles no longer fails. 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.
Paul Eggert e6633650 2019-01-01T00:25:11 maint: Run 'make update-copyright'
Paul Eggert 59e59d99 2018-03-05T15:30:56 binary-io: pacify gcc -Wunused-parameter Problem reported by Reuben Thomas in: https://lists.gnu.org/r/bug-gnulib/2018-03/msg00005.html * lib/binary-io.h (__gl_setmode, __gl_setmode_check): Use _GL_UNUSED where appropriate.
Paul Eggert 281b825e 2018-01-01T00:57:25 maint: Run 'make update-copyright'
Paul Eggert ca35d468 2017-09-13T00:48:18 all: prefer https: URLs
Paul Eggert 820fa6ad 2017-02-16T00:17:56 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.
Paul Eggert 7de8fbee 2017-02-15T14:30:33 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.
Paul Eggert a3fd683d 2017-01-01T02:59:23 version-etc: new year * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
KO Myung-Hun 46c54f17 2016-01-14T11:23:42 binary-io: don't put fd in binary mode if it is a console on EMX * lib/binary-io.h (SET_BINARY): Don't put fd in binary mode if it is a console on EMX.
Paul Eggert 71090a2a 2016-01-01T00:56:19 version-etc: new year * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
Paul Eggert b9bfe784 2015-01-01T01:38:23 version-etc: new year * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
Eric Blake 1276a2c5 2014-01-01T00:04:40 maint: update copyright I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
Paul Eggert ece81a73 2013-08-28T18:49:38 headers: check that _GL_INLINE_HEADER_BEGIN is defined Suggested by Bruce Korb in: http://lists.gnu.org/archive/html/bug-gnulib/2013-08/msg00070.html * doc/extern-inline.texi (extern inline): Suggest checking that _GL_INLINE_HEADER_BEGIN is defined. * lib/acl-internal.h, lib/argp-fmtstream.h, lib/argp.h: * lib/binary-io.h, lib/bitrotate.h, lib/count-leading-zeros.h: * lib/count-one-bits.h, lib/eealloc.h, lib/execinfo.in.h: * lib/gethrxtime.h, lib/gl_list.h, lib/gl_oset.h, lib/gl_xlist.h: * lib/gl_xoset.h, lib/gl_xsublist.h, lib/glthread/cond.h: * lib/glthread/thread.h, lib/math.in.h, lib/mbchar.h, lib/mbfile.h: * lib/mbiter.h, lib/mbuiter.h, lib/openat.h, lib/pipe-filter-aux.h: * lib/priv-set.h, lib/pthread.in.h, lib/savewd.h, lib/se-context.in.h: * lib/se-selinux.in.h, lib/sig-handler.h, lib/stat-time.h: * lib/sys_socket.in.h, lib/timespec.h, lib/u64.h, lib/unistd.in.h: * lib/utimens.h, lib/wctype.in.h, lib/xalloc.h, lib/xsize.h: * lib/xtime.h: Check that _GL_INLINE_HEADER_BEGIN is defined.
Eric Blake 9fc81090 2013-01-01T00:50:58 maint: update all copyright year number ranges Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
Paul Eggert 664a1851 2012-08-29T23:13:42 binary-io, eealloc, mbfile, mbiter, mbutil, xsize: better 'inline' * 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.
Paul Eggert 216e340e 2012-08-27T22:57:47 misc: don't limit commentary to inline functions * lib/binary-io.h, lib/malloca.h, lib/safe-alloc.c: * lib/xalloc-oversized.h, lib/xsize.h: Contrast macros to functions in general, not just to inline functions, when the commentary does not apply only to inline functions.
Bruno Haible 290f9516 2012-05-13T22:54:49 binary-io: Define set_binary_mode function. * lib/binary-io.h (set_binary_mode): New function. (SET_BINARY): Define in terms of set_binary_mode. * modules/binary-io (configure.ac): Require AC_C_INLINE. * tests/test-binary-io.c (main): Accept an argument, and test either set_binary_mode or SET_BINARY depending on the argument. * tests/test-binary-io.sh: Invoke test-binary-io twice, with an argument. Clean up also t-bin-out0.tmp.
Jim Meyering 1602f0af 2012-01-01T10:04:58 maint: update all copyright year number ranges Run "make update-copyright".
Eric Blake 52db4244 2011-01-19T06:17:20 binary-io: fix O_TEXT on Haiku * modules/binary-io (Depends-on): Add fcntl-h. * lib/binary-io.h (O_TEXT): Rely on replacement <fcntl.h> rather than blindly undefining O_TEXT. Reported by Scott McCreary. Signed-off-by: Eric Blake <eblake@redhat.com>
Jim Meyering d60f3b0c 2011-01-01T20:17:23 maint: update almost all copyright ranges to include 2011 Run the new "make update-copyright" rule.
Jim Meyering b2e2010c 2010-01-01T10:31:12 update nearly all FSF copyright year lists to include 2010 Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
Bruno Haible c73cdbde 2009-12-24T22:16:51 binary-io: Avoid gcc warning due to SET_BINARY.
Eric Blake 12126c14 2009-12-16T09:24:23 binary-io: avoid potential compilation warning * lib/binary-io.h [__DJGPP__]: Avoid null preprocessor directives. Signed-off-by: Eric Blake <ebb9@byu.net>
Ingo Weinhold 40d88197 2008-11-10T12:30:58 Treat Haiku like BeOS.
Bruno Haible 8b61f0d6 2008-04-13T12:50:49 Avoid warning on emx+gcc.
Bruno Haible 57fdfd3f 2007-10-07T19:14:58 Change copyright notice from GPLv2+ to GPLv3+.
Bruno Haible a7742484 2005-06-08T19:32:15 Avoid gcc warning on mingw.
Paul Eggert 267a39ba 2005-05-14T06:03:57 *** empty log message ***
Bruno Haible 2564f60c 2004-01-20T16:54:56 Avoid compilation warnings on Cygwin.
Bruno Haible b415491e 2003-08-28T13:59:25 Avoid warning on QNX.
Bruno Haible c3d8942f 2003-08-25T11:04:49 Make it work with MSVC.
Bruno Haible 1375fc09 2003-04-02T10:57:23 New module 'binary-io'.