1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-15 19:15:29 +03:00

Avoid redefining simplehash_allocate/simplehash_free.

There's no generic guard against multiple inclusion in this file,
for good reason.  But these typedefs need one, as per a report
from Jeff Janes.
This commit is contained in:
Robert Haas 2017-02-07 16:20:05 -05:00
parent 565903af47
commit ac8eb972f2

View File

@ -88,8 +88,11 @@
#define SH_ENTRY_HASH SH_MAKE_NAME(entry_hash) #define SH_ENTRY_HASH SH_MAKE_NAME(entry_hash)
/* Allocation function for hash table elements */ /* Allocation function for hash table elements */
#ifndef SIMPLEHASH_TYPEDEFS
#define SIMPLEHASH_TYPEDEFS
typedef void *(*simplehash_allocate) (Size size, void *args); typedef void *(*simplehash_allocate) (Size size, void *args);
typedef void (*simplehash_free) (void *pointer, void *args); typedef void (*simplehash_free) (void *pointer, void *args);
#endif
/* generate forward declarations necessary to use the hash table */ /* generate forward declarations necessary to use the hash table */
#ifdef SH_DECLARE #ifdef SH_DECLARE