Skip to content

Commit

Permalink
Fix localealias.c fgets_unlocked namespace (bug 17589).
Browse files Browse the repository at this point in the history
intl/localealias.c is brought in by ISO C functions, but uses
fgets_unlocked, which is not an ISO C function.  This patch changes
this to use __fgets_unlocked.

Tested for x86_64 (testsuite, and that stripped installed shared
libraries are unchanged by the patch).

	[BZ #17589]
	* intl/localealias.c [_LIBC] (FGETS): Use __fgets_unlocked instead
	of fgets_unlocked.
  • Loading branch information
Joseph Myers committed Nov 12, 2014
1 parent 9975e3d commit cc67478
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
2014-11-12 Joseph Myers <joseph@codesourcery.com>

[BZ #17589]
* intl/localealias.c [_LIBC] (FGETS): Use __fgets_unlocked instead
of fgets_unlocked.

[BZ #17585]
* string/memmem.c [!_LIBC] (__memmem): Define to memmem.
(memmem): Rename to __memmem and define as weak alias of
Expand Down
3 changes: 2 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ Version 2.21

6652, 12926, 14132, 14138, 14171, 15215, 15884, 17266, 17344, 17363,
17370, 17371, 17411, 17460, 17475, 17485, 17501, 17506, 17508, 17522,
17555, 17570, 17571, 17572, 17573, 17574, 17582, 17583, 17584, 17585.
17555, 17570, 17571, 17572, 17573, 17574, 17582, 17583, 17584, 17585,
17589.

* New locales: tu_IN, bh_IN.

Expand Down
2 changes: 1 addition & 1 deletion intl/localealias.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ __libc_lock_define_initialized (static, lock);
/* Some optimizations for glibc. */
#ifdef _LIBC
# define FEOF(fp) feof_unlocked (fp)
# define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp)
# define FGETS(buf, n, fp) __fgets_unlocked (buf, n, fp)
#else
# define FEOF(fp) feof (fp)
# define FGETS(buf, n, fp) fgets (buf, n, fp)
Expand Down

0 comments on commit cc67478

Please sign in to comment.