musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/include/stdint.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011年10月04日 11:50:35 -0400
committerRich Felker <dalias@aerifal.cx>2011年10月04日 11:50:35 -0400
commit73f5ff4e8646a5fddbeae5070a53f05870e51dd1 (patch)
tree5437f28acccb84654226b762680a0e0829477efd /include/stdint.h
parent5e977e8b48c6862767ea0a1255233600957c05db (diff)
downloadmusl-73f5ff4e8646a5fddbeae5070a53f05870e51dd1.tar.gz
make [U]INTn_C() macros have the right type...
...and still be valid in #if directives.
Diffstat (limited to 'include/stdint.h')
-rw-r--r--include/stdint.h 8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/stdint.h b/include/stdint.h
index 54006678..634678a2 100644
--- a/include/stdint.h
+++ b/include/stdint.h
@@ -85,13 +85,13 @@ typedef unsigned long long uintmax_t;
#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
-#define INT8_C(c) c
-#define INT16_C(c) c
+#define INT8_C(c) ((int8_t) + (c))
+#define INT16_C(c) ((int16_t) + (c))
#define INT32_C(c) c
#define INT64_C(c) c ## LL
-#define UINT8_C(c) c ## U
-#define UINT16_C(c) c ## U
+#define UINT8_C(c) ((uint8_t) + (c))
+#define UINT16_C(c) ((uint16_t) + (c))
#define UINT32_C(c) c ## U
#define UINT64_C(c) c ## ULL
generated by cgit v1.2.1 (git 2.18.0) at 2025年11月07日 05:24:59 +0000

AltStyle によって変換されたページ (->オリジナル) /