This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.23-68-gabc40bb
- From: fw at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 7 Mar 2016 16:06:29 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.23-68-gabc40bb
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via abc40bb2a78b358935a604451b7e7eb83d8d77c4 (commit)
from 3c0f7407eedb524c9114bb675cd55b903c71daaa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=abc40bb2a78b358935a604451b7e7eb83d8d77c4
commit abc40bb2a78b358935a604451b7e7eb83d8d77c4
Author: Florian Weimer <fweimer@redhat.com>
Date: Mon Mar 7 17:05:06 2016 +0100
libio: Clean up _IO_file_doallocate and _IO_wfile_doallocate
No functional changes.
diff --git a/ChangeLog b/ChangeLog
index c57c2fe..882f22c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2016-03-07 Florian Weimer <fweimer@redhat.com>
+ * libio/filedoalloc.c (isatty): Remove.
+ (local_isatty): Add comment. Call __isatty directly.
+ (_IO_file_doallocate): Update comment. Assume _LIBC.
+ * libio/wfiledoalloc.c (isatty): Remove.
+ (_IO_wfile_doallocate): Update comment.
+
+2016-03-07 Florian Weimer <fweimer@redhat.com>
+
[BZ #19269]
* sysdeps/x86_64/Makefile (tst-audit4): Depend on
tst-audit4-aux.o.
diff --git a/libio/filedoalloc.c b/libio/filedoalloc.c
index b51e910..4f9d738 100644
--- a/libio/filedoalloc.c
+++ b/libio/filedoalloc.c
@@ -55,41 +55,24 @@
/* Modified for GNU iostream by Per Bothner 1991, 1992. */
-#ifndef _POSIX_SOURCE
-# define _POSIX_SOURCE
-#endif
#include "libioP.h"
-#include <sys/types.h>
+#include <device-nrs.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <unistd.h>
-#ifdef _LIBC
-# undef isatty
-# define isatty(Fd) __isatty (Fd)
-
-# include <device-nrs.h>
-#endif
-
-
+/* Return the result of isatty, without changing errno. */
static int
local_isatty (int fd)
{
int save_errno = errno;
- int res = isatty (fd);
+ int res = __isatty (fd);
__set_errno (save_errno);
return res;
}
-
-/*
- * Allocate a file buffer, or switch to unbuffered I/O.
- * Per the ANSI C standard, ALL tty devices default to line buffered.
- *
- * As a side effect, we set __SOPT or __SNPT (en/dis-able fseek
- * optimisation) right after the _fstat() that finds the buffer size.
- */
-
+/* Allocate a file buffer, or switch to unbuffered I/O. Streams for
+ TTY devices default to line buffered. */
int
_IO_file_doallocate (_IO_FILE *fp)
{
@@ -97,15 +80,6 @@ _IO_file_doallocate (_IO_FILE *fp)
char *p;
struct stat64 st;
-#ifndef _LIBC
- /* If _IO_cleanup_registration_needed is non-zero, we should call the
- function it points to. This is to make sure _IO_cleanup gets called
- on exit. We call it from _IO_file_doallocate, since that is likely
- to get called by any program that does buffered I/O. */
- if (__glibc_unlikely (_IO_cleanup_registration_needed != NULL))
- (*_IO_cleanup_registration_needed) ();
-#endif
-
size = _IO_BUFSIZ;
if (fp->_fileno >= 0 && __builtin_expect (_IO_SYSSTAT (fp, &st), 0) >= 0)
{
diff --git a/libio/wfiledoalloc.c b/libio/wfiledoalloc.c
index 28c10b6..333b036 100644
--- a/libio/wfiledoalloc.c
+++ b/libio/wfiledoalloc.c
@@ -55,28 +55,10 @@
/* Modified for GNU iostream by Per Bothner 1991, 1992. */
-#ifndef _POSIX_SOURCE
-# define _POSIX_SOURCE
-#endif
#include "libioP.h"
-#include <sys/types.h>
-#include <sys/stat.h>
#include <stdlib.h>
-#include <unistd.h>
-
-#ifdef _LIBC
-# undef isatty
-# define isatty(Fd) __isatty (Fd)
-#endif
-
-/*
- * Allocate a file buffer, or switch to unbuffered I/O.
- * Per the ANSI C standard, ALL tty devices default to line buffered.
- *
- * As a side effect, we set __SOPT or __SNPT (en/dis-able fseek
- * optimisation) right after the _fstat() that finds the buffer size.
- */
+/* Allocate a file buffer, or switch to unbuffered I/O. */
int
_IO_wfile_doallocate (_IO_FILE *fp)
{
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
libio/filedoalloc.c | 36 +++++-------------------------------
libio/wfiledoalloc.c | 20 +-------------------
3 files changed, 14 insertions(+), 50 deletions(-)
hooks/post-receive
--
GNU C Library master sources