glibc/time
Joseph Myers 5a6fa4d7ed Fix tzfile.c namespace (bug 17583).
tzfile.c is brought in by various ISO C functions, but calls fileno,
fread_unlocked and ftello, which are not ISO C functions.  This patch
adds names __fileno, __fread_unlocked and __ftello for those
functions, making tzfile.c use those new names.

Note: there are various uses of fileno elsewhere in glibc that I
didn't change, although it may turn out that some of those also need
to use __fileno.

Tested for x86_64 with the glibc testsuite.  Changed line numbers in
tzfile.c cause changes in assertions, and for some reason this ends up
with different instruction choice and register allocation, affecting
the size of __tzfile_read and so making comparison of disassembly for
libc.so problematic.

	[BZ #17583]
	* libio/fileno.c (fileno): Rename to __fileno and define as weak
	alias of __fileno.  Use libc_hidden_weak.
	(__fileno): Use libc_hidden_def.
	[weak_alias] (fileno_unlocked): Define as weak alias of __fileno.
	* libio/ftello.c (ftello): Rename to __ftello and define as weak
	alias of __ftello.
	[__OFF_T_MATCHES_OFF64_T] (ftello64): Define as weak alias of
	__ftello.
	* libio/iofread.c [weak_alias && !_IO_MTSAFE_IO]
	(__fread_unlocked): Define as strong alias of _IO_fread.  Use
	libc_hidden_def.
	(fread_unlocked): Don't use libc_hidden_ver.
	* libio/iofread_u.c (fread_unlocked): Rename to __fread_unlocked
	and define as weak alias of __fread_unlocked.  Don't use
	libc_hidden_def.
	(__fread_unlocked): Use libc_hidden_def.
	* include/stdio.h (__fileno): Declare.  Use libc_hidden_proto.
	(ftello): Don't use libc_hidden_proto.
	(__ftello): Declare.  Use libc_hidden_proto.
	(fread_unlocked): Don't use libc_hidden_proto.
	(__fread_unlocked): Declare.  Use libc_hidden_proto.
	* time/tzfile.c (__tzfile_read): Use __fileno, __fread_unlocked
	and __ftello instead of fileno, fread_unlocked and ftello.
2014-11-12 16:22:51 +00:00
..
sys Complete _BSD_SOURCE / _SVID_source followup cleanup. 2014-02-21 21:45:26 +00:00
adjtime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
alt_digit.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
asctime.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
bug-asctime_r.c
bug-asctime.c
bug-getdate1.c * time/bug-getdate1.c (do_test): Don't use century values which 2007-12-12 18:23:00 +00:00
bug-mktime1.c
clock.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
clocktest.c
ctime_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ctime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
datemsk
Depend
difftime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
dysize.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
era.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ftime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getdate.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getitimer.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gettimeofday.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
gmtime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
lc-time-cleanup.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
localtime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Makefile New test for ftime 2014-09-18 13:26:53 +05:30
mktime.c Sync up mktime with gnulib 2014-06-28 06:15:54 +05:30
offtime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
setitimer.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
settimeofday.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strftime_l.c Fix Wundef warning for HAVE_STRFTIME 2014-07-10 14:20:42 +05:30
strftime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
strptime_l.c Fix -Wundef warning for HAVE_LOCALTIME_R 2014-07-10 14:21:27 +05:30
strptime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
test_time.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
time.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
time.h Complete _BSD_SOURCE / _SVID_source followup cleanup. 2014-02-21 21:45:26 +00:00
timegm.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
timespec_get.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst_wcsftime.c
tst-ftime_l.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-ftime.c New test for ftime 2014-09-18 13:26:53 +05:30
tst-getdate.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-mktime2.c Testsuite #include fixes. 2012-04-02 22:31:32 +02:00
tst-mktime3.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-mktime.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-posixtz.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-strftime.c
tst-strptime2.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-strptime3.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-strptime-whitespace.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tst-strptime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
tzfile.c Fix tzfile.c namespace (bug 17583). 2014-11-12 16:22:51 +00:00
tzset.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
Versions Sort Versions files 2013-02-17 16:34:04 +01:00
wcsftime_l.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wcsftime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00