comparison src/configure.ac @ 20249:4470e19bc790 v8.2.0680

patch 8.2.0680: PTYGROUP and PTYMODE are unused Commit: https://github.com/vim/vim/commit/01f731e97c92bee05927f5008b7cd34ce188632b Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 2 18:14:37 2020 +0200 patch 8.2.0680: PTYGROUP and PTYMODE are unused Problem: PTYGROUP and PTYMODE are unused. Solution: Remove from autoconf. (closes https://github.com/vim/vim/issues/6024)
author Bram Moolenaar <Bram@vim.org>
date Sat, 02 May 2020 18:15:04 +0200
parents 78f018fef092
children 05b4efb062a7
comparison
equal deleted inserted replaced
20248:76dfee7b1c1c 20249:4470e19bc790
3671 AC_MSG_RESULT([$p0 / $p1]) 3671 AC_MSG_RESULT([$p0 / $p1])
3672 else 3672 else
3673 AC_MSG_RESULT([don't know]) 3673 AC_MSG_RESULT([don't know])
3674 fi 3674 fi
3675 3675
3676 dnl **** pty mode/group handling ****
3677 dnl
3678 dnl support provided by Luke Mewburn <lm@rmit.edu.au>, 931222
3679 rm -f conftest_grp
3680 AC_CACHE_CHECK([default tty permissions/group], [vim_cv_tty_group],
3681 [
3682 AC_RUN_IFELSE([AC_LANG_SOURCE([[
3683 #include "confdefs.h"
3684 #include <sys/types.h>
3685 #if STDC_HEADERS
3686 # include <stdlib.h>
3687 # include <stddef.h>
3688 #endif
3689 #ifdef HAVE_UNISTD_H
3690 #include <unistd.h>
3691 #endif
3692 #include <sys/stat.h>
3693 #include <stdio.h>
3694 main()
3695 {
3696 struct stat sb;
3697 char *x,*ttyname();
3698 int om, m;
3699 FILE *fp;
3700
3701 if (!(x = ttyname(0))) exit(1);
3702 if (stat(x, &sb)) exit(1);
3703 om = sb.st_mode;
3704 if (om & 002) exit(0);
3705 m = system("mesg y");
3706 if (m == -1 || m == 127) exit(1);
3707 if (stat(x, &sb)) exit(1);
3708 m = sb.st_mode;
3709 if (chmod(x, om)) exit(1);
3710 if (m & 002) exit(0);
3711 if (sb.st_gid == getgid()) exit(1);
3712 if (!(fp=fopen("conftest_grp", "w")))
3713 exit(1);
3714 fprintf(fp, "%d\n", sb.st_gid);
3715 fclose(fp);
3716 exit(0);
3717 }
3718 ]])],[
3719 if test -f conftest_grp; then
3720 vim_cv_tty_group=`cat conftest_grp`
3721 if test "x$vim_cv_tty_mode" = "x" ; then
3722 vim_cv_tty_mode=0620
3723 fi
3724 AC_MSG_RESULT([pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group])
3725 else
3726 vim_cv_tty_group=world
3727 AC_MSG_RESULT([ptys are world accessible])
3728 fi
3729 ],[
3730 vim_cv_tty_group=world
3731 AC_MSG_RESULT([can't determine - assume ptys are world accessible])
3732 ],[
3733 AC_MSG_ERROR(cross-compiling: please set 'vim_cv_tty_group' and 'vim_cv_tty_mode')
3734 ])
3735 ])
3736 rm -f conftest_grp
3737
3738 if test "x$vim_cv_tty_group" != "xworld" ; then
3739 AC_DEFINE_UNQUOTED(PTYGROUP,$vim_cv_tty_group)
3740 if test "x$vim_cv_tty_mode" = "x" ; then
3741 AC_MSG_ERROR([It seems you're cross compiling and have 'vim_cv_tty_group' set, please also set the environment variable 'vim_cv_tty_mode' to the correct mode (probably 0620)])
3742 else
3743 AC_DEFINE(PTYMODE, 0620)
3744 fi
3745 fi
3746
3747 dnl Checks for library functions. =================================== 3676 dnl Checks for library functions. ===================================
3748 3677
3749 AC_TYPE_SIGNAL 3678 AC_TYPE_SIGNAL
3750 3679
3751 dnl find out what to use at the end of a signal function 3680 dnl find out what to use at the end of a signal function