Zdenek Kotala <[EMAIL PROTECTED]> writes:
> I attached patch which removes dependency on postgres.h during ZIC
> compilation.
I consider it poor style to have an include file (particularly one
that's fairly widely used, like pgtime.h) including any of postgres.h
postgres_fe.h or c.h. That's pre-empting a decision that needs to be
made on a per-c-file basis. So I fixed it as attached, instead.
regards, tom lane
Index: ialloc.c
===================================================================
RCS file: /cvsroot/pgsql/src/timezone/ialloc.c,v
retrieving revision 1.8
diff -c -r1.8 ialloc.c
*** ialloc.c 26 Jan 2007 17:45:42 -0000 1.8
--- ialloc.c 26 Oct 2007 13:28:46 -0000
***************
*** 6,12 ****
* $PostgreSQL: pgsql/src/timezone/ialloc.c,v 1.8 2007/01/26 17:45:42
neilc Exp $
*/
! #include "postgres.h"
#include "private.h"
--- 6,12 ----
* $PostgreSQL: pgsql/src/timezone/ialloc.c,v 1.8 2007/01/26 17:45:42
neilc Exp $
*/
! #include "postgres_fe.h"
#include "private.h"
Index: localtime.c
===================================================================
RCS file: /cvsroot/pgsql/src/timezone/localtime.c,v
retrieving revision 1.17
diff -c -r1.17 localtime.c
*** localtime.c 4 Aug 2007 19:29:25 -0000 1.17
--- localtime.c 26 Oct 2007 13:28:46 -0000
***************
*** 12,18 ****
* ([EMAIL PROTECTED]).
*/
! #include "postgres.h"
#include <fcntl.h>
--- 12,19 ----
* ([EMAIL PROTECTED]).
*/
! /* this file needs to build in both frontend and backend contexts */
! #include "c.h"
#include <fcntl.h>
Index: scheck.c
===================================================================
RCS file: /cvsroot/pgsql/src/timezone/scheck.c,v
retrieving revision 1.7
diff -c -r1.7 scheck.c
*** scheck.c 15 Oct 2005 02:49:51 -0000 1.7
--- scheck.c 26 Oct 2007 13:28:46 -0000
***************
*** 6,12 ****
* $PostgreSQL: pgsql/src/timezone/scheck.c,v 1.7 2005/10/15 02:49:51
momjian Exp $
*/
! #include "postgres.h"
#include "private.h"
--- 6,12 ----
* $PostgreSQL: pgsql/src/timezone/scheck.c,v 1.7 2005/10/15 02:49:51
momjian Exp $
*/
! #include "postgres_fe.h"
#include "private.h"
Index: zic.c
===================================================================
RCS file: /cvsroot/pgsql/src/timezone/zic.c,v
retrieving revision 1.21
diff -c -r1.21 zic.c
*** zic.c 1 Feb 2007 19:10:30 -0000 1.21
--- zic.c 26 Oct 2007 13:28:46 -0000
***************
*** 6,12 ****
* $PostgreSQL: pgsql/src/timezone/zic.c,v 1.21 2007/02/01 19:10:30
momjian Exp $
*/
! #include "postgres.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
--- 6,12 ----
* $PostgreSQL: pgsql/src/timezone/zic.c,v 1.21 2007/02/01 19:10:30
momjian Exp $
*/
! #include "postgres_fe.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster