summary refs log tree commit diff
path: root/ChangeLog
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2016-12-30 13:41:40 +0000
committerJoseph Myers <joseph@codesourcery.com>2016-12-30 13:41:40 +0000
commit769998892d4f39d912fbe147eca9a3e89318cffc (patch)
tree4a48412811e917204f2eb4002debb612894491fd /ChangeLog
parentef83c83a257226d470a939434c7193e2a1fd4f82 (diff)
downloadglibc-769998892d4f39d912fbe147eca9a3e89318cffc.tar.gz
glibc-769998892d4f39d912fbe147eca9a3e89318cffc.tar.xz
glibc-769998892d4f39d912fbe147eca9a3e89318cffc.zip
Define __intmax_t, __uintmax_t in bits/types.h.
TS 18661-1 defines *fromfp* functions, which are declared in math.h
and whose return types are intmax_t and uintmax_t, without allowing
math.h to define those typedefs.  (This is similar to e.g. ISO C
declaring vprintf in stdio.h without allowing that header to define
va_list.)  Thus, math.h needs to access those typedefs under internal
names.

This patch accordingly arranges for bits/types.h (which defines only
internal names, not public *_t typedefs) to define __intmax_t and
__uintmax_t.  stdint.h is made to use bits/types.h and define intmax_t
and uintmax_t using __intmax_t and __uintmax_t, to avoid duplication
of information.  (It would be reasonable to define more of the types
in stdint.h - and in sys/types.h, where it duplicates such types -
using information already available in bits/types.h.)  The idea is
that the subsequent addition of fromfp functions would then make
math.h include bits/types.h and use __intmax_t and __uintmax_t as the
return types of those functions.

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

	* bits/types.h (__intmax_t): New typedef.
	(__uintmax_t): Likewise.
	* sysdeps/generic/stdint.h: Include <bits/types.h>.
	(intmax_t): Define using __intmax_t.
	(uintmax_t): Define using __uintmax_t.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog6
1 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ad20821e7c..abb3696b44 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2016-12-30  Joseph Myers  <joseph@codesourcery.com>
 
+	* bits/types.h (__intmax_t): New typedef.
+	(__uintmax_t): Likewise.
+	* sysdeps/generic/stdint.h: Include <bits/types.h>.
+	(intmax_t): Define using __intmax_t.
+	(uintmax_t): Define using __uintmax_t.
+
 	* support/Makefile (tests-special): Make definition conditional on
 	[$(run-built-tests) = yes].
 	($(objpfx)tst-support_record_failure-2.out): Make rule conditional