1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-04-28 06:33:36 +00:00

binary-io: Don't stump on the system namespace.

* lib/binary-io.h (_gl_set_fd_mode): Renamed from __gl_setmode.
* lib/binary-io.c (set_binary_mode): Update.
This commit is contained in:
Bruno Haible
2026-03-08 15:30:20 +01:00
parent 3210d2f2c6
commit a1f9e9d405
3 changed files with 9 additions and 5 deletions

View File

@@ -1,5 +1,9 @@
2026-03-08 Bruno Haible <bruno@clisp.org>
binary-io: Don't stump on the system namespace.
* lib/binary-io.h (_gl_set_fd_mode): Renamed from __gl_setmode.
* lib/binary-io.c (set_binary_mode): Update.
error-h: Don't stump on the system namespace.
* lib/error.in.h (_gl_error_call1): Renamed from __gl_error_call1.
(_gl_error_call): Renamed from __gl_error_call.

View File

@@ -32,7 +32,7 @@ set_binary_mode (int fd, int mode)
with console input or console output. */
return O_TEXT;
else
return __gl_setmode (fd, mode);
return _gl_set_fd_mode (fd, mode);
}
#endif

View File

@@ -38,9 +38,9 @@ _GL_INLINE_HEADER_BEGIN
#if O_BINARY
# if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__
# include <io.h> /* declares setmode() */
# define __gl_setmode setmode
# define _gl_set_fd_mode setmode
# else
# define __gl_setmode _setmode
# define _gl_set_fd_mode _setmode
# undef fileno
# define fileno _fileno
# endif
@@ -49,7 +49,7 @@ _GL_INLINE_HEADER_BEGIN
/* Use a function rather than a macro, to avoid gcc warnings
"warning: statement with no effect". */
BINARY_IO_INLINE int
__gl_setmode (_GL_UNUSED int fd, _GL_UNUSED int mode)
_gl_set_fd_mode (_GL_UNUSED int fd, _GL_UNUSED int mode)
{
return O_BINARY;
}
@@ -72,7 +72,7 @@ extern int set_binary_mode (int fd, int mode);
BINARY_IO_INLINE int
set_binary_mode (int fd, int mode)
{
return __gl_setmode (fd, mode);
return _gl_set_fd_mode (fd, mode);
}
#endif