]> granicus.if.org Git - vim/commitdiff
patch 8.2.2056: configure fails when building with implicit-function-declaration v8.2.2056
authorBram Moolenaar <Bram@vim.org>
Thu, 26 Nov 2020 19:11:11 +0000 (20:11 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 26 Nov 2020 19:11:11 +0000 (20:11 +0100)
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)

src/auto/configure
src/configure.ac
src/version.c

index 13eaea6f853817e7c80acf26c833d12adf30df99..d1359485b60883c9006d06967aca31514f22aaba 100755 (executable)
@@ -12350,10 +12350,18 @@ if test -c /dev/ptmx ; then
   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;
 }
index 457f2b82b13df7989b24b07594d06453abcf5266..010cc8f09ca6c0e20a781435c66d797e5ee4b1da 100644 (file)
@@ -3593,7 +3593,15 @@ fi
 
 AC_MSG_CHECKING(for SVR4 ptys)
 if test -c /dev/ptmx ; then
-  AC_TRY_LINK([], [ptsname(0);grantpt(0);unlockpt(0);],
+  AC_TRY_LINK([
+// These should be in stdlib.h, but it depends on _XOPEN_SOURCE.
+char *ptsname(int);
+int unlockpt(int);
+int grantpt(int);
+              ], [
+               ptsname(0);
+               grantpt(0);
+               unlockpt(0);],
        AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SVR4_PTYS),
        AC_MSG_RESULT(no))
 else
index 8c4c3fa665ceefaaad1fe3c00992a799f94c0f7b..0308c91209010f9663e5dc30406ecc33e765208b 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2056,
 /**/
     2055,
 /**/