aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/configure
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-11-07 17:58:55 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-11-07 17:58:55 +0000
commit52461cacec49af96b6b0643f4322e9fc0b36d403 (patch)
treeaaf6acf44516521f4f6604b822aecfff87e96d54 /configure
parentb897019f5696c540f454bcb428d44ad31ef65559 (diff)
downloadmandoc-52461cacec49af96b6b0643f4322e9fc0b36d403.tar.gz
mandoc-52461cacec49af96b6b0643f4322e9fc0b36d403.tar.zst
mandoc-52461cacec49af96b6b0643f4322e9fc0b36d403.zip
Modernization, no functional change intended:
Use the POSIX function getline(3) rather than the slightly dangerous BSD function fgetln(3). Remove the related compatibility code.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure9
1 files changed, 1 insertions, 8 deletions
diff --git a/configure b/configure
index cae2f5c9..108a4e58 100755
--- a/configure
+++ b/configure
@@ -44,7 +44,6 @@ BUILD_CGI=0
HAVE_DIRENT_NAMLEN=
HAVE_ERR=
-HAVE_FGETLN=
HAVE_FTS=
HAVE_GETSUBOPT=
HAVE_ISBLANK=
@@ -176,7 +175,6 @@ runtest() {
# --- library functions ---
runtest dirent-namlen DIRENT_NAMLEN || true
runtest err ERR || true
-runtest fgetln FGETLN || true
runtest fts FTS || true
runtest getsubopt GETSUBOPT || true
runtest isblank ISBLANK || true
@@ -289,11 +287,10 @@ cat << __HEREDOC__
__HEREDOC__
-[ ${HAVE_FGETLN} -eq 0 -o ${HAVE_REALLOCARRAY} -eq 0 -o \
+[ ${HAVE_REALLOCARRAY} -eq 0 -o \
${HAVE_STRLCAT} -eq 0 -o ${HAVE_STRLCPY} -eq 0 ] \
&& echo "#include <sys/types.h>"
[ ${HAVE_VASPRINTF} -eq 0 ] && echo "#include <stdarg.h>"
-[ ${HAVE_FGETLN} -eq 0 ] && echo "#include <stdio.h>"
echo
echo "#define MAN_CONF_FILE \"/etc/${MANM_MANCONF}\""
@@ -304,7 +301,6 @@ echo "#define MANPATH_DEFAULT \"${MANPATH_DEFAULT}\""
cat << __HEREDOC__
#define HAVE_DIRENT_NAMLEN ${HAVE_DIRENT_NAMLEN}
#define HAVE_ERR ${HAVE_ERR}
-#define HAVE_FGETLN ${HAVE_FGETLN}
#define HAVE_FTS ${HAVE_FTS}
#define HAVE_GETSUBOPT ${HAVE_GETSUBOPT}
#define HAVE_ISBLANK ${HAVE_ISBLANK}
@@ -343,9 +339,6 @@ if [ ${HAVE_ERR} -eq 0 ]; then
echo "extern void warnx(const char *, ...);"
fi
-[ ${HAVE_FGETLN} -eq 0 ] && \
- echo "extern char *fgetln(FILE *, size_t *);"
-
[ ${HAVE_GETSUBOPT} -eq 0 ] && \
echo "extern int getsubopt(char **, char * const *, char **);"