Ticket #12280: patch-lib_string.cpp

File patch-lib_string.cpp, 534 bytes (added by Thomas Klausner, 4 years ago)
Line 
1$NetBSD: patch-lib_string.cpp,v 1.9 2020/09/18 08:55:45 jperkin Exp $
2
3Use std::wcsnrtombs() on SunOS.
4
5--- lib/string.cpp.orig 2020-07-07 12:06:31.000000000 +0000
6+++ lib/string.cpp
7@@ -13,6 +13,10 @@
8
9 #include <cstdlib>
10
11+#ifdef __sun
12+using std::wcsnrtombs;
13+#endif
14+
15 static_assert('a' + 25 == 'z', "We only support systems running with an ASCII-based character set. Sorry, no EBCDIC.");
16
17 // char may be unsigned, yielding stange results if subtracting characters. To work around it, expect a particular order of characters.