From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12994 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH] uchar.h: define char16_t and char32_t for old c++ Date: Sun, 8 Jul 2018 15:19:03 +0200 Message-ID: <20180708131902.GE4418@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1531055831 25971 195.159.176.226 (8 Jul 2018 13:17:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 8 Jul 2018 13:17:11 +0000 (UTC) User-Agent: Mutt/1.9.1 (2017-09-22) To: musl@lists.openwall.com Original-X-From: musl-return-13010-gllmg-musl=m.gmane.org@lists.openwall.com Sun Jul 08 15:17:06 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1fc9Yo-0006eY-Po for gllmg-musl@m.gmane.org; Sun, 08 Jul 2018 15:17:06 +0200 Original-Received: (qmail 13698 invoked by uid 550); 8 Jul 2018 13:19:15 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 13664 invoked from network); 8 Jul 2018 13:19:15 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline Xref: news.gmane.org gmane.linux.lib.musl.general:12994 Archived-At: including uchar.h in c++ code is only well defined in c++11 onwards where char16_t and char32_t type definitions must be hidden since they are keywords. however some c++ code compiled for older c++ standard include uchar.h too and they need the typedefs, this fix makes such code work. --- include/uchar.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uchar.h b/include/uchar.h index 8dabf1ed..7e5c4d40 100644 --- a/include/uchar.h +++ b/include/uchar.h @@ -3,7 +3,9 @@ #ifdef __cplusplus extern "C" { -#else +#endif + +#if __cplusplus < 201103L typedef unsigned short char16_t; typedef unsigned char32_t; #endif -- 2.16.3