diff options
author | Pavan Deolasee | 2016-01-28 12:50:32 +0000 |
---|---|---|
committer | Pavan Deolasee | 2016-10-18 09:48:13 +0000 |
commit | 16315a2f5c53376d3ddd6eafc41513db60cf477b (patch) | |
tree | c41e9834d008fb33cd5d8fe62be68e4efd1a5e3e | |
parent | c33f935b3bd726601b1f51abc3b7152092d1ba4f (diff) |
Avoid redefinition of a signal handler signature
-rw-r--r-- | contrib/pgxc_ctl/do_shell.h | 5 | ||||
-rw-r--r-- | src/include/port.h | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/contrib/pgxc_ctl/do_shell.h b/contrib/pgxc_ctl/do_shell.h index 88d72d3060..6d580a4d44 100644 --- a/contrib/pgxc_ctl/do_shell.h +++ b/contrib/pgxc_ctl/do_shell.h @@ -18,7 +18,10 @@ extern jmp_buf dcJmpBufMainLoop; extern void dcSigHandler(int signum); typedef enum FileType { STDIN, STDOUT, STDERR, GENERAL } FileType; -typedef void (*pqsigfunc) (int); +#ifndef PGSIGFUNC +#define PGSIGFUNC +typedef void (*pqsigfunc) (int signo); +#endif extern char *createLocalFileName(FileType type, char *buf, int len); extern char *createRemoteFileName(FileType type, char *buf, int len); extern int doImmediate(char *host, char *stdIn, const char *cmd_fmt, ...) __attribute__((format(printf, 3, 4))); diff --git a/src/include/port.h b/src/include/port.h index 71113c0394..60f46c2fd3 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -462,8 +462,12 @@ extern int pg_check_dir(const char *dir); /* port/pgmkdirp.c */ extern int pg_mkdir_p(char *path, int omode); +#ifndef PGSIGFUNC +#define PGSIGFUNC /* port/pqsignal.c */ typedef void (*pqsigfunc) (int signo); +#endif + extern pqsigfunc pqsignal(int signo, pqsigfunc func); /* port/quotes.c */ |