Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c5133e5

Browse files
committed
Allow /contrib include files to compile on their own.
1 parent f0cd764 commit c5133e5

File tree

10 files changed

+24
-11
lines changed

10 files changed

+24
-11
lines changed

contrib/intarray/_int.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#ifndef ___INT_H__
2+
#define ___INT_H__
3+
14
#include "postgres.h"
25

36
#include <float.h>
@@ -171,3 +174,5 @@ int compDESC(const void *a, const void *b);
171174
if (ARRNELEMS(a) > 1) \
172175
qsort((void*)ARRPTR(a), ARRNELEMS(a),sizeof(int4), \
173176
(direction) ? compASC : compDESC )
177+
178+
#endif

contrib/pgcrypto/pgcrypto.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@
2626
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2727
* SUCH DAMAGE.
2828
*
29-
* $PostgreSQL: pgsql/contrib/pgcrypto/pgcrypto.h,v 1.8 2003/11/29 22:39:28 pgsql Exp $
29+
* $PostgreSQL: pgsql/contrib/pgcrypto/pgcrypto.h,v 1.9 2006/07/10 22:06:11 momjian Exp $
3030
*/
3131

3232
#ifndef _PG_CRYPTO_H
3333
#define _PG_CRYPTO_H
3434

35+
#include "fmgr.h"
36+
3537
/* exported functions */
3638
Datum pg_digest(PG_FUNCTION_ARGS);
3739
Datum pg_digest_exists(PG_FUNCTION_ARGS);

contrib/tablefunc/tablefunc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#ifndef TABLEFUNC_H
3232
#define TABLEFUNC_H
3333

34+
#include "fmgr.h"
35+
3436
/*
3537
* External declarations
3638
*/

contrib/tsearch2/common.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
#ifndef __TS_COMMON_H__
22
#define __TS_COMMON_H__
3+
34
#include "postgres.h"
45
#include "fmgr.h"
5-
6-
#ifndef PG_NARGS
7-
#define PG_NARGS() (fcinfo->nargs)
8-
#endif
6+
#include "utils/array.h"
97

108
text *char2text(char *in);
119
text *charl2text(char *in, int len);

contrib/tsearch2/query.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ typedef struct
4848
#define CLOSE 5
4949
#define VALSTOP 6 /* for stop words */
5050

51-
bool TS_execute(ITEM * curitem, void *checkval,
52-
bool calcnot, bool (*chkcond) (void *checkval, ITEM * val));
51+
bool TS_execute(ITEM *curitem, void *checkval,
52+
bool calcnot, bool (*chkcond) (void *checkval, ITEM *val));
5353

5454
#endif

contrib/tsearch2/query_cleanup.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#ifndef __REWRITE_H__
22
#define __REWRITE_H__
33

4-
ITEM *clean_NOT_v2(ITEM * ptr, int4 *len);
5-
ITEM *clean_fakeval_v2(ITEM * ptr, int4 *len);
4+
#include "query.h"
5+
6+
ITEM *clean_NOT_v2(ITEM *ptr, int4 *len);
7+
ITEM *clean_fakeval_v2(ITEM *ptr, int4 *len);
68

79
#endif

contrib/tsearch2/query_util.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "utils/memutils.h"
66

77
#include "query.h"
8+
#include "executor/spi.h"
89

910
typedef struct QTNode
1011
{

contrib/tsearch2/snowball/header.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/* $PostgreSQL: pgsql/contrib/tsearch2/snowball/header.h,v 1.7 2006/03/11 04:38:30 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/contrib/tsearch2/snowball/header.h,v 1.8 2006/07/10 22:06:11 momjian Exp $ */
22

33
#include <limits.h>
44

55
#include "api.h"
66

7-
#define HEAD 2*sizeof(int)
7+
#define HEAD (2 * sizeof(int))
88

99
#define SIZE(p) ((int *)(p))[-1]
1010
#define SET_SIZE(p, n) ((int *)(p))[-1] = n

contrib/tsearch2/ts_stat.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "access/itup.h"
88
#include "utils/builtins.h"
99
#include "storage/bufpage.h"
10+
#include "tsvector.h"
1011

1112
typedef struct
1213
{

contrib/userlock/user_locks.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef USER_LOCKS_H
22
#define USER_LOCKS_H
33

4+
#include "storage/lock.h"
5+
46
extern int user_lock(uint32 id1, uint32 id2, LOCKMODE lockmode);
57
extern int user_unlock(uint32 id1, uint32 id2, LOCKMODE lockmode);
68
extern int user_write_lock(uint32 id1, uint32 id2);

0 commit comments

Comments
 (0)