diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/libpq/pqsignal.h | 11 | ||||
-rw-r--r-- | src/include/port.h | 7 |
2 files changed, 8 insertions, 10 deletions
diff --git a/src/include/libpq/pqsignal.h b/src/include/libpq/pqsignal.h index bc0bcef040c..1889dca4b9e 100644 --- a/src/include/libpq/pqsignal.h +++ b/src/include/libpq/pqsignal.h @@ -1,18 +1,13 @@ /*------------------------------------------------------------------------- * * pqsignal.h - * prototypes for the reliable BSD-style signal(2) routine. - * + * Backend signal(2) support (see also src/port/pqsignal.c) * * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/libpq/pqsignal.h * - * NOTES - * This shouldn't be in libpq, but the monitor and some other - * things need it... - * *------------------------------------------------------------------------- */ #ifndef PQSIGNAL_H @@ -42,10 +37,6 @@ int pqsigsetmask(int mask); #define sigdelset(set, signum) (*(set) &= ~(sigmask(signum))) #endif /* not HAVE_SIGPROCMASK */ -typedef void (*pqsigfunc) (int); - extern void pqinitmask(void); -extern pqsigfunc pqsignal(int signo, pqsigfunc func); - #endif /* PQSIGNAL_H */ diff --git a/src/include/port.h b/src/include/port.h index c5d0e0a9709..cde4ad56075 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -462,6 +462,13 @@ extern int pg_check_dir(const char *dir); /* port/pgmkdirp.c */ extern int pg_mkdir_p(char *path, int omode); +/* port/pqsignal.c */ +/* On Windows, we can emulate pqsignal in the backend, but not frontend */ +#if !defined(WIN32) || !defined(FRONTEND) +typedef void (*pqsigfunc) (int signo); +extern pqsigfunc pqsignal(int signo, pqsigfunc func); +#endif + /* port/quotes.c */ extern char *escape_single_quotes_ascii(const char *src); |