Patch 8.2.0680
Problem:    PTYGROUP and PTYMODE are unused.
Solution:   Remove from autoconf. (closes #6024)
Files:      src/configure.ac, src/auto/configure, src/config.h.in


*** ../vim-8.2.0679/src/configure.ac    2020-04-20 16:21:50.269555351 +0200
--- src/configure.ac    2020-05-02 18:06:00.277864947 +0200
***************
*** 3673,3749 ****
    AC_MSG_RESULT([don't know])
  fi
  
- dnl    ****  pty mode/group handling ****
- dnl
- dnl support provided by Luke Mewburn <[email protected]>, 931222
- rm -f conftest_grp
- AC_CACHE_CHECK([default tty permissions/group], [vim_cv_tty_group],
-   [
-     AC_RUN_IFELSE([AC_LANG_SOURCE([[
- #include "confdefs.h"
- #include <sys/types.h>
- #if STDC_HEADERS
- # include <stdlib.h>
- # include <stddef.h>
- #endif
- #ifdef HAVE_UNISTD_H
- #include <unistd.h>
- #endif
- #include <sys/stat.h>
- #include <stdio.h>
- main()
- {
-   struct stat sb;
-   char *x,*ttyname();
-   int om, m;
-   FILE *fp;
- 
-   if (!(x = ttyname(0))) exit(1);
-   if (stat(x, &sb)) exit(1);
-   om = sb.st_mode;
-   if (om & 002) exit(0);
-   m = system("mesg y");
-   if (m == -1 || m == 127) exit(1);
-   if (stat(x, &sb)) exit(1);
-   m = sb.st_mode;
-   if (chmod(x, om)) exit(1);
-   if (m & 002) exit(0);
-   if (sb.st_gid == getgid()) exit(1);
-   if (!(fp=fopen("conftest_grp", "w")))
-     exit(1);
-   fprintf(fp, "%d\n", sb.st_gid);
-   fclose(fp);
-   exit(0);
- }
-     ]])],[
-       if test -f conftest_grp; then
-       vim_cv_tty_group=`cat conftest_grp`
-       if test "x$vim_cv_tty_mode" = "x" ; then
-         vim_cv_tty_mode=0620
-       fi
-       AC_MSG_RESULT([pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group])
-       else
-       vim_cv_tty_group=world
-       AC_MSG_RESULT([ptys are world accessible])
-       fi
-     ],[
-       vim_cv_tty_group=world
-       AC_MSG_RESULT([can't determine - assume ptys are world accessible])
-     ],[
-       AC_MSG_ERROR(cross-compiling: please set 'vim_cv_tty_group' and 
'vim_cv_tty_mode')
-     ])
-   ])
- rm -f conftest_grp
- 
- if test "x$vim_cv_tty_group" != "xworld" ; then
-   AC_DEFINE_UNQUOTED(PTYGROUP,$vim_cv_tty_group)
-   if test "x$vim_cv_tty_mode" = "x" ; then
-     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)])
-   else
-     AC_DEFINE(PTYMODE, 0620)
-   fi
- fi
- 
  dnl Checks for library functions. ===================================
  
  AC_TYPE_SIGNAL
--- 3673,3678 ----
*** ../vim-8.2.0679/src/auto/configure  2020-04-20 16:21:50.269555351 +0200
--- src/auto/configure  2020-05-02 18:06:02.793856780 +0200
***************
*** 12476,12578 ****
  $as_echo "don't know" >&6; }
  fi
  
- rm -f conftest_grp
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking default tty 
permissions/group" >&5
- $as_echo_n "checking default tty permissions/group... " >&6; }
- if ${vim_cv_tty_group+:} false; then :
-   $as_echo_n "(cached) " >&6
- else
- 
-     if test "$cross_compiling" = yes; then :
- 
-       as_fn_error $? "cross-compiling: please set 'vim_cv_tty_group' and 
'vim_cv_tty_mode'" "$LINENO" 5
- 
- else
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- 
- #include "confdefs.h"
- #include <sys/types.h>
- #if STDC_HEADERS
- # include <stdlib.h>
- # include <stddef.h>
- #endif
- #ifdef HAVE_UNISTD_H
- #include <unistd.h>
- #endif
- #include <sys/stat.h>
- #include <stdio.h>
- main()
- {
-   struct stat sb;
-   char *x,*ttyname();
-   int om, m;
-   FILE *fp;
- 
-   if (!(x = ttyname(0))) exit(1);
-   if (stat(x, &sb)) exit(1);
-   om = sb.st_mode;
-   if (om & 002) exit(0);
-   m = system("mesg y");
-   if (m == -1 || m == 127) exit(1);
-   if (stat(x, &sb)) exit(1);
-   m = sb.st_mode;
-   if (chmod(x, om)) exit(1);
-   if (m & 002) exit(0);
-   if (sb.st_gid == getgid()) exit(1);
-   if (!(fp=fopen("conftest_grp", "w")))
-     exit(1);
-   fprintf(fp, "%d\n", sb.st_gid);
-   fclose(fp);
-   exit(0);
- }
- 
- _ACEOF
- if ac_fn_c_try_run "$LINENO"; then :
- 
-       if test -f conftest_grp; then
-       vim_cv_tty_group=`cat conftest_grp`
-       if test "x$vim_cv_tty_mode" = "x" ; then
-         vim_cv_tty_mode=0620
-       fi
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: pty mode: 
$vim_cv_tty_mode, group: $vim_cv_tty_group" >&5
- $as_echo "pty mode: $vim_cv_tty_mode, group: $vim_cv_tty_group" >&6; }
-       else
-       vim_cv_tty_group=world
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ptys are world 
accessible" >&5
- $as_echo "ptys are world accessible" >&6; }
-       fi
- 
- else
- 
-       vim_cv_tty_group=world
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't determine - 
assume ptys are world accessible" >&5
- $as_echo "can't determine - assume ptys are world accessible" >&6; }
- 
- fi
- rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-   conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
- 
- 
- fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vim_cv_tty_group" >&5
- $as_echo "$vim_cv_tty_group" >&6; }
- rm -f conftest_grp
- 
- if test "x$vim_cv_tty_group" != "xworld" ; then
-   cat >>confdefs.h <<_ACEOF
- #define PTYGROUP $vim_cv_tty_group
- _ACEOF
- 
-   if test "x$vim_cv_tty_mode" = "x" ; then
-     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
-   else
-     $as_echo "#define PTYMODE 0620" >>confdefs.h
- 
-   fi
- fi
- 
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal 
handlers" >&5
  $as_echo_n "checking return type of signal handlers... " >&6; }
--- 12476,12481 ----
*** ../vim-8.2.0679/src/config.h.in     2020-04-18 18:24:13.110776118 +0200
--- src/config.h.in     2020-05-02 18:05:27.477971081 +0200
***************
*** 126,137 ****
  #undef PTYRANGE0
  #undef PTYRANGE1
  
- /* Define mode for pty */
- #undef PTYMODE
- 
- /* Define group for pty */
- #undef PTYGROUP
- 
  /* Define as the return type of signal handlers (int or void).  */
  #undef RETSIGTYPE
  
--- 126,131 ----
*** ../vim-8.2.0679/src/version.c       2020-05-02 17:52:38.404147677 +0200
--- src/version.c       2020-05-02 18:14:23.396182035 +0200
***************
*** 748,749 ****
--- 748,751 ----
  {   /* Add new patch number below this line */
+ /**/
+     680,
  /**/

-- 
I wonder how much deeper the ocean would be without sponges.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202005021615.042GF5ZE013716%40masaka.moolenaar.net.

Raspunde prin e-mail lui