summaryrefslogtreecommitdiff
path: root/include/limits.h
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:01:57 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 19:01:57 +0000
commitcab56836b146bc129f1ad43f0393d95a9deca63a (patch)
tree4f4e655319bbac78fca170da05275c127429b460 /include/limits.h
parent04ac1241a4cd004872282c2c82ec37fa33925292 (diff)
parent82dd75a7f436a19047325d62182590c9f9e23a78 (diff)
Merge branch 't/tls' into refs/top-bases/t/tls-threadvar
Diffstat (limited to 'include/limits.h')
-rw-r--r--include/limits.h44
1 files changed, 42 insertions, 2 deletions
diff --git a/include/limits.h b/include/limits.h
index 5add8fceb9..2e4fa683b5 100644
--- a/include/limits.h
+++ b/include/limits.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,8 @@
#ifndef _LIBC_LIMITS_H_
#define _LIBC_LIMITS_H_ 1
-#include <features.h>
+#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
+#include <bits/libc-header-start.h>
/* Maximum length of any multibyte character in any locale.
@@ -138,6 +139,45 @@
# endif
#endif
+/* The integer width macros are not defined by GCC's <limits.h> before
+ GCC 7, or if _GNU_SOURCE rather than
+ __STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature. */
+#if __GLIBC_USE (IEC_60559_BFP_EXT)
+# ifndef CHAR_WIDTH
+# define CHAR_WIDTH 8
+# endif
+# ifndef SCHAR_WIDTH
+# define SCHAR_WIDTH 8
+# endif
+# ifndef UCHAR_WIDTH
+# define UCHAR_WIDTH 8
+# endif
+# ifndef SHRT_WIDTH
+# define SHRT_WIDTH 16
+# endif
+# ifndef USHRT_WIDTH
+# define USHRT_WIDTH 16
+# endif
+# ifndef INT_WIDTH
+# define INT_WIDTH 32
+# endif
+# ifndef UINT_WIDTH
+# define UINT_WIDTH 32
+# endif
+# ifndef LONG_WIDTH
+# define LONG_WIDTH __WORDSIZE
+# endif
+# ifndef ULONG_WIDTH
+# define ULONG_WIDTH __WORDSIZE
+# endif
+# ifndef LLONG_WIDTH
+# define LLONG_WIDTH 64
+# endif
+# ifndef ULLONG_WIDTH
+# define ULLONG_WIDTH 64
+# endif
+#endif /* Use IEC_60559_BFP_EXT. */
+
#ifdef __USE_POSIX
/* POSIX adds things to <limits.h>. */
# include <bits/posix1_lim.h>