Consistently use "superuser" instead of "super user"
[pgsql.git] / src / include / snowball / header.h
blob48521d7040a409b9f8f817ae3e5f7cf5b0fc27f6
1 /*-------------------------------------------------------------------------
3 * header.h
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-2021, PostgreSQL Global Development Group
18 * src/include/snowball/header.h
20 *-------------------------------------------------------------------------
22 #ifndef SNOWBALL_HEADR_H
23 #define SNOWBALL_HEADR_H
26 * It's against Postgres coding conventions to include postgres.h in a
27 * header file, but we allow the violation here because the alternative is
28 * to modify the machine-generated .c files provided by the Snowball project.
30 #include "postgres.h"
32 /* Some platforms define MAXINT and/or MININT, causing conflicts */
33 #ifdef MAXINT
34 #undef MAXINT
35 #endif
36 #ifdef MININT
37 #undef MININT
38 #endif
40 /* Now we can include the original Snowball header.h */
41 #include "snowball/libstemmer/header.h" /* pgrminclude ignore */
44 * Redefine standard memory allocation interface to pgsql's one.
45 * This allows us to control where the Snowball code allocates stuff.
47 #ifdef malloc
48 #undef malloc
49 #endif
50 #define malloc(a) palloc(a)
52 #ifdef calloc
53 #undef calloc
54 #endif
55 #define calloc(a,b) palloc0((a) * (b))
57 #ifdef realloc
58 #undef realloc
59 #endif
60 #define realloc(a,b) repalloc(a,b)
62 #ifdef free
63 #undef free
64 #endif
65 #define free(a) pfree(a)
67 #endif /* SNOWBALL_HEADR_H */