about summary refs log tree commit diff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-02-06 21:29:50 +0000
committerJoseph Myers <joseph@codesourcery.com>2018-02-06 21:29:50 +0000
commit663e7d784977f6b15c0cab73f754f9f39c9c0c2c (patch)
treee0c7e844ab63b1785c91d3231d9ae7ec6fe852c9 /sysdeps/unix/sysv
parent6d7aa2b531088c3a277911534179975eb2622954 (diff)
downloadglibc-663e7d784977f6b15c0cab73f754f9f39c9c0c2c.tar.gz
glibc-663e7d784977f6b15c0cab73f754f9f39c9c0c2c.tar.xz
glibc-663e7d784977f6b15c0cab73f754f9f39c9c0c2c.zip
Only define loff_t for __USE_MISC (bug 14553).
Bug 14553 reports that sys/types.h defines loff_t unconditionally,
despite it not being part of any supported standard.  This is
permitted by the POSIX *_t reservation, but as a
quality-of-implementation issue it's still best not to define it
except for __USE_MISC.  This patch conditions the definition
accordingly, updating a macro in sysdeps/unix/sysv/linux/sys/quota.h
to use __loff_t so it still works even if __USE_MISC is not defined.

codesearch.debian.net suggests there are quite a lot of loff_t uses
outside glibc, but it might well make sense to change all (few) uses
of loff_t or __loff_t inside glibc to use off64_t or __off64_t
instead, leaving only the definitions, treating this name as
obsolescent.

Tested for x86_64.

	[BZ #14553]
	* posix/sys/types.h (loff_t): Only define for [__USE_MISC].
	* sysdeps/unix/sysv/linux/sys/quota.h (dqoff): Use __loff_t
	instead of loff_t.
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/sys/quota.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/sys/quota.h b/sysdeps/unix/sysv/linux/sys/quota.h
index c2a0aaa88d..23f569ee9a 100644
--- a/sysdeps/unix/sysv/linux/sys/quota.h
+++ b/sysdeps/unix/sysv/linux/sys/quota.h
@@ -114,7 +114,7 @@ struct dqblk
 #define	dq_btime	dq_dqb.dqb_btime
 #define	dq_itime	dq_dqb.dqb_itime
 
-#define dqoff(UID)      ((loff_t)((UID) * sizeof (struct dqblk)))
+#define dqoff(UID)      ((__loff_t)((UID) * sizeof (struct dqblk)))
 
 /* Old name for struct if_dqinfo.  */
 struct dqinfo