1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-20 00:15:31 +00:00

[getpid] Removed check for HAVE_GETPID

It is assumed that every supported system has getpid().
This commit is contained in:
Witold Filipczyk 2024-04-11 11:17:30 +02:00
parent 7dedda3022
commit 7545b8093d
6 changed files with 2 additions and 14 deletions

View File

@ -448,9 +448,6 @@
/* Define to 1 if you have the `getpgrp' function. */
#mesondefine HAVE_GETPGRP
/* Define to 1 if you have the `getpid' function. */
#mesondefine HAVE_GETPID
/* Define to 1 if you have the `getpwnam' function. */
#mesondefine HAVE_GETPWNAM

View File

@ -336,7 +336,6 @@ AC_CHECK_FUNCS(mkstemps)
# These aren't probably needed now, as they are commented in links.h.
# I've no idea about their historical background, but I keep them here
# just in the case they will help later. --pasky
AC_CHECK_FUNCS(getpid, HAVE_GETPID=yes)
AC_CHECK_FUNCS(setpgid getpgid setpgrp getpgrp)
AC_CHECK_FUNCS(raise, HAVE_RAISE=yes)
AC_CHECK_FUNCS(kill, HAVE_KILL=yes)
@ -346,7 +345,7 @@ AC_CHECK_FUNCS(fpathconf, HAVE_FPATHCONF=yes)
AC_CHECK_FUNCS(poll, HAVE_POLL=yes)
if test x"$HAVE_RAISE" = x; then
if test x"$HAVE_KILL" = x || test x"$HAVE_GETPID" = x; then
if test x"$HAVE_KILL" = x; then
AC_MSG_ERROR([Unable to emulate raise()])
fi
fi

View File

@ -891,10 +891,6 @@ if not conf_data.get('CONFIG_OS_DOS') and compiler.has_function('fork', prefix :
conf_data.set('HAVE_FORK', 1)
endif
if compiler.has_function('getpid', prefix : '#include <unistd.h>')
conf_data.set('HAVE_GETPID', 1)
endif
if compiler.has_function('setpgid', prefix : '#include <unistd.h>')
conf_data.set('HAVE_SETPGID', 1)
endif

View File

@ -544,9 +544,7 @@ init_interlink(void)
return -1;
}
/* child */
#ifdef HAVE_GETPID
master_pid = getpid();
#endif
close_terminal_pipes();
}
bind_to_af_unix();

View File

@ -195,9 +195,7 @@ init(void)
|| get_cmd_opt_bool("source")
|| (fd = init_interlink()) == -1) {
#ifdef HAVE_GETPID
master_pid = getpid();
#endif
parse_options_again();
init_b = 1;
init_modules(builtin_modules);

View File

@ -224,7 +224,7 @@ elinks_memrchr(const void *s, int c, size_t n)
#ifndef HAVE_RAISE
#if !defined(HAVE_KILL) || !defined(HAVE_GETPID)
#if !defined(HAVE_KILL)
#error The raise() stub function requires kill() and getpid()
#endif