patch 8.0.0445: getpgid is not supported on all systems v8.0.0445
authorBram Moolenaar <Bram@vim.org>
Sat, 11 Mar 2017 19:03:42 +0000 (20:03 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 11 Mar 2017 19:03:42 +0000 (20:03 +0100)
Problem:    Getpgid is not supported on all systems.
Solution:   Add a configure check.

src/auto/configure
src/config.h.in
src/configure.ac
src/os_unix.c
src/version.c

index 34770f8baf3bd9e69cd96f987ca2aacfb9bb3cbe..73b9ce7d56b958700c44ba728ea827da2c35eae8 100755 (executable)
@@ -12022,7 +12022,7 @@ fi
 for ac_func in fchdir fchown fsync getcwd getpseudotty \
        getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
        memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
-       setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
+       getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
        sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
        strnicmp strpbrk strtol tgetent towlower towupper iswupper \
        usleep utime utimes
index 38b0ccf53e18a00016cdccf3d23212d427b7ea06..49ed596f47649fd8c6ea711770793666d1717835 100644 (file)
 #undef HAVE_FCHOWN
 #undef HAVE_FSEEKO
 #undef HAVE_FSYNC
+#undef HAVE_FLOAT_FUNCS
 #undef HAVE_GETCWD
+#undef HAVE_GETPGID
 #undef HAVE_GETPSEUDOTTY
 #undef HAVE_GETPWENT
 #undef HAVE_GETPWNAM
 #undef HAVE_GETTIMEOFDAY
 #undef HAVE_GETWD
 #undef HAVE_ICONV
-#undef HAVE_NL_LANGINFO_CODESET
 #undef HAVE_LSTAT
 #undef HAVE_MEMSET
 #undef HAVE_MKDTEMP
 #undef HAVE_NANOSLEEP
+#undef HAVE_NL_LANGINFO_CODESET
 #undef HAVE_OPENDIR
-#undef HAVE_FLOAT_FUNCS
 #undef HAVE_PUTENV
 #undef HAVE_QSORT
 #undef HAVE_READLINK
index 113fad1d21b334a1743cd54b7c1adae9cd810ff1..4445cf5bfebfc5686965441bc39eed48af981e0a 100644 (file)
@@ -3609,7 +3609,7 @@ dnl Can only be used for functions that do not require any include.
 AC_CHECK_FUNCS(fchdir fchown fsync getcwd getpseudotty \
        getpwent getpwnam getpwuid getrlimit gettimeofday getwd lstat \
        memset mkdtemp nanosleep opendir putenv qsort readlink select setenv \
-       setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
+       getpgid setpgid setsid sigaltstack sigstack sigset sigsetjmp sigaction \
        sigprocmask sigvec strcasecmp strerror strftime stricmp strncasecmp \
        strnicmp strpbrk strtol tgetent towlower towupper iswupper \
        usleep utime utimes)
index 6c5955b84ffaabdae667f939f0b7afdb9ca0a27f..9dd5c34e7ca866e84d79ef41e9835089f800c8f4 100644 (file)
@@ -3081,7 +3081,7 @@ executable_file(char_u *name)
 }
 
 /*
- * Return 1 if "name" can be found in $PATH and executed, 0 if not.
+ * Return TRUE if "name" can be found in $PATH and executed, FALSE if not.
  * If "use_path" is FALSE only check if "name" is executable.
  * Return -1 if unknown.
  */
@@ -5429,8 +5429,10 @@ mch_stop_job(job_T *job, char_u *how)
 
     /* TODO: have an option to only kill the process, not the group? */
     job_pid = job->jv_pid;
+#ifdef HAVE_GETPGID
     if (job_pid == getpgid(job_pid))
        job_pid = -job_pid;
+#endif
 
     kill(job_pid, sig);
 
index db00cc7d238a8a72171817533fc355fbee9a1298..7a0d500b47e9f89cd7e6174381c07c1d26bd0923 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    445,
 /**/
     444,
 /**/