Mercurial > vim
comparison src/auto/configure @ 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 |
---|---|
12474 else | 12474 else |
12475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: don't know" >&5 | 12475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: don't know" >&5 |
12476 $as_echo "don't know" >&6; } | 12476 $as_echo "don't know" >&6; } |
12477 fi | 12477 fi |
12478 | 12478 |
12479 rm -f conftest_grp | |
12480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking default tty permissions/group" >&5 | |
12481 $as_echo_n "checking default tty permissions/group... " >&6; } | |
12482 if ${vim_cv_tty_group+:} false; then : | |
12483 $as_echo_n "(cached) " >&6 | |
12484 else | |
12485 | |
12486 if test "$cross_compiling" = yes; then : | |
12487 | |
12488 as_fn_error $? "cross-compiling: please set 'vim_cv_tty_group' and 'vim_cv_tty_mode'" "$LINENO" 5 | |
12489 | |
12490 else | |
12491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
12492 /* end confdefs.h. */ | |
12493 | |
12494 #include "confdefs.h" | |
12495 #include <sys/types.h> | |
12496 #if STDC_HEADERS | |
12497 # include <stdlib.h> | |
12498 # include <stddef.h> | |
12499 #endif | |
12500 #ifdef HAVE_UNISTD_H | |
12501 #include <unistd.h> | |
12502 #endif | |
12503 #include <sys/stat.h> | |
12504 #include <stdio.h> | |
12505 main() | |
12506 { | |
12507 struct stat sb; | |
12508 char *x,*ttyname(); | |
12509 int om, m; | |
12510 FILE *fp; | |
12511 | |
12512 if (!(x = ttyname(0))) exit(1); | |
12513 if (stat(x, &sb)) exit(1); | |
12514 om = sb.st_mode; | |
12515 if (om & 002) exit(0); | |
12516 m = system("mesg y"); | |
12517 if (m == -1 || m == 127) exit(1); | |
12518 if (stat(x, &sb)) exit(1); | |
12519 m = sb.st_mode; | |
12520 if (chmod(x, om)) exit(1); | |
12521 if (m & 002) exit(0); | |
12522 if (sb.st_gid == getgid()) exit(1); | |
12523 if (!(fp=fopen("conftest_grp", "w"))) | |
12524 exit(1); | |
12525 fprintf(fp, "%d\n", sb.st_gid); | |
12526 fclose(fp); | |
12527 exit(0); | |
12528 } | |
12529 | |
12530 _ACEOF | |
12531 if ac_fn_c_try_run "$LINENO"; then : | |
12532 | |
12533 if test -f conftest_grp; then | |
12534 vim_cv_tty_group=`cat conftest_grp` | |
12535 if test "x$vim_cv_tty_mode" = "x" ; then | |
12536 vim_cv_tty_mode=0620 | |
12537 fi | |
12538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group" >&5 | |
12539 $as_echo "pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group" >&6; } | |
12540 else | |
12541 vim_cv_tty_group=world | |
12542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ptys are world accessible" >&5 | |
12543 $as_echo "ptys are world accessible" >&6; } | |
12544 fi | |
12545 | |
12546 else | |
12547 | |
12548 vim_cv_tty_group=world | |
12549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't determine - assume ptys are world accessible" >&5 | |
12550 $as_echo "can't determine - assume ptys are world accessible" >&6; } | |
12551 | |
12552 fi | |
12553 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
12554 conftest.$ac_objext conftest.beam conftest.$ac_ext | |
12555 fi | |
12556 | |
12557 | |
12558 fi | |
12559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tty_group" >&5 | |
12560 $as_echo "$vim_cv_tty_group" >&6; } | |
12561 rm -f conftest_grp | |
12562 | |
12563 if test "x$vim_cv_tty_group" != "xworld" ; then | |
12564 cat >>confdefs.h <<_ACEOF | |
12565 #define PTYGROUP $vim_cv_tty_group | |
12566 _ACEOF | |
12567 | |
12568 if test "x$vim_cv_tty_mode" = "x" ; then | |
12569 as_fn_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)" "$LINENO" 5 | |
12570 else | |
12571 $as_echo "#define PTYMODE 0620" >>confdefs.h | |
12572 | |
12573 fi | |
12574 fi | |
12575 | |
12576 | 12479 |
12577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 | 12480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 |
12578 $as_echo_n "checking return type of signal handlers... " >&6; } | 12481 $as_echo_n "checking return type of signal handlers... " >&6; } |
12579 if ${ac_cv_type_signal+:} false; then : | 12482 if ${ac_cv_type_signal+:} false; then : |
12580 $as_echo_n "(cached) " >&6 | 12483 $as_echo_n "(cached) " >&6 |