This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Define __intmax_t, __uintmax_t in bits/types.h


On 12/21/2016 02:17 PM, Joseph Myers wrote:
diff --git a/bits/types.h b/bits/types.h
index 01753bd..45b99fd 100644
--- a/bits/types.h
+++ b/bits/types.h
@@ -56,6 +56,17 @@ __extension__ typedef long long int __quad_t;
 __extension__ typedef unsigned long long int __u_quad_t;
 #endif

+/* Largest integral types.  */
+#if __WORDSIZE == 64
+typedef long int		__intmax_t;
+typedef unsigned long int	__uintmax_t;
+#else
+__extension__
+typedef long long int		__intmax_t;
+__extension__
+typedef unsigned long long int	__uintmax_t;
+#endif

I wouldn't put __extension__ on its own line for consistency with the other declarations in that file.

Otherwise, looks good to me.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]