In cleaning up the streaming part of pg_basebackup, I came across this gem I copied from elsewherE:
/* * We have to use postgres.h not postgres_fe.h here, because there's so much * backend-only stuff in the XLOG include files we need. But we need a * frontend-ish environment otherwise. Hence this ugly hack. */ #define FRONTEND 1 #include "postgres.h" That's obviously quite ugly. I'm getting most defines out of xlogdefs.h, which loads fine without that hack, but I'm also using the XLogFileName() macro, which is in xlog_internal.h. The way I see it, my options are: 1) keep doing wha tI do and include xlog_internal.h which defines it 2) redefine the macro locally (or just duplicate the code - it's only one line after all, but it's more a matter of principle) 3) move the definition of the macro to some place that can be accessed externally thoughts? -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers