Skip to content

Commit 846681f

Browse files
committed
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.
1 parent 9e257a1 commit 846681f

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

src/bin/pg_dump/dumputils.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ typedef void (*on_exit_nicely_callback) (int code, void *arg);
4444

4545
extern int quote_all_identifiers;
4646
extern const char *progname;
47+
extern void (*on_exit_msg_func) (const char *modulename, const char *fmt, va_list ap);
4748

4849
extern void init_parallel_dump_utils(void);
4950
extern const char *fmtId(const char *identifier);
@@ -87,8 +88,6 @@ __attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 0)));
8788
extern void
8889
exit_horribly(const char *modulename, const char *fmt,...)
8990
__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 3), noreturn));
90-
extern void (*on_exit_msg_func) (const char *modulename, const char *fmt, va_list ap)
91-
__attribute__((format(PG_PRINTF_ATTRIBUTE, 2, 0)));
9291
extern void on_exit_nicely(on_exit_nicely_callback function, void *arg);
9392
extern void exit_nicely(int code) __attribute__((noreturn));
9493

src/bin/pg_dump/parallel.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ typedef enum
2929
WRKR_FINISHED
3030
} T_WorkerStatus;
3131

32-
typedef enum T_Action
33-
{
34-
ACT_DUMP,
35-
ACT_RESTORE,
36-
} T_Action;
37-
3832
/* Arguments needed for a worker process */
3933
typedef struct ParallelArgs
4034
{

src/bin/pg_dump/pg_backup_archiver.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,12 @@ struct _tocEntry;
114114
struct _restoreList;
115115
struct ParallelArgs;
116116
struct ParallelState;
117-
enum T_Action;
117+
118+
typedef enum T_Action
119+
{
120+
ACT_DUMP,
121+
ACT_RESTORE
122+
} T_Action;
118123

119124
typedef void (*ClosePtr) (struct _archiveHandle * AH);
120125
typedef void (*ReopenPtr) (struct _archiveHandle * AH);
@@ -145,9 +150,9 @@ typedef void (*DeClonePtr) (struct _archiveHandle * AH);
145150
typedef char *(*WorkerJobRestorePtr) (struct _archiveHandle * AH, struct _tocEntry * te);
146151
typedef char *(*WorkerJobDumpPtr) (struct _archiveHandle * AH, struct _tocEntry * te);
147152
typedef char *(*MasterStartParallelItemPtr) (struct _archiveHandle * AH, struct _tocEntry * te,
148-
enum T_Action act);
153+
T_Action act);
149154
typedef int (*MasterEndParallelItemPtr) (struct _archiveHandle * AH, struct _tocEntry * te,
150-
const char *str, enum T_Action act);
155+
const char *str, T_Action act);
151156

152157
typedef size_t (*CustomOutPtr) (struct _archiveHandle * AH, const void *buf, size_t len);
153158

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy