Robert Haas <rhaas@postgresql.org> writes:
> Move the server's backup manifest code to a separate file.
This broke the build for me (with gcc 4.4.7):
In file included from basebackup.c:34:
../../../src/include/replication/backup_manifest.h:36: error: redefinition of typedef 'manifest_info'
../../../src/include/replication/basebackup.h:34: note: previous declaration of 'manifest_info' was here
make[3]: *** [basebackup.o] Error 1
Not really sure why the buildfarm isn't showing the same.
But this in basebackup.h sure looks like an antipattern:
struct manifest_info;
typedef struct manifest_info manifest_info;
The usual thing, if you don't want to actually include the typedef,
is more like
struct manifest_info;
...
extern int64 sendTablespace(char *path, char *oid, bool sizeonly,
struct manifest_info *manifest);
Also a comment along the lines of "avoid including foo.h"
is standard practice.
regards, tom lane