1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2020-11-26 20:11:11 +01:00
parent 2472a74be4
commit ce7be3a0e6
3 changed files with 20 additions and 2 deletions

10
src/auto/configure vendored
View File

@@ -12350,10 +12350,18 @@ if test -c /dev/ptmx ; then
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* 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 int
main () main ()
{ {
ptsname(0);grantpt(0);unlockpt(0);
ptsname(0);
grantpt(0);
unlockpt(0);
; ;
return 0; return 0;
} }

View File

@@ -3593,7 +3593,15 @@ fi
AC_MSG_CHECKING(for SVR4 ptys) AC_MSG_CHECKING(for SVR4 ptys)
if test -c /dev/ptmx ; then 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(yes); AC_DEFINE(HAVE_SVR4_PTYS),
AC_MSG_RESULT(no)) AC_MSG_RESULT(no))
else else

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2056,
/**/ /**/
2055, 2055,
/**/ /**/