mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
2001-07-18 Ulrich Drepper <drepper@redhat.com> * libio/filedoalloc.c (_IO_file_doallocate): A few more minor cleanups and improvements. 2001-07-18 Andreas Schwab <schwab@suse.de> * posix/regex.c (WORDCHAR_P) [WCHAR]: Also return true for the underscore character. 2001-07-18 Jakub Jelinek <jakub@redhat.com> * malloc/malloc (new_heap): Don't call munmap for zero length. 2001-07-18 Ulrich Drepper <drepper@redhat.com> * libio/filedoalloc.c (_IO_file_doallocate): Use DEV_TTY_P if available to determine whether descriptor is for tty before calling isatty. * sysdeps/unix/sysv/linux/device-nrs.h: Define DEV_TTY_P. * sysdeps/generic/device-nrs.h: Likewise.
This commit is contained in:
23
ChangeLog
23
ChangeLog
@ -1,3 +1,26 @@
|
|||||||
|
2001-07-18 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* libio/filedoalloc.c (_IO_file_doallocate): A few more minor
|
||||||
|
cleanups and improvements.
|
||||||
|
|
||||||
|
2001-07-18 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* posix/regex.c (WORDCHAR_P) [WCHAR]: Also return true for the
|
||||||
|
underscore character.
|
||||||
|
|
||||||
|
2001-07-18 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* malloc/malloc (new_heap): Don't call munmap for zero length.
|
||||||
|
|
||||||
|
2001-07-18 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* libio/filedoalloc.c (_IO_file_doallocate): Use DEV_TTY_P if
|
||||||
|
available to determine whether descriptor is for tty before
|
||||||
|
calling isatty.
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/device-nrs.h: Define DEV_TTY_P.
|
||||||
|
* sysdeps/generic/device-nrs.h: Likewise.
|
||||||
|
|
||||||
2001-07-18 Andreas Jaeger <aj@suse.de>
|
2001-07-18 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
* time/Makefile (tst-getdate-ENV): Add TZDIR to environment.
|
* time/Makefile (tst-getdate-ENV): Add TZDIR to environment.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
|
/* Copyright (C) 1993, 1997, 2001 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -58,6 +58,8 @@
|
|||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
# undef isatty
|
# undef isatty
|
||||||
# define isatty(Fd) __isatty (Fd)
|
# define isatty(Fd) __isatty (Fd)
|
||||||
|
|
||||||
|
# include <device-nrs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -73,7 +75,6 @@ _IO_file_doallocate (fp)
|
|||||||
_IO_FILE *fp;
|
_IO_FILE *fp;
|
||||||
{
|
{
|
||||||
_IO_size_t size;
|
_IO_size_t size;
|
||||||
int couldbetty;
|
|
||||||
char *p;
|
char *p;
|
||||||
struct _G_stat64 st;
|
struct _G_stat64 st;
|
||||||
|
|
||||||
@ -82,31 +83,29 @@ _IO_file_doallocate (fp)
|
|||||||
function it points to. This is to make sure _IO_cleanup gets called
|
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
|
on exit. We call it from _IO_file_doallocate, since that is likely
|
||||||
to get called by any program that does buffered I/O. */
|
to get called by any program that does buffered I/O. */
|
||||||
if (_IO_cleanup_registration_needed)
|
if (__builtin_expect (_IO_cleanup_registration_needed != NULL, 0))
|
||||||
(*_IO_cleanup_registration_needed) ();
|
(*_IO_cleanup_registration_needed) ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (fp->_fileno < 0 || _IO_SYSSTAT (fp, &st) < 0)
|
size = _IO_BUFSIZ;
|
||||||
|
if (fp->_fileno >= 0 && __builtin_expect (_IO_SYSSTAT (fp, &st), 0) >= 0)
|
||||||
{
|
{
|
||||||
couldbetty = 0;
|
if (S_ISCHR (st.st_mode))
|
||||||
size = _IO_BUFSIZ;
|
{
|
||||||
#if 0
|
/* Possibly a tty. */
|
||||||
/* do not try to optimise fseek() */
|
if (
|
||||||
fp->_flags |= __SNPT;
|
#ifdef DEV_TTY_P
|
||||||
|
DEV_TTY_P (st.st_rdev) ||
|
||||||
#endif
|
#endif
|
||||||
}
|
isatty (fp->_fileno))
|
||||||
else
|
fp->_flags |= _IO_LINE_BUF;
|
||||||
{
|
}
|
||||||
couldbetty = S_ISCHR (st.st_mode);
|
|
||||||
#if _IO_HAVE_ST_BLKSIZE
|
#if _IO_HAVE_ST_BLKSIZE
|
||||||
size = st.st_blksize <= 0 ? _IO_BUFSIZ : st.st_blksize;
|
if (st.st_blksize > 0)
|
||||||
#else
|
size = st.st_blksize;
|
||||||
size = _IO_BUFSIZ;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
ALLOC_BUF (p, size, EOF);
|
ALLOC_BUF (p, size, EOF);
|
||||||
_IO_setb (fp, p, p + size, 1);
|
_IO_setb (fp, p, p + size, 1);
|
||||||
if (couldbetty && isatty (fp->_fileno))
|
|
||||||
fp->_flags |= _IO_LINE_BUF;
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -2036,7 +2036,8 @@ new_heap(size) size_t size;
|
|||||||
if(p1 != MAP_FAILED) {
|
if(p1 != MAP_FAILED) {
|
||||||
p2 = (char *)(((unsigned long)p1 + (HEAP_MAX_SIZE-1)) & ~(HEAP_MAX_SIZE-1));
|
p2 = (char *)(((unsigned long)p1 + (HEAP_MAX_SIZE-1)) & ~(HEAP_MAX_SIZE-1));
|
||||||
ul = p2 - p1;
|
ul = p2 - p1;
|
||||||
munmap(p1, ul);
|
if (ul)
|
||||||
|
munmap(p1, ul);
|
||||||
munmap(p2 + HEAP_MAX_SIZE, HEAP_MAX_SIZE - ul);
|
munmap(p2 + HEAP_MAX_SIZE, HEAP_MAX_SIZE - ul);
|
||||||
} else {
|
} else {
|
||||||
/* Try to take the chance that an allocation of only HEAP_MAX_SIZE
|
/* Try to take the chance that an allocation of only HEAP_MAX_SIZE
|
||||||
|
@ -5347,7 +5347,9 @@ PREFIX(re_search_2) (bufp, string1, size1, string2, size2, startpos, range,
|
|||||||
/* Use internationalized API instead of SYNTAX. */
|
/* Use internationalized API instead of SYNTAX. */
|
||||||
# define WORDCHAR_P(d) \
|
# define WORDCHAR_P(d) \
|
||||||
(iswalnum ((wint_t)((d) == end1 ? *string2 \
|
(iswalnum ((wint_t)((d) == end1 ? *string2 \
|
||||||
: (d) == string2 - 1 ? *(end1 - 1) : *(d))) != 0)
|
: (d) == string2 - 1 ? *(end1 - 1) : *(d))) != 0 \
|
||||||
|
|| ((d) == end1 ? *string2 \
|
||||||
|
: (d) == string2 - 1 ? *(end1 - 1) : *(d)) == L'_')
|
||||||
#else /* BYTE */
|
#else /* BYTE */
|
||||||
# define WORDCHAR_P(d) \
|
# define WORDCHAR_P(d) \
|
||||||
(SYNTAX ((d) == end1 ? *string2 \
|
(SYNTAX ((d) == end1 ? *string2 \
|
||||||
|
Reference in New Issue
Block a user