mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-28 08:14:24 +02:00
Invert sense of getpgrp test.
AC_FUNC_GETPGRP tests if getpgrp(0) works, which it does if it's not declared. Instead, test if the zero-arg version we want to use works.
This commit is contained in:
parent
b39593a6de
commit
c7b5a47e3b
12
configure.ac
12
configure.ac
@ -1736,7 +1736,6 @@ AC_CHECK_FUNCS([ \
|
|||||||
getpeereid \
|
getpeereid \
|
||||||
getpeerucred \
|
getpeerucred \
|
||||||
getpgid \
|
getpgid \
|
||||||
getpgrp \
|
|
||||||
_getpty \
|
_getpty \
|
||||||
getrlimit \
|
getrlimit \
|
||||||
getsid \
|
getsid \
|
||||||
@ -2413,7 +2412,16 @@ static void sighandler(int sig) { _exit(1); }
|
|||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_FUNC_GETPGRP
|
AC_CHECK_FUNCS([getpgrp],[
|
||||||
|
AC_MSG_CHECKING([if getpgrp accepts zero args])
|
||||||
|
AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([[$ac_includes_default]], [[ getpgrp(); ]])],
|
||||||
|
[ AC_MSG_RESULT([yes])
|
||||||
|
AC_DEFINE([GETPGRP_VOID], [1], [getpgrp takes zero args])],
|
||||||
|
[ AC_MSG_RESULT([no])
|
||||||
|
AC_DEFINE([GETPGRP_VOID], [0], [getpgrp takes one arg])]
|
||||||
|
)
|
||||||
|
])
|
||||||
|
|
||||||
# Search for OpenSSL
|
# Search for OpenSSL
|
||||||
saved_CPPFLAGS="$CPPFLAGS"
|
saved_CPPFLAGS="$CPPFLAGS"
|
||||||
|
@ -238,7 +238,7 @@ isblank(int c)
|
|||||||
pid_t
|
pid_t
|
||||||
getpgid(pid_t pid)
|
getpgid(pid_t pid)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_GETPGRP) && !defined(GETPGRP_VOID)
|
#if defined(HAVE_GETPGRP) && !defined(GETPGRP_VOID) && GETPGRP_VOID == 0
|
||||||
return getpgrp(pid);
|
return getpgrp(pid);
|
||||||
#elif defined(HAVE_GETPGRP)
|
#elif defined(HAVE_GETPGRP)
|
||||||
if (pid == 0)
|
if (pid == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user