+2011-09-09 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #12847]
+ * libio/genops.c (INTDEF): For string streams the _lock pointer can
+ be NULL. Don't lock in this case.
+
2011-07-29 Denis Zaitceff <zaitceff@gmail.com>
* string/strncat.c (strncat): Undef the symbol in case it has been
* The following bugs are resolved with this release:
- 9696, 12403, 12868, 12852, 12874, 12885, 12907, 12922, 12935, 13007,
- 13021, 13068, 13092, 13114, 13118, 13123, 13134, 13150
+ 9696, 12403, 12847, 12868, 12852, 12874, 12885, 12907, 12922, 12935,
+ 13007, 13021, 13068, 13092, 13114, 13118, 13123, 13134, 13150
* New program pldd to list loaded object of a process
Implemented by Ulrich Drepper.
-/* Copyright (C) 1993,1995,1997-2002, 2003, 2004, 2006, 2007
+/* Copyright (C) 1993,1995,1997-2002, 2003, 2004, 2006, 2007, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
f->_IO_write_ptr += count;
#endif
s += count;
- }
+ }
else if (count)
{
char *p = f->_IO_write_ptr;
for (i = count; --i >= 0; )
*p++ = *s++;
f->_IO_write_ptr = p;
- }
+ }
more -= count;
- }
+ }
if (more == 0 || _IO_OVERFLOW (f, (unsigned char) *s++) == EOF)
break;
more--;
while (--i >= 0)
*s++ = *p++;
fp->_IO_read_ptr = p;
- }
- more -= count;
- }
+ }
+ more -= count;
+ }
if (more == 0 || __underflow (fp) == EOF)
break;
}
int cnt;
#define MAXTRIES 2
for (cnt = 0; cnt < MAXTRIES; ++cnt)
- if (_IO_lock_trylock (*fp->_lock) == 0)
+ if (fp->_lock == NULL || _IO_lock_trylock (*fp->_lock) == 0)
break;
else
/* Give the other thread time to finish up its use of the
_IO_SETBUF (fp, NULL, 0);
- if (cnt < MAXTRIES)
+ if (cnt < MAXTRIES && fp->_lock != NULL)
_IO_lock_unlock (*fp->_lock);
}