Skip to content

Commit

Permalink
* libio/oldfileops.c (_IO_old_file_xsputn): Fix last patch.
Browse files Browse the repository at this point in the history
	Return EOF not 0.

	* sysdeps/unix/sysv/linux/readonly-area.c (__readonly_area): Also
	allow EACCES errors when opening /rpco for now.

	* wctype/wcfuncs.c: Don't use expensive wide char lookups in isw*
	functions if character is in ASCII range.
	* wctype/wcfuncs_l.c: Likewise.
  • Loading branch information
Ulrich Drepper committed Oct 17, 2005
1 parent 5d953ae commit 5d1d7ad
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2005-10-17 Ulrich Drepper <drepper@redhat.com>

* libio/oldfileops.c (_IO_old_file_xsputn): Fix last patch.
Return EOF not 0.

* sysdeps/unix/sysv/linux/readonly-area.c (__readonly_area): Also
allow EACCES errors when opening /rpco for now.

* wctype/wcfuncs.c: Don't use expensive wide char lookups in isw*
functions if character is in ASCII range.
* wctype/wcfuncs_l.c: Likewise.

2005-05-03 Robert Millan <robertmh@gnu.org>

* abi-tags (.*-.*-knetbsd.*-gnu.*): New match, with ABI value 4.
Expand Down
2 changes: 1 addition & 1 deletion libio/oldfileops.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ _IO_old_file_xsputn (f, data, n)
_IO_size_t block_size, do_write;
/* Next flush the (full) buffer. */
if (__overflow (f, EOF) == EOF)
return to_do == 0 ? 0 : n - to_do;
return to_do == 0 ? EOF : n - to_do;

/* Try to maintain alignment: write a whole number of blocks.
dont_write is what gets left over. */
Expand Down
13 changes: 9 additions & 4 deletions sysdeps/unix/sysv/linux/readonly-area.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,15 @@ __readonly_area (const char *ptr, size_t size)
FILE *fp = fopen ("/proc/self/maps", "rc");
if (fp == NULL)
{
if (errno == ENOENT)
/* It is the system administrator's choice to not have /proc
available to this process (e.g., because it runs in a chroot
environment. Don't fail in this case. */
/* It is the system administrator's choice to not have /proc
available to this process (e.g., because it runs in a chroot
environment. Don't fail in this case. */
if (errno == ENOENT
/* The kernel has a bug in that a process is denied access
to the /proc filesystem if it is set[ug]id. There has
been no willingness to change this in the kernel so
far. */
|| errno == EACCES)
return 1;
return -1;
}
Expand Down

0 comments on commit 5d1d7ad

Please sign in to comment.