From ee4418a834752ebb1ad74c6a08efe6f7996d8609 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 31 Aug 2015 02:47:48 +0200 Subject: wchar_t and wint_t not safe for marshalling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- include/bits/types.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/bits/types.h b/include/bits/types.h index d0d492c..ef64df2 100644 --- a/include/bits/types.h +++ b/include/bits/types.h @@ -63,6 +63,11 @@ typedef unsigned long int uptrdiff_t; * * 32 bits should be sufficient (long is at least 32 * bits), but why limit further than POSIX does. + * + * `wchar_t` is not safe for data serialisation/marshalling; + * it is implementation specific and may depend on the + * libc implementation, the version of the libc implementation, + * and the microarchitecture. */ #if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) # define __DEFINED_wchar_t @@ -73,6 +78,11 @@ typedef long int wchar_t; /** * Variant of `wchar_t` that can hold the value of `WEOF`. + * + * `wint_t` is not safe for data serialisation/marshalling; + * it is implementation specific and may depend on the + * libc implementation, the version of the libc implementation, + * and the microarchitecture. */ #if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) # define __DEFINED_wint_t -- cgit v1.2.3-70-g09d2