Commit 846681fd authored by Tom Lane's avatar Tom Lane

Fix some unportable constructs in parallel pg_dump code.

Didn't compile on semi-obsolete gcc, and probably not on not-gcc-at-all
either.
parent 9e257a18
...@@ -44,6 +44,7 @@ typedef void (*on_exit_nicely_callback) (int code, void *arg); ...@@ -44,6 +44,7 @@ typedef void (*on_exit_nicely_callback) (int code, void *arg);
extern int quote_all_identifiers; extern int quote_all_identifiers;
extern const char *progname; extern const char *progname;
extern void (*on_exit_msg_func) (const char *modulename, const char *fmt, va_list ap);
extern void init_parallel_dump_utils(void); extern void init_parallel_dump_utils(void);
extern const char *fmtId(const char *identifier); extern const char *fmtId(const char *identifier);
...@@ -87,8 +88,6 @@ __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 0))); ...@@ -87,8 +88,6 @@ __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 0)));
extern void extern void
exit_horribly(const char *modulename, const char *fmt,...) exit_horribly(const char *modulename, const char *fmt,...)
__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3), noreturn)); __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3), noreturn));
extern void (*on_exit_msg_func) (const char *modulename, const char *fmt, va_list ap)
__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 0)));
extern void on_exit_nicely(on_exit_nicely_callback function, void *arg); extern void on_exit_nicely(on_exit_nicely_callback function, void *arg);
extern void exit_nicely(int code) __attribute__((noreturn)); extern void exit_nicely(int code) __attribute__((noreturn));
......
...@@ -29,12 +29,6 @@ typedef enum ...@@ -29,12 +29,6 @@ typedef enum
WRKR_FINISHED WRKR_FINISHED
} T_WorkerStatus; } T_WorkerStatus;
typedef enum T_Action
{
ACT_DUMP,
ACT_RESTORE,
} T_Action;
/* Arguments needed for a worker process */ /* Arguments needed for a worker process */
typedef struct ParallelArgs typedef struct ParallelArgs
{ {
......
...@@ -114,7 +114,12 @@ struct _tocEntry; ...@@ -114,7 +114,12 @@ struct _tocEntry;
struct _restoreList; struct _restoreList;
struct ParallelArgs; struct ParallelArgs;
struct ParallelState; struct ParallelState;
enum T_Action;
typedef enum T_Action
{
ACT_DUMP,
ACT_RESTORE
} T_Action;
typedef void (*ClosePtr) (struct _archiveHandle * AH); typedef void (*ClosePtr) (struct _archiveHandle * AH);
typedef void (*ReopenPtr) (struct _archiveHandle * AH); typedef void (*ReopenPtr) (struct _archiveHandle * AH);
...@@ -145,9 +150,9 @@ typedef void (*DeClonePtr) (struct _archiveHandle * AH); ...@@ -145,9 +150,9 @@ typedef void (*DeClonePtr) (struct _archiveHandle * AH);
typedef char *(*WorkerJobRestorePtr) (struct _archiveHandle * AH, struct _tocEntry * te); typedef char *(*WorkerJobRestorePtr) (struct _archiveHandle * AH, struct _tocEntry * te);
typedef char *(*WorkerJobDumpPtr) (struct _archiveHandle * AH, struct _tocEntry * te); typedef char *(*WorkerJobDumpPtr) (struct _archiveHandle * AH, struct _tocEntry * te);
typedef char *(*MasterStartParallelItemPtr) (struct _archiveHandle * AH, struct _tocEntry * te, typedef char *(*MasterStartParallelItemPtr) (struct _archiveHandle * AH, struct _tocEntry * te,
enum T_Action act); T_Action act);
typedef int (*MasterEndParallelItemPtr) (struct _archiveHandle * AH, struct _tocEntry * te, typedef int (*MasterEndParallelItemPtr) (struct _archiveHandle * AH, struct _tocEntry * te,
const char *str, enum T_Action act); const char *str, T_Action act);
typedef size_t (*CustomOutPtr) (struct _archiveHandle * AH, const void *buf, size_t len); typedef size_t (*CustomOutPtr) (struct _archiveHandle * AH, const void *buf, size_t len);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment