static void processEncodingEntry(ArchiveHandle *AH, TocEntry *te);
static void processStdStringsEntry(ArchiveHandle *AH, TocEntry *te);
static void processSearchPathEntry(ArchiveHandle *AH, TocEntry *te);
-static teReqs _tocEntryRequired(TocEntry *te, teSection curSection, ArchiveHandle *AH);
+static int _tocEntryRequired(TocEntry *te, teSection curSection, ArchiveHandle *AH);
static RestorePass _tocEntryRestorePass(TocEntry *te);
static bool _tocEntryIsACL(TocEntry *te);
static void _disableTriggersIfNecessary(ArchiveHandle *AH, TocEntry *te);
{
RestoreOptions *ropt = AH->public.ropt;
int status = WORKER_OK;
- teReqs reqs;
+ int reqs;
bool defnDumped;
AH->currentTE = te;
return NULL;
}
-teReqs
+int
TocIDRequired(ArchiveHandle *AH, DumpId id)
{
TocEntry *te = getTocEntryByDumpId(AH, id);
* REQ_SCHEMA and REQ_DATA bits if we want to restore schema and/or data
* portions of this TOC entry, or REQ_SPECIAL if it's a special entry.
*/
-static teReqs
+static int
_tocEntryRequired(TocEntry *te, teSection curSection, ArchiveHandle *AH)
{
- teReqs res = REQ_SCHEMA | REQ_DATA;
+ int res = REQ_SCHEMA | REQ_DATA;
RestoreOptions *ropt = AH->public.ropt;
/* These items are treated specially */
#define RESTORE_PASS_LAST RESTORE_PASS_POST_ACL
} RestorePass;
-typedef enum
-{
- REQ_SCHEMA = 0x01, /* want schema */
- REQ_DATA = 0x02, /* want data */
- REQ_SPECIAL = 0x04 /* for special TOC entries */
-} teReqs;
+#define REQ_SCHEMA 0x01 /* want schema */
+#define REQ_DATA 0x02 /* want data */
+#define REQ_SPECIAL 0x04 /* for special TOC entries */
struct _archiveHandle
{
/* working state while dumping/restoring */
pgoff_t dataLength; /* item's data size; 0 if none or unknown */
- teReqs reqs; /* do we need schema and/or data of object */
+ int reqs; /* do we need schema and/or data of object (REQ_* bit mask) */
bool created; /* set for DATA member if TABLE was created */
/* working state (needed only for parallel restore) */
extern ArchiveHandle *CloneArchive(ArchiveHandle *AH);
extern void DeCloneArchive(ArchiveHandle *AH);
-extern teReqs TocIDRequired(ArchiveHandle *AH, DumpId id);
+extern int TocIDRequired(ArchiveHandle *AH, DumpId id);
TocEntry *getTocEntryByDumpId(ArchiveHandle *AH, DumpId id);
extern bool checkSeek(FILE *fp);
#include "common/logging.h"
-typedef enum /* bits returned by set_dump_section */
-{
- DUMP_PRE_DATA = 0x01,
- DUMP_DATA = 0x02,
- DUMP_POST_DATA = 0x04,
- DUMP_UNSECTIONED = 0xff
-} DumpSections;
+/* bits returned by set_dump_section */
+#define DUMP_PRE_DATA 0x01
+#define DUMP_DATA 0x02
+#define DUMP_POST_DATA 0x04
+#define DUMP_UNSECTIONED 0xff
typedef void (*on_exit_nicely_callback) (int code, void *arg);