Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/regex PR/56120: Chris Pinnock: build.sh (-m alpha) ...



details:   https://anonhg.NetBSD.org/src/rev/20411cfde5bc
branches:  trunk
changeset: 1020704:20411cfde5bc
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Apr 22 19:20:24 2021 +0000

description:
PR/56120: Chris Pinnock: build.sh (-m alpha) release fails on current on
Darwin in libc compilation
We build the regex code in tools without nls. We don't include any nls headers
for that, but on Darwin wint_t gets defined, so we end up with a compilation
error. The cleaner fix would have been to always use regex_foo_t types, but
the minimal fix is to only do this for the tools build, using cpp.

diffstat:

 lib/libc/regex/utils.h |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r ad5a04a5354b -r 20411cfde5bc lib/libc/regex/utils.h
--- a/lib/libc/regex/utils.h    Thu Apr 22 14:57:36 2021 +0000
+++ b/lib/libc/regex/utils.h    Thu Apr 22 19:20:24 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: utils.h,v 1.8 2021/02/25 21:28:40 christos Exp $       */
+/*     $NetBSD: utils.h,v 1.9 2021/04/22 19:20:24 christos Exp $       */
 
 /*-
  * SPDX-License-Identifier: BSD-3-Clause
@@ -43,6 +43,9 @@
 #include <wctype.h>
 #else
 #include <ctype.h>
+#define wint_t regex_wint_t
+#define mbstate_t regex_mbstate_t
+#define wctype_t regex_wctype_t
 typedef short wint_t;
 typedef char mbstate_t;
 typedef short wctype_t;



Home | Main Index | Thread Index | Old Index