NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/59223: Build failure on Solaris-11.4 for src/include/regex.h
>Number: 59223
>Category: bin
>Synopsis: Build failure on Solaris-11.4 for src/include/regex.h
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Mar 26 17:25:00 +0000 2025
>Originator: Sad Clouds
>Release: NetBSD-10
>Organization:
>Environment:
SunOS t4-node1 5.11 11.4.42.111.0 sun4v sparc sun4v non-virtualized
>Description:
Building NetBSD-10 with build.sh fails:
In file included from /opt/netbsd/netbsd-10-src/tools/compat/regex.h:3,
from /opt/netbsd/netbsd-10-src/tools/mandoc/../../external/bsd/mdocml/bin/mandoc/../../dist/dba_read.c:22:
/opt/netbsd/netbsd-10-src/tools/compat/../../include/regex.h:135:14: error: expected ';' before 'int'
135 | __BEGIN_DECLS
| ^
| ;
136 | int regcomp(regex_t * __restrict, const char * __restrict, int);
| ~~~
/opt/netbsd/netbsd-10-src/tools/compat/../../include/regex.h:145:12: error: expected ';' before 'extern'
145 | __END_DECLS
| ^
| ;
I think these macros are not portable and probably obsolete.
>How-To-Repeat:
>Fix:
$ diff -u src/include/regex.h.orig src/include/regex.h
--- src/include/regex.h.orig 2025-03-26 09:19:45.655609768 +0000
+++ src/include/regex.h 2025-03-26 09:15:38.998649758 +0000
@@ -132,7 +132,10 @@
#define REG_LARGE 01000 /* force large representation */
#define REG_BACKR 02000 /* force use of backref code */
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int regcomp(regex_t * __restrict, const char * __restrict, int);
size_t regerror(int, const regex_t * __restrict, char * __restrict, size_t);
int regexec(const regex_t * __restrict,
@@ -142,6 +145,9 @@
ssize_t regnsub(char *, size_t, const char *, const regmatch_t *, const char *);
ssize_t regasub(char **buf, const char *, const regmatch_t *, const char *);
#endif
-__END_DECLS
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
#endif /* !_REGEX_H_ */
Home |
Main Index |
Thread Index |
Old Index