aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/bits/types.h21
-rw-r--r--include/stdint.h10
2 files changed, 19 insertions, 12 deletions
diff --git a/include/bits/types.h b/include/bits/types.h
index ef64df2..58c6064 100644
--- a/include/bits/types.h
+++ b/include/bits/types.h
@@ -19,6 +19,7 @@
* headers to be able to define types by including this
* header without the need of keeping in mind which
* order headers are included. */
+#include <slibc/features.h>
#include <bits/intconf.h>
@@ -53,6 +54,7 @@ typedef unsigned long int uptrdiff_t;
#endif
+#ifndef _PORTABLE_SOURCE
/**
* Integer type which can represent any character.
* May not be greater than the with of type long.
@@ -69,11 +71,12 @@ typedef unsigned long int uptrdiff_t;
* libc implementation, the version of the libc implementation,
* and the microarchitecture.
*/
-#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
-# define __DEFINED_wchar_t
-typedef long int wchar_t;
-# define __WCHAR_MAX INTPTR_MAX
-#endif
+# if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t)
+# define __DEFINED_wchar_t
+typedef long int wchar_t
+ __warning("'wchar_t' is not guaranteed to be defined as expected, use 'int32_t'.");
+# define __WCHAR_MAX INTPTR_MAX
+# endif
/**
@@ -84,9 +87,11 @@ typedef long int wchar_t;
* libc implementation, the version of the libc implementation,
* and the microarchitecture.
*/
-#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
-# define __DEFINED_wint_t
-typedef wchar_t wint_t;
+# if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t)
+# define __DEFINED_wint_t
+typedef wchar_t wint_t
+ __warning("'wint_t' is not guaranteed to be defined as expected, use 'int32_t'.");
+# endif
#endif
diff --git a/include/stdint.h b/include/stdint.h
index 3486de3..a8cb426 100644
--- a/include/stdint.h
+++ b/include/stdint.h
@@ -376,26 +376,28 @@
#define SSIZE_MIN INTPTR_MIN
+#ifndef _PORTABLE_SOURCE
/**
* Maximum value of `wchar_t`.
*/
-#define WCHAR_MAX __WCHAR_MAX
+# define WCHAR_MAX __WCHAR_MAX
/**
* Minimum value of `wchar_t`.
*/
-#define WCHAR_MIN (__MAX_TO_MIN(WCHAR_MAX))
+# define WCHAR_MIN (__MAX_TO_MIN(WCHAR_MAX))
/**
* Maximum value of `wint_t`.
*/
-#define WINT_MAX WCHAR_MAX
+# define WINT_MAX WCHAR_MAX
/**
* Minimum value of `wint_t`.
*/
-#define WINT_MIN WCHAR_MIN
+# define WINT_MIN WCHAR_MIN
+#endif
/**