From: Alvaro Herrera Date: Wed, 11 Mar 2009 00:08:07 +0000 (+0000) Subject: Remove pg_trace.h inclusion from c.h and add it to the .c files that need it. X-Git-Tag: REL8_3_7~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a1dd6ed4bb9d7eee25defff149e93cc9e76b109;p=postgresql Remove pg_trace.h inclusion from c.h and add it to the .c files that need it. Only needed in 8.3 because it's already this way in HEAD, and older branches did not support DTrace. This allows external modules to compile on Linux machines where SystemTap support was recently added, when the required SystemTap headers are not present on the build machine. Approach suggested by Tom, after a RPM build trouble report by Devrim Gunduz. --- diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 815c39d007..673419e174 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.257.2.2 2008/04/26 23:35:33 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xact.c,v 1.257.2.3 2009/03/11 00:08:06 alvherre Exp $ * *------------------------------------------------------------------------- */ @@ -33,6 +33,7 @@ #include "executor/spi.h" #include "libpq/be-fsstubs.h" #include "miscadmin.h" +#include "pg_trace.h" #include "pgstat.h" #include "storage/fd.h" #include "storage/lmgr.h" diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index c3c2669891..d442a7305e 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/lmgr/lock.c,v 1.181.2.1 2008/03/04 19:54:13 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/storage/lmgr/lock.c,v 1.181.2.2 2009/03/11 00:08:06 alvherre Exp $ * * NOTES * A lock table is a shared memory hash table. When @@ -36,6 +36,7 @@ #include "access/twophase.h" #include "access/twophase_rmgr.h" #include "miscadmin.h" +#include "pg_trace.h" #include "pgstat.h" #include "utils/memutils.h" #include "utils/ps_status.h" diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c index 036c32fad0..238ba1cfc6 100644 --- a/src/backend/storage/lmgr/lwlock.c +++ b/src/backend/storage/lmgr/lwlock.c @@ -15,7 +15,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/storage/lmgr/lwlock.c,v 1.50 2008/01/01 19:45:52 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/storage/lmgr/lwlock.c,v 1.50.2.1 2009/03/11 00:08:07 alvherre Exp $ * *------------------------------------------------------------------------- */ @@ -25,6 +25,7 @@ #include "access/multixact.h" #include "access/subtrans.h" #include "miscadmin.h" +#include "pg_trace.h" #include "storage/ipc.h" #include "storage/proc.h" #include "storage/spin.h" diff --git a/src/include/c.h b/src/include/c.h index 074411a3ba..5803a28bf3 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -12,7 +12,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/c.h,v 1.222.2.1 2008/02/23 19:11:55 tgl Exp $ + * $PostgreSQL: pgsql/src/include/c.h,v 1.222.2.2 2009/03/11 00:08:07 alvherre Exp $ * *------------------------------------------------------------------------- */ @@ -57,7 +57,6 @@ #include "pg_config_os.h" /* must be before any system header files */ #endif #include "postgres_ext.h" -#include "pg_trace.h" #if _MSC_VER >= 1400 #define errcode __msvc_errcode