summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-08-17 20:53:50 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-08-17 20:53:50 +0000
commitf845a3643bca2ca958e02d8fb6b9a018e8033b14 (patch)
treeabbd6c8f5f919bfe2502fe984ef0f9566cb9681a /configure
parent8d82ccaaedf7599071b86e2805fed023f23e0145 (diff)
downloadmandoc-f845a3643bca2ca958e02d8fb6b9a018e8033b14.tar.gz
Do not require getsubopt() to provide extern char *suboptarg.
We don't use it anyway in mandoc. Like this, fewer systems need the compat implementation. In particular, we can now use the stock getsubopt() on glibc and musl. Besides, the comment in the BSD getsubopt.c that error messages are tricky without *suboptarg is massively overblown. If you simply save a copy of the pointer you pass into getsubopt(), that's quite usable for an error message. People start campaigning for the addition of *suboptarg to C libraries on the grounds that mandoc wants it, but actually, i consider library functions manipulating global data quite ugly, so stop pushing people into that questionable direction. While here, add an explicit Copyright header to the test file. While it's obviously to me what Kristaps intended, others might consider this file copyrightable and wonder what's up.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure4
1 files changed, 1 insertions, 3 deletions
diff --git a/configure b/configure
index eb9311e3..baa05ad4 100755
--- a/configure
+++ b/configure
@@ -305,10 +305,8 @@ __HEREDOC__
[ ${HAVE_FGETLN} -eq 0 ] && \
echo "extern char *fgetln(FILE *, size_t *);"
-if [ ${HAVE_GETSUBOPT} -eq 0 ]; then
+[ ${HAVE_GETSUBOPT} -eq 0 ] && \
echo "extern int getsubopt(char **, char * const *, char **);"
- echo "extern char *suboptarg;"
-fi
[ ${HAVE_REALLOCARRAY} -eq 0 ] && \
echo "extern void *reallocarray(void *, size_t, size_t);"