patch 8.2.2056: configure fails when building with implicit-function-declaration
Problem: Configure fails when building with the
"implicit-function-declaration" error enabled, specifically on Mac.
Solution: Declear the functions like in the source code. (suggestion by
Clemens Lang, closes #7380)
diff --git a/src/auto/configure b/src/auto/configure
index 13eaea6..d135948 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -12350,10 +12350,18 @@
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
+// These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
+char *ptsname(int);
+int unlockpt(int);
+int grantpt(int);
+
int
main ()
{
-ptsname(0);grantpt(0);unlockpt(0);
+
+ ptsname(0);
+ grantpt(0);
+ unlockpt(0);
;
return 0;
}