summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2021-11-06 21:07:03 +1100
committerDarren Tucker <dtucker@dtucker.net>2021-11-06 21:09:48 +1100
commit7a78fe63b0b28ef7231913dfefe9d08f9bc41c61 (patch)
tree32dc7f7fc1a6fa23bc2ef2672d31bc9fe39f994a
parent343ae252ebb35c6ecae26b447bf1551a7666720e (diff)
Skip getline() on HP-UX 10.x.
HP-UX 10.x has a getline() implementation in libc that does not behave as we expect so don't use it. With correction from Thorsten Glaser and typo fix from Larkin Nickle.
-rw-r--r--configure.ac1
-rw-r--r--openbsd-compat/bsd-getline.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 57fcc9bc..165b391f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -765,6 +765,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
if test -z "$GCC"; then
CFLAGS="$CFLAGS -Ae"
fi
+ AC_DEFINE([BROKEN_GETLINE], [1], [getline is not what we expect])
;;
*-*-hpux11*)
AC_DEFINE([PAM_SUN_CODEBASE], [1],
diff --git a/openbsd-compat/bsd-getline.c b/openbsd-compat/bsd-getline.c
index d676f4ce..e51bd7a1 100644
--- a/openbsd-compat/bsd-getline.c
+++ b/openbsd-compat/bsd-getline.c
@@ -39,7 +39,7 @@
#include "file.h"
#endif
-#if !HAVE_GETLINE
+#if !defined(HAVE_GETLINE) || defined(BROKEN_GETLINE)
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>