1
/*-------------------------------------------------------------------------
4
* Replacement header file for Snowball stemmer modules
6
* The Snowball stemmer modules do #include "header.h", and think they
7
* are including snowball/libstemmer/header.h. We adjust the CPPFLAGS
8
* so that this file is found instead, and thereby we can modify the
9
* headers they see. The main point here is to ensure that pg_config.h
10
* is included before any system headers such as <stdio.h>; without that,
11
* we have portability issues on some platforms due to variation in
12
* largefile options across different modules in the backend.
14
* NOTE: this file should not be included into any non-snowball sources!
16
* Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
18
* src/include/snowball/header.h
20
*-------------------------------------------------------------------------
22
#ifndef SNOWBALL_HEADR_H
23
#define SNOWBALL_HEADR_H
27
/* Some platforms define MAXINT and/or MININT, causing conflicts */
35
/* Now we can include the original Snowball header.h */
36
#include "snowball/libstemmer/header.h"
39
* Redefine standard memory allocation interface to pgsql's one.
40
* This allows us to control where the Snowball code allocates stuff.
45
#define malloc(a) palloc(a)
50
#define calloc(a,b) palloc0((a) * (b))
55
#define realloc(a,b) repalloc(a,b)
60
#define free(a) pfree(a)
62
#endif /* SNOWBALL_HEADR_H */