about summary refs log tree commit diff
path: root/include/stdint.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-12-21 02:30:29 -0500
committerRich Felker <dalias@aerifal.cx>2014-12-21 02:30:29 -0500
commitdac4fc49ae3ccb40bae4ef00fb2d93027f4ee9e1 (patch)
tree70c0f050d783e254ff90e95b3e41e00f2750be85 /include/stdint.h
parent814aae20093879dec36df0302febbafae2a66778 (diff)
downloadmusl-dac4fc49ae3ccb40bae4ef00fb2d93027f4ee9e1.tar.gz
musl-dac4fc49ae3ccb40bae4ef00fb2d93027f4ee9e1.tar.xz
musl-dac4fc49ae3ccb40bae4ef00fb2d93027f4ee9e1.zip
fix signedness of UINT32_MAX and UINT64_MAX at the preprocessor level
per the rules for hexadecimal integer constants, the previous
definitions were correctly treated as having unsigned type except
possibly when used in preprocessor conditionals, where all artithmetic
takes place as intmax_t or uintmax_t. the explicit 'u' suffix ensures
that they are treated as unsigned in all contexts.
Diffstat (limited to 'include/stdint.h')
-rw-r--r--include/stdint.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stdint.h b/include/stdint.h
index 518d05b9..a2968197 100644
--- a/include/stdint.h
+++ b/include/stdint.h
@@ -47,8 +47,8 @@ typedef uint64_t uint_least64_t;
 
 #define UINT8_MAX  (0xff)
 #define UINT16_MAX (0xffff)
-#define UINT32_MAX (0xffffffff)
-#define UINT64_MAX (0xffffffffffffffff)
+#define UINT32_MAX (0xffffffffu)
+#define UINT64_MAX (0xffffffffffffffffu)
 
 #define INT_FAST8_MIN   INT8_MIN
 #define INT_FAST64_MIN  INT64_MIN