summaryrefslogtreecommitdiffstats
path: root/gl/fseterr.c
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2026-03-26 12:53:53 +0100
committerGitHub <noreply@github.com>2026-03-26 12:53:53 +0100
commit13e14a6bfd9f29cbfeab0c5161d2a994f97532e7 (patch)
tree3aa7186fe092e42783dc7e981dc39a74ea61c466 /gl/fseterr.c
parent9d8503f90ef25b2cecd324dc118e441f40233ea8 (diff)
downloadmonitoring-plugins-13e14a6bfd9f29cbfeab0c5161d2a994f97532e7.tar.gz
Update/gnulib 2026 03 (#2247)
* Sync with the 202601-stable Gnulib code (4a3650d887) * Ignore more deps stuff in gnulib * Remove autogenerated gnulib files * Ignore more gnulib generated headers
Diffstat (limited to 'gl/fseterr.c')
-rw-r--r--gl/fseterr.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/gl/fseterr.c b/gl/fseterr.c
index a01ef2af..0ab61765 100644
--- a/gl/fseterr.c
+++ b/gl/fseterr.c
@@ -1,5 +1,5 @@
1/* Set the error indicator of a stream. 1/* Set the error indicator of a stream.
2 Copyright (C) 2007-2025 Free Software Foundation, Inc. 2 Copyright (C) 2007-2026 Free Software Foundation, Inc.
3 3
4 This file is free software: you can redistribute it and/or modify 4 This file is free software: you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as 5 it under the terms of the GNU Lesser General Public License as
@@ -42,7 +42,7 @@ fseterr (FILE *fp)
42 fp->_flags |= _IOERR; 42 fp->_flags |= _IOERR;
43#elif defined __minix /* Minix */ 43#elif defined __minix /* Minix */
44 fp->_flags |= _IOERR; 44 fp->_flags |= _IOERR;
45#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */ 45#elif defined _IOERR /* AIX, HP-UX, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
46 fp_->_flag |= _IOERR; 46 fp_->_flag |= _IOERR;
47#elif defined __UCLIBC__ /* uClibc */ 47#elif defined __UCLIBC__ /* uClibc */
48 fp->__modeflags |= __FLAG_ERROR; 48 fp->__modeflags |= __FLAG_ERROR;
@@ -59,14 +59,10 @@ fseterr (FILE *fp)
59 Not activated on any system, because there is no way to repair FP when 59 Not activated on any system, because there is no way to repair FP when
60 the sequence of system calls fails, and library code should not call 60 the sequence of system calls fails, and library code should not call
61 abort(). */ 61 abort(). */
62 int saved_errno; 62 int saved_errno = errno;
63 int fd;
64 int fd2;
65
66 saved_errno = errno;
67 fflush (fp); 63 fflush (fp);
68 fd = fileno (fp); 64 int fd = fileno (fp);
69 fd2 = dup (fd); 65 int fd2 = dup (fd);
70 if (fd2 >= 0) 66 if (fd2 >= 0)
71 { 67 {
72 close (fd); 68 close (fd);