aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/bison/lib/binary-io.h
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2024-08-04 11:38:26 +0300
committerthegeorg <thegeorg@yandex-team.com>2024-08-04 11:50:56 +0300
commitad701999eb5b93914c402b833230cf5f25958d46 (patch)
treec90ad21f5f2b35d8db8c2f75a651bbe63ec1d6ef /contrib/tools/bison/lib/binary-io.h
parent8744db6c4910e07c48a536a49886d2601c4fe6c6 (diff)
downloadydb-ad701999eb5b93914c402b833230cf5f25958d46.tar.gz
Update contrib/tools/bison to 3.5.4
3.4.2 build is broken in NixOS, hence 3.3.x is updated to 3.5.y. 61a027adbe6cc0b27392bf3980c328640fd0ba69
Diffstat (limited to 'contrib/tools/bison/lib/binary-io.h')
-rw-r--r--contrib/tools/bison/lib/binary-io.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/contrib/tools/bison/lib/binary-io.h b/contrib/tools/bison/lib/binary-io.h
index 100ac3011c..05f7986b5f 100644
--- a/contrib/tools/bison/lib/binary-io.h
+++ b/contrib/tools/bison/lib/binary-io.h
@@ -1,5 +1,5 @@
/* Binary mode I/O.
- Copyright (C) 2001, 2003, 2005, 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2005, 2008-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -61,25 +61,21 @@ __gl_setmode (int fd _GL_UNUSED, int mode _GL_UNUSED)
}
#endif
-#if defined __DJGPP__ || defined __EMX__
-extern int __gl_setmode_check (int);
-#else
-BINARY_IO_INLINE int
-__gl_setmode_check (int fd _GL_UNUSED) { return 0; }
-#endif
-
/* Set FD's mode to MODE, which should be either O_TEXT or O_BINARY.
Return the old mode if successful, -1 (setting errno) on failure.
Ordinarily this function would be called 'setmode', since that is
its name on MS-Windows, but it is called 'set_binary_mode' here
to avoid colliding with a BSD function of another name. */
+#if defined __DJGPP__ || defined __EMX__
+extern int set_binary_mode (int fd, int mode);
+#else
BINARY_IO_INLINE int
set_binary_mode (int fd, int mode)
{
- int r = __gl_setmode_check (fd);
- return r != 0 ? r : __gl_setmode (fd, mode);
+ return __gl_setmode (fd, mode);
}
+#endif
/* This macro is obsolescent. */
#define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY))