mirror of
https://github.com/postgres/postgres.git
synced 2025-10-21 02:52:47 +03:00
Remove dead handling for pre-POSIX sigwait().
sigwait() is in SUSv2 and all targeted Unix systems have it. An earlier pre-standard function prototype existed on some older systems, but we no longer need a workaround for that. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Greg Stark <stark@mit.edu> Reviewed-by: Robert Haas <robertmhaas@gmail.com> Discussion: https://postgr.es/m/CA+hUKGJ3LHeP9w5Fgzdr4G8AnEtJ=z=p6hGDEm4qYGEUX5B6fQ@mail.gmail.com
This commit is contained in:
@@ -4953,7 +4953,7 @@ do_watch(PQExpBuffer query_buf, double sleep)
|
||||
FILE *pagerpipe = NULL;
|
||||
int title_len;
|
||||
int res = 0;
|
||||
#ifdef HAVE_POSIX_DECL_SIGWAIT
|
||||
#ifndef WIN32
|
||||
sigset_t sigalrm_sigchld_sigint;
|
||||
sigset_t sigalrm_sigchld;
|
||||
sigset_t sigint;
|
||||
@@ -4967,7 +4967,7 @@ do_watch(PQExpBuffer query_buf, double sleep)
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef HAVE_POSIX_DECL_SIGWAIT
|
||||
#ifndef WIN32
|
||||
sigemptyset(&sigalrm_sigchld_sigint);
|
||||
sigaddset(&sigalrm_sigchld_sigint, SIGCHLD);
|
||||
sigaddset(&sigalrm_sigchld_sigint, SIGALRM);
|
||||
@@ -5006,7 +5006,7 @@ do_watch(PQExpBuffer query_buf, double sleep)
|
||||
* PAGER environment variables, because traditional pagers probably won't
|
||||
* be very useful for showing a stream of results.
|
||||
*/
|
||||
#ifdef HAVE_POSIX_DECL_SIGWAIT
|
||||
#ifndef WIN32
|
||||
pagerprog = getenv("PSQL_WATCH_PAGER");
|
||||
#endif
|
||||
if (pagerprog && myopt.topt.pager)
|
||||
@@ -5077,7 +5077,7 @@ do_watch(PQExpBuffer query_buf, double sleep)
|
||||
if (pagerpipe && ferror(pagerpipe))
|
||||
break;
|
||||
|
||||
#ifndef HAVE_POSIX_DECL_SIGWAIT
|
||||
#ifdef WIN32
|
||||
|
||||
/*
|
||||
* Set up cancellation of 'watch' via SIGINT. We redo this each time
|
||||
@@ -5158,7 +5158,7 @@ do_watch(PQExpBuffer query_buf, double sleep)
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
#ifdef HAVE_POSIX_DECL_SIGWAIT
|
||||
#ifndef WIN32
|
||||
/* Disable the interval timer. */
|
||||
memset(&interval, 0, sizeof(interval));
|
||||
setitimer(ITIMER_REAL, &interval, NULL);
|
||||
|
@@ -110,7 +110,7 @@ log_locus_callback(const char **filename, uint64 *lineno)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_POSIX_DECL_SIGWAIT
|
||||
#ifndef WIN32
|
||||
static void
|
||||
empty_signal_handler(SIGNAL_ARGS)
|
||||
{
|
||||
@@ -308,7 +308,7 @@ main(int argc, char *argv[])
|
||||
|
||||
psql_setup_cancel_handler();
|
||||
|
||||
#ifdef HAVE_POSIX_DECL_SIGWAIT
|
||||
#ifndef WIN32
|
||||
|
||||
/*
|
||||
* do_watch() needs signal handlers installed (otherwise sigwait() will
|
||||
|
@@ -149,10 +149,6 @@
|
||||
don't. */
|
||||
#undef HAVE_DECL_RTLD_NOW
|
||||
|
||||
/* Define to 1 if you have the declaration of `sigwait', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_SIGWAIT
|
||||
|
||||
/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
|
||||
don't. */
|
||||
#undef HAVE_DECL_STRLCAT
|
||||
@@ -406,9 +402,6 @@
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#undef HAVE_POLL_H
|
||||
|
||||
/* Define to 1 if you have a POSIX-conforming sigwait declaration. */
|
||||
#undef HAVE_POSIX_DECL_SIGWAIT
|
||||
|
||||
/* Define to 1 if you have the `posix_fadvise' function. */
|
||||
#undef HAVE_POSIX_FADVISE
|
||||
|
||||
|
@@ -246,7 +246,6 @@ sub GenerateFiles
|
||||
HAVE_DECL_PWRITEV => 0,
|
||||
HAVE_DECL_RTLD_GLOBAL => 0,
|
||||
HAVE_DECL_RTLD_NOW => 0,
|
||||
HAVE_DECL_SIGWAIT => 0,
|
||||
HAVE_DECL_STRLCAT => 0,
|
||||
HAVE_DECL_STRLCPY => 0,
|
||||
HAVE_DECL_STRNLEN => 1,
|
||||
@@ -329,7 +328,6 @@ sub GenerateFiles
|
||||
HAVE_PAM_PAM_APPL_H => undef,
|
||||
HAVE_POLL => undef,
|
||||
HAVE_POLL_H => undef,
|
||||
HAVE_POSIX_DECL_SIGWAIT => undef,
|
||||
HAVE_POSIX_FADVISE => undef,
|
||||
HAVE_POSIX_FALLOCATE => undef,
|
||||
HAVE_PPC_LWARX_MUTEX_HINT => undef,
|
||||
|
Reference in New Issue
Block a user