aboutsummaryrefslogtreecommitdiff
path: root/sys/mips/include
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2017-08-26 03:21:12 +0000
committerConrad Meyer <cem@FreeBSD.org>2017-08-26 03:21:12 +0000
commit70dd00d6c069ba2bcd7239a7a8fb92c7fb9a6bcc (patch)
treeb7501d5c4ae9416937ae1a35a7789e1c970f93ed /sys/mips/include
parenta9f6545f430094136f68f8880173a9297e5afae5 (diff)
Notes
Diffstat (limited to 'sys/mips/include')
-rw-r--r--sys/mips/include/_limits.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/sys/mips/include/_limits.h b/sys/mips/include/_limits.h
index 06c164db4201d..b32baf0a32db7 100644
--- a/sys/mips/include/_limits.h
+++ b/sys/mips/include/_limits.h
@@ -75,17 +75,23 @@
#define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */
#define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */
+#ifdef __mips_n64
#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */
-
#define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */
-
-#define __OFF_MAX __LLONG_MAX /* max value for an off_t */
-#define __OFF_MIN __LLONG_MIN /* min value for an off_t */
-
-/* Quads and long longs are the same size. Ensure they stay in sync. */
-#define __UQUAD_MAX __ULLONG_MAX /* max value for a uquad_t */
-#define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */
-#define __QUAD_MIN __LLONG_MIN /* min value for a quad_t */
+#define __OFF_MAX __LONG_MAX /* max value for an off_t */
+#define __OFF_MIN __LONG_MIN /* min value for an off_t */
+#define __UQUAD_MAX __ULONG_MAX /* max value for a uquad_t */
+#define __QUAD_MAX __LONG_MAX /* max value for a quad_t */
+#define __QUAD_MIN __LONG_MIN /* min value for a quad_t */
+#else
+#define __SSIZE_MAX __INT_MAX
+#define __SIZE_T_MAX __UINT_MAX
+#define __OFF_MAX __LLONG_MAX
+#define __OFF_MIN __LLONG_MIN
+#define __UQUAD_MAX __ULLONG_MAX
+#define __QUAD_MAX __LLONG_MAX
+#define __QUAD_MIN __LLONG_MIN
+#endif
#define __WORD_BIT 32